Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2007

    Stock List Adapter

    I got some problems when trying to modify the stock list demo adapter.
    1. How can I generate a new MyProducer if a new stock is listed without restarting lighstreamer server?
    2. How can I separate the market information (e.g. market index, market volume, ...) from stock information. Now each of MyProducer objects has to contain the same market information and pull to clients

    Please help me.

  2. #2
    Join Date
    Jul 2006
    If you feel that your scenario is very different than the StockListDemo one, you should rewrite your Data Adapter from scratch, rather than trying to amend our sample code.
    If you still want to make improvements to the sample StockListDemo code, please provide us with more details on the requested functionalities and we will try to give you some hints.

    About your points, from a broad perspective:

    1) Lightstreamer Server doesn't need to be restarted as soon as new items become available. However, if the Data Adapter refuses a "subscribe" request for an item (i.e. it throws a SubscriptionException) it caches the answer on the item until it has been unsubscribed by the same client. Hence, if the item, eventually, becomes available, new clients may still find it as unavailable.
    If you know that an unavailable item may become available, it may be better to accept the subscription and (temporarily) provide no data or an empty snapshot.
    The problem should disappear with the next major release of the software, where the item lifecycle management will be revised.

    2) You may choose to split an item into two items, in such a way that some fields pertain to the first item and the other fields pertain to the second item. Obviously, the clients, the Metadata Adapter and the Data Adapter should all be consistent with the choice. However, you cannot separate two fields into two distinct items if you need that the field values are always in sync (for instance, because you need to make real-time comparisons or compute real-time derived values from the two fields).



Similar Threads

  1. SSL certificate compatibility list
    By anselme in forum General
    Replies: 6
    Last Post: February 12th, 2013, 03:46 PM
  2. adapting the stock demo adapter
    By in forum Adapter SDKs
    Replies: 3
    Last Post: January 19th, 2012, 08:46 AM
  3. How to write my own stock list data adapter with java
    By pradeepgamage in forum General
    Replies: 1
    Last Post: January 9th, 2012, 11:39 AM
  4. Unexpected empty selected list
    By shreyaspurohit in forum Adapter SDKs
    Replies: 4
    Last Post: April 14th, 2009, 10:38 AM
  5. Returning dynamic list of stockItems
    By rsouissi in forum Adapter SDKs
    Replies: 7
    Last Post: December 11th, 2006, 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
All times are GMT +1. The time now is 11:34 PM.