Results 1 to 8 of 8

Hybrid View

  1. #1
    Member
    Join Date
    May 2010
    Location
    Belgaum
    Posts
    9

    Snapshot

    Thanks for reply..

    Can i set the custom snapshot (set of data as snapshot) from DataAdapter ??

  2. #2
    Power Member
    Join Date
    Jul 2006
    Location
    Cesano Maderno, Italy
    Posts
    784
    Hi,

    you always send the initial snapshot events from the data adapter through the update/smartUpdate methods of the ItemEventListener you receive with each subscribe call on your DataProvider, setting the isSnapshot boolean to true.
    Did you mean something different?

  3. #3
    Member
    Join Date
    May 2010
    Location
    Belgaum
    Posts
    9
    Hi Mone,
    ya we can set the initial snapshot(static data form DB) for each subscribe call...
    But as per my understanding if same item is subscribed by more than one client at a time, the subscribe method in DataAdapter will be called only once(for first client) by lightstreamer kernel, subsequent client request will be handled by lightstreamer kernel itself, call will not go to subscribe method of Data adpter.In this case subsequent clients will not receive snapshot data. so how to pass the initial snapshot(static data from db)to the subsequent clients.

    and every client should be able to see same set of data initially..

  4. #4
    Power Member
    Join Date
    Jul 2006
    Location
    Cesano Maderno, Italy
    Posts
    784
    as you said, from the second client subscribing to a certain item on, the initial snapshot will be handled by the kernel, so you don't have to prepare the initial snapshot for such clients.
    The server will keep a snapshot that will be getDistinctSnapshotLength long and will give it to any new client subscribing to such item.
    Each time a new real-time update is published for the item, the server will update the snapshot, removing (if necessary) the oldest update and adding the new one.

    So, you don't need to send by yourself the initial snapshot to all the clients.

 

 

Similar Threads

  1. Replies: 3
    Last Post: February 18th, 2010, 11:14 PM
  2. Replies: 1
    Last Post: September 18th, 2009, 09:13 AM
  3. Replies: 1
    Last Post: August 20th, 2009, 08:47 AM
  4. "item already contains key" message
    By ddhanis in forum Adapter SDKs
    Replies: 1
    Last Post: December 6th, 2007, 08:50 AM
  5. Unexpected snapshot event for MERGE
    By churrusco in forum General
    Replies: 2
    Last Post: May 4th, 2007, 03:19 PM

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 04:50 AM.