Dario Crivelli In fact, Lightstreamer Server, after issuing a subscribe() request to the Data Adapter, takes care of keeping the item snapshot updated;
but as soon as clients are no longer interested, it issues a unsubscribe() request and quits keeping the item snapshot.
When eventually a new client connects, the Server will issue subscribe() again.
At this point, the Data Adapter will have the opportunity to send the current item snapshot to the Server.
So, if the Data Adapter also keeps the snapshot up-to-date on the items it manages, it can fill the gap.
Otherwise, the only option is to cheat the Server by adding a fake client which subscribes to the needed items and never quits.
This fake client can (and should) be run on the back-end side, but there is no special channel available to communicate with the Server:
it has to communicate in the same way as the other clients do, that is, by issuing request through the Server listening ports.
If you are using the Moderato edition, so that only the JavaScript Client Library is available, you could, for instance, write this fake client in NodeJS.
Thanks Dario for your suggestion of adding a fake client. I will try that if everything else fail.
Actually my program is a modification whereby the adapter will get initial data from the database. I have managed to pump the data to adapter.
But how can I make the server keep the snapshot even before anyone is subscribed?
Currently the behavior is, if no one is subscribed, it will not store it. And also, once no one is subscribed, it also discarded it.
What is the proper way to make it work as I would want it to?