-
January 3rd, 2022, 05:10 PM
#6
If you can get the current quotation of a symbol upon page load from your application server and then the page immediately subscribes to the symbol through Lightstreamer Client library to get the updates, this may be enough in most cases.
There is only the risk of missing an update occurring during this short interval. In this case, until the next update comes, the data on the page would be outdated. In practice, the consequences would be worse for slow symbols, but for them the probability of this to happen would be low.
If this risk is acceptable, then this would keep the Data Adapter code simple (in particular, the Data Adapter could answer false to the isSnapshotAvailable() callback).
Otherwise the Data Adapter, upon each subscribe() invocation, should also take care of obtaining from the feed the current stock price. This may involve some REST call, but the frequency of these calls would be much lower than in a polling strategy: it would be needed only upon page load and, whenever many clients should request the same item at the same time, only for the first one.
Similar Threads
-
By renenucci in forum Client SDKs
Replies: 1
Last Post: April 3rd, 2020, 09:03 AM
-
By lidanh in forum General
Replies: 12
Last Post: December 31st, 2014, 11:18 AM
-
By cwt237 in forum Client SDKs
Replies: 3
Last Post: September 25th, 2013, 09:24 AM
-
By darch in forum General
Replies: 0
Last Post: March 15th, 2013, 06:24 PM
-
By shabbirh in forum Client SDKs
Replies: 5
Last Post: November 7th, 2012, 09:26 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 04:11 AM.
Bookmarks