Hi there,


I am building a trading platform and doing something very similar to your recent MarketDepth demo. I am however using the node js adapters instead of the Java adapter that you have used as the backbone of that demo.

I have read through the docs quite thoroughly and still have the following question:

I want to show the user his orders. For this the client subscribes to userID_orders (he is only allowed to see his orders and also needs to be authenticated to do so via the lightstreamer data adapter). The first time that he subscribes, the node js data adapter looks in the database for all of this current orders and then publishes them with isSnapshot = true and finally calls endOfSnapshot. This results in the client receiving multiple item updates where the isSnapshot parameter is set to false, as it is the very first subscription. In the client the endOfSnapshot is also not called, again I understand that this is because it is the very first subscription and the snapshot has thus not been created in the Lightstreamer server yet. This causes an issue in the client because for the first subscription the client has no way to tell when the itemUpdates will stop so that it can repaint the user interface. It is not efficient to rebuild the user interface on every item update when downloading the initial population of orders, there may be many orders and we certainly do not want to keep redrawing the grids in the user interface. If the client then refreshes his browser, because he is already subscribed to userID_orders he gets all the updates and an endOfShapshot callback so that he knows when to rebuild the grid in the GUI efficiently. What is your recommended approach on how to efficiently handle the initial population of the user’s orders when he subscribes for the first time and receives very many item updates?

The market depth demo loads the data into the grid very quickly but I am guessing that is because I am not the first client to subscribe to it and the snapshot is already available, meaning that the GUI can behave efficiently in terms of rebuilding its grids.

Thanks in advance.

Doraintech