Cerogil
If Lightstreamer recieves two large updates around the same time (update A: 100 items, update B: 50 items) such that it receives data from the second update before it finishes passing the first update to the clients, will it finish passing all of the first update (update A) to a client before passing any data from the update B, or will it intermingle the data? This matters to our client processing because we are handling chunks of updates at a time.
Thanks!
Mone
Sorry, we encountered an error while displaying this content. If you're a user, please try again later. If you're an administrator, take a look in your Flarum log files for more information.
Cerogil
Let me clarify that COMMAND mode is being used. So, applying the same question:
If Lightstreamer recieves two large updates around the same time (update A: 100 items, update B: 50 items) such that it receives data from the second update before it finishes passing the first update to the clients, will it finish passing all of the first update (update A) to a client before passing any data from the update B, or will it intermingle the data? This matters to our client processing because we are handling chunks of updates at a time.
Setting max_delay_millis in the config file does not prevent what could be intermingling. Data could arrive to Lightstreamer right after the number of milliseconds set.
So how would Lightstreamer handle the above scenario?
Thanks!
Dario Crivelli
It is still not completely clear what you mean by "update A: 100 items, update B: 50 items".
As "Lightstreamer recieves" the updates, it seems that are you are referring to bunches of updates sent by your feed to your Data Adapter, in order to be forwarded to the Server.
Note, however, that the Data Adapter sends updates to the Server always one at a time, through calls to the "update" method (although multiple updates can be sent at the same time from different threads).
So, if your Data Adapter receives two bunches of updates all pertaining to the same item and starts two loops of calls to the "update" method,
then the Data Adapter is responsible for issuing each single "update" call in the correct order;
if two "update" calls for the same item are invoked concurrently, their ordering is not predictable.
In your case, I suppose that the bunches of updates pertain to various keys of a single item in COMMAND mode.
In this case, the general rule is relaxed and only holds at key level:
For each key, the order of the updates is determined by the order in which "update" is invoked (whereas, for concurrent invocations, the order is not predictable).
On the other hand, updates pertaining to different keys are not ordered: Lightstreamer will just try to send updates for all keys in a fair way.