Hi Joseph,
An Adapter Set is made up of a Metadata Adapter and one or multiple Data Adapters, their number is dictated only by the configuration defined in the adapters.xml file and is independent of the number of clients connected to the Lightstreamer server.
Indeed all the client requests are routed to the same instance of the Metadata regarding authentication and authorization and to one instance of Data Adapter in case of subscription request (in the subscription request the client specifies the Data Adapter from which it wants to receive the data).
As for the internal architecture of the adapters, you can implement multithreaded management as your application requires, keeping in mind that it is strongly recommended that adapters should reply to the server requests as quickly as possible.
Especially in the case of in-process adapter, to avoid accumulating of queues of requests in the server. In this case could be a good idea to immediately reply to the server and span processing that may take longer, such as a request to an external service, in a separate thread.
In any case please refer to section 1.1.2 of
"General Concepts" documentation and you can also delve into some of our examples with the source code fully available on GitHub:
https://demos.lightstreamer.com/?p=lightstreamer&t=adapter&ladapter=java&sadapterjava=remote.
But, for a first approach I would suggest:
- the "Hello World" example:
https://github.com/Lightstreamer/Lightstreamer-example-HelloWorld-adapter-java
- the "Stock-List" demo:
https://github.com/Lightstreamer/Lightstreamer-example-StockList-adapter-java
Please let us know if you need any furhter clarifications.
Regards,
Giuseppe