Results 1 to 2 of 2
  1. #1
    Member
    Join Date
    Jul 2007
    Location
    Hanoi
    Posts
    4

    Stock List Adapter

    Hi,
    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.
    Thanks

  2. #2
    Administrator
    Join Date
    Jul 2006
    Location
    Milan
    Posts
    975
    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, 04:46 PM
  2. adapting the stock demo adapter
    By mrwonderfulone@gmail.com in forum Adapter APIs
    Replies: 3
    Last Post: January 19th, 2012, 09: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, 12:39 PM
  4. Unexpected empty selected list
    By shreyaspurohit in forum Adapter APIs
    Replies: 4
    Last Post: April 14th, 2009, 11:38 AM
  5. Returning dynamic list of stockItems
    By rsouissi in forum Adapter APIs
    Replies: 7
    Last Post: December 11th, 2006, 10:26 AM

Bookmarks

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 09:14 AM.