Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

The Web Service Multithreaded component is designed to work with the Web Service Multithreaded Worker to enable parallel processing of requests. These components have two distinct roles:

  • Web Service Multithreaded is the dispatcher component which listens for requests and sends it to the worker component for parallel processing using component.call.

  • Web Service Multithread Worker component handles the actual processing of the data dispatched by the Web Service Multithreaded component.

Running the Components:

 STEP 1: Import the Web Service Multithreaded and Web Service Multithread Worker components

Using +COMPONENT, import two components:

  • Web Service Multithreaded

  • Web Service Multithread Worker

 STEP 2: Configure the custom fields

The two components are configured to work together by default without configuration required. However, the custom fields can be configured as needed:

Web Service Multithreaded:

  • WorkerComponent: The target multithreaded worker component

  • Port: The web service port. Change if the default port, 7778, is already in use.

  • UseHTTPS: Set to true to enable HTTPS. If enabled, you can configure Iguana to use your preferred Certificate and PrivateKey files.

Web Service Multithread Worker:

  • ServerComponent: The web service component which will dispatch requests to the worker.

  • ThreadCount: Number of processing threads. Can be set as a number from 2 to 100.

For more information on adapting the worker component, see Web Service Multithreaded Worker.

 STEP 3: Setup a test source data feed to send requests to the Web Service Multithreaded component

You can use any mechanism to send HTTP requests to the Web Service Multithreaded component configured endpoint - default is http://localhost:7778/. If your Iguana instance is running remotely you can use the public IP address.

If you want to use Iguana as the test source system to create a data feed, you can use the following simple setup:

  1. Create a custom component named “Source Feed“

  2. Copy the script below into the Translator:

function main(Data)
   for i=1, 10 do 
      net.http.get{url="http://127.0.0.1:7778"}
   end 
end

This script will simply loop 10 times, each time sending a HTTP GET request to the Web Service Multithreaded component.

 STEP 4: Start all three components and view the logs of the Web Service Multithread Worker

Go to the logs of the Web Service Multithread Worker component and view the logged GET requests:

  • No labels