Results 1 to 4 of 4
  1. #1
    Member
    Join Date
    Apr 2007
    Location
    Omaha
    Posts
    2

    ScrollTable - Item persistance

    Hello,
    I'm using the scroll table with a simple Java adapter (socket server) for a basic alerting mechanism. Essentially, a person can telnet to the 'server' and send alerts to users via Lightstreamer. Is there a way for me to send the latest messages upon subscription (ie, user opens new browser or refreshes the current one).

    Thanks,
    Dave

  2. #2
    Administrator
    Join Date
    Jul 2006
    Location
    Milan, Italy
    Posts
    517
    Hi Dave,

    if you need to send the latest N messages when a user opens a new Lightstreamer session (subscribing to that item), you will simply have to use DISTINCT mode and specify the snapshot depth (how many rows should be sent as part of the initial snapshot, received after the subscription). Such configuration is done through the Metadata Adapter. For example, if you use the provided LiteralBasedProvider, you will have to include, within adapters.xml, the following element:

    Code:
    <param name="distinct_snapshot_length">20</param>
    in case N=20.

  3. #3
    Member
    Join Date
    Apr 2007
    Location
    Omaha
    Posts
    2
    I guess I'm curious about the architecture of this. Is this something LS should handle for me? Basically, remembering the last N items sent? and resending them when a new client subscribes? Or how do I send the items to the new client.

    Thanks,
    Dave

  4. #4
    Power Member
    Join Date
    Jul 2006
    Location
    Cesano Maderno, Italy
    Posts
    784
    dwrowe,
    you should send the snapshot (the latest alerts) any time the subscribe method of the DataProvider/SmartDataProvider is called.

    After then until there is at least one user subscribed to such item Lightstreamer will handle the snapshot for users asking that item on the basis of the updates received (and the declared length of course).

    take also a look to this thread: http://www.lightstreamer.com/vb/showthread.php?t=86

 

 

Similar Threads

  1. Replies: 2
    Last Post: December 24th, 2010, 07:51 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 06:43 PM.