-
September 23rd, 2011, 10:39 PM
#1
How does Lightstreamer handle multiple large updates?
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!
-
September 26th, 2011, 09:18 AM
#2
Hi,
actually Lightstreamer can be configured to do whatever you prefer
This depends on the subscription mode (RAW, MERGE, DISTINCT or COMMAND) and on some configurations (e.g.: <max_delay_millis>)
I suggest to take a look to the Lightstreamer/DOCS-SDKs/General Concepts.pdf file to understand the differences between the different modes and then to take a look to the server configuration file to see how the server can be tweaked even more.
If you have any doubt you can write it here.
HTH
-
September 26th, 2011, 04:38 PM
#3
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!
-
September 27th, 2011, 08:56 AM
#4
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.
Similar Threads
-
By PeterHiross in forum Client SDKs
Replies: 3
Last Post: November 16th, 2011, 09:42 AM
-
By GarrettMackey in forum General
Replies: 2
Last Post: October 20th, 2011, 01:11 PM
-
By jonasby in forum Client SDKs
Replies: 2
Last Post: June 17th, 2011, 09:21 AM
-
By lwyic in forum General
Replies: 1
Last Post: July 28th, 2010, 10:15 AM
-
By viknight in forum Client SDKs
Replies: 3
Last Post: September 4th, 2009, 09:02 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
All times are GMT +1. The time now is 03:25 AM.
Bookmarks