Results 1 to 5 of 5
  1. #1
    Member
    Join Date
    Nov 2006
    Location
    Belfast
    Posts
    15

    StockListDemo (sync on different windows)

    Hi

    I am investigating use of your product for potential deployment in my company. I set up the demo app on my local evaluation lightstreamer server and opened 2 windows to view the table updates. They seem out of sync, especially 'Exacktum Systems' row.

    Why would this happen? Is it an issue with the server or the javascript vm not able to handle 2 'busy' browser windows in a timely fashion?

    I am using IE 6, which takes up 10-20% cpu time when viewing the stock demo (is this normal?).

    thanks for any help (hope it's not in the wrong place!)

  2. #2
    Administrator
    Join Date
    Jul 2006
    Location
    Milan, Italy
    Posts
    517
    Quote Originally Posted by CitiMan
    I set up the demo app on my local evaluation lightstreamer server and opened 2 windows to view the table updates. They seem out of sync, especially 'Exacktum Systems' row. Why would this happen? Is it an issue with the server or the javascript vm not able to handle 2 'busy' browser windows in a timely fashion?
    That is the demonstration of a desired behavior, as explained in the launch page (http://www.lightstreamer.com/stockListDemo.htm):

    if you open the same demo in different browser windows you will see slightly different values for the most updated stocks (e.g. "Ations Europe"). This behavior shows how the data resampling is done in real-time on a per-window basis (e.g. click on the stock names to open pop-up windows that display real-time streaming charts. Notice that the maximum update frequency set for the pop-up windows is greater than the frequency set for the main window. The data is resampled by Lightstreamer Server accordingly with the maximum frequency requested by each table. You can easily notice that if you open "Ations Europe").

    So this behavior shows the dynamic data conflation operated by Lightstreamer Server on a client basis (due to frequency allocation, bandwidth allocation and congestion control). If neededm it is possibile to write applications that keep the data in sync.

    Quote Originally Posted by CitiMan
    I am using IE 6, which takes up 10-20% cpu time when viewing the stock demo (is this normal?).
    On the Client side, only JavaScript code is executed. The CPU usage depends on three elements: the browser employed (e.g. Firefox is much more efficient than IE); the number of updates per second that are received; the way the updates are displayed (i.e. through what kind of HTML(AJAX widgets, with what graphical effect, etc.). On a 3 GHz Pentium 4, the standard StockList Demo can consume between 5% and 15% of the CPU. The same demo on the same machine with Firefox will consume much less CPU.

  3. #3
    Member
    Join Date
    Nov 2006
    Location
    Belfast
    Posts
    15
    Thanks for your response.

    Re the update fequency issue, I have read the blurb on the launch page too but still do not understand fully. Ok the pop-up window frequency is different from the main window, so their displays can be different.

    But can you offer a step-by-step explanation of why the same page in two separate windows on the same client will differ?

    Also how difficult is it to implement an application that keeps data in sync, ie what does the workaround involve?

  4. #4
    Administrator
    Join Date
    Jul 2006
    Location
    Milan, Italy
    Posts
    517
    Quote Originally Posted by CitiMan
    But can you offer a step-by-step explanation of why the same page in two separate windows on the same client will differ?
    1) Let's suppose that there are two Lightstreamer clients (e.g. two browsers connected to the same web application), both of which have subscribed to the MSFT symbol in order to receive real-time prices. They subscribed to that item requesting a maximum update frequency of 1 update/s.

    2) Let's suppose that the data feed during some intense market activity generates 30 prices in a second for symbol MSFT.

    3) The data needs to be resampled. Lightstreamer Server contains two stages of data filtering, that are fully customizable. The first stage is a pre-filter, that can be configured to lower the update frequency of the updates for all the push sessions. The second stage is a filter that works on a per-user basis. This second filter can resample the data based on many variables (maximum frequency, maximum bandwidth, network congestions, etc.). In the StockList Demo the pre-filter is not used and the second filter is configured with the same frequency for all the users. Why two different clients will see different samples? Because the histories of data sampling for the sessions are independent one another.

    Example. I'll show only one of the several reasons for which the data will be different for each client.

    The data series is the following:
    - time 0.10 -> 7.25
    - time 0.78 -> 7.60
    - time 1.23 -> 8.45
    - time 1.47 -> 9.25

    Client A subscribes to that item with a max frequency of 1 update/sec. It subscribes at time 0.08 so it will receive: 7.25, 8.45.

    Client B subscribes to that item with a max frequency of 1 update/sec. It subscribes at time 0.5 so it will receive: 7.60, 9.25.

    Quote Originally Posted by CitiMan
    Also how difficult is it to implement an application that keeps data in sync, ie what does the workaround involve?
    As I mentioned, data filtering in Lightstreamer is complex feature that can be fully configured, in order to obtain any kind of behavior. You should decide exactly what behavior you expect. For example: you want that different clients see the exact same data at any time? To do this you can: pre-filter the data; or increase the buffer-size of the per-user filters. If you want that the same client displays the same item in different tables (or windows of the same application) keeping the dtaa in sync, then the client should subscribe to that item once and use the received updates to populate more cells in the screen.

  5. #5
    Member
    Join Date
    Nov 2006
    Location
    Belfast
    Posts
    15
    Great answers!

 

 

Similar Threads

  1. Sync Errors
    By wwatts in forum Client APIs
    Replies: 1
    Last Post: February 20th, 2012, 10:14 AM
  2. Sync Errors
    By colmfield in forum Client APIs
    Replies: 2
    Last Post: September 22nd, 2010, 10:06 AM
  3. Problem with StockListDemo via Apache.
    By cfalcone in forum Client APIs
    Replies: 1
    Last Post: July 10th, 2008, 03:19 PM
  4. Replies: 5
    Last Post: February 12th, 2008, 04:00 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 04:45 PM.