Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The Web Service Multithreaded Worker is designed to be used with the Web Service Multithreaded component. For steps on setting up and running the two components, see the documentation for the Web Service Multithreaded.

The worker component handles the actual processing of the data dispatched by the ServerComponent, in this case, the Web Service Multithread component. The component’s custom fields contain a ThreadCount value which can be configured as used to create multiple worker component threads running in parallel to process several requests simultaneously.

...

Adapting the Component:

There are a few ways you can adapt and expand this component for more complex workflows:

Expand
titleConfigure the ThreadCount

On startup, the component spins up the configured number of ThreadCount to handle inbound requests. Depending on the volume expected, you can set the ThreadCount to any number between 2 and 100.

...

Expand
titleAdd data processing logic

Inbound requests are sent from the Web Service Multithreaded component as JSON strings. Requests are parsed and at this point, any data processing can be implemented.

Expand
titleCustomize the response

A general response is constructed and sent back to the web service. If adapted, the response must contain three pieces of information:

  • You must first useWEBsetResponseHeadersto set the required response headers as they contain connection information for which request to respond to.

  • You can include any additional headers required.

  • You can customize the response body.

Once constructed, component.call is used to call the WEBrespond function in the Web Server component with the response data so it can respond to the source connection.