-
August 25th, 2008, 09:37 AM
#1
Hi Adam,
There are at least three ways to handle this with Lightstreamer, depending on how the bands of rate behave.
1) If you have a fixed number of bands, then you only need to dedicate a subset of fields (in the schema) to each band. Your Data Adapter will publish all the bands for each item. Your Client will subscribe to all the bands or only to those it is interested in.
2) If you have a variable and dynamic number of bands, the you need to use COMMAND mode. This way, your Data Adapter will publish updates on the available bands and your Client will keep the up-to-date state of all the bands and prices.
3) If the price/limit band depends on the specific user, you can leverage the customizeUpdate callback in the Metadata Adapter to dynamically change the price before sending it to the Client. But consider that this method in only available in Java-based Metadata Adapter and not in .NET ones (but you can still have a .NET Data Adapter and a simple Java Metadata Adapter to handle event customization).
Hope that helps.
Cheers,
Alessandro
-
August 25th, 2008, 12:16 PM
#2
Thanks for the reply. There may be variable bands, etc so I can't really use your first solution. I'll have a think about either 2 or 3, but I think for now I'm just going to have something that will take a List and convert it to a dictionary, and vice-versa. The idea being that I can basically store it as csv and then unpack it at the client side. For example:
myDict["myfield"] = "item1;item2;";
One of the problems that I have is that the bands potentially vary per update (they may not in reality, but...)
After I've got everything working I plan on changing this, though since I don't think it's a great solution.
Cheers,
Adam
-
August 26th, 2008, 09:42 AM
#3
OK Adam, probably COMMAND mode should do the trick.
Similar Threads
-
By hungtt in forum Adapter SDKs
Replies: 2
Last Post: December 24th, 2010, 07:51 AM
-
By jaguarg in forum Client SDKs
Replies: 1
Last Post: November 6th, 2008, 08:44 AM
-
By tstojano in forum Client SDKs
Replies: 1
Last Post: August 13th, 2008, 04:12 PM
-
By indrajit in forum Client SDKs
Replies: 1
Last Post: February 22nd, 2008, 08:41 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:30 PM.
Bookmarks