Results 1 to 5 of 5
  1. #1
    Member
    Join Date
    Mar 2009
    Location
    Salò
    Posts
    6

    Same data, more update stategyes

    Hi all,
    I'm writing a financial app that should display some stock quotation.
    Users must logon to view the quotations and due to their type of contract they subscribed they can view some data in streaming live and other data in polling.
    I must have a single grid in my page that shows both types of data, it'd be cool both of them being updated by lightstreamer.
    One way could be that of writing one data-adapter per type of updates, so i'd only have to choose the right subscription. In the counter side I'd have more data adapters running for the same data.
    Another way could be that of managing this via a metadata-adapter, is this a more flexible way to achive what I need?

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

    You can definitely have a single Data Adapter for both the kind of subscriptions, as streaming and polling modes are handled by the Server directly. But in most cases the user cannot perceive any difference between streaming and polling, due to the highly optimized polling mechanism implemented by Lightstreamer. So I guess that by "polling" you mean something else, where the user can see a real difference in the quality of service.
    Can you please expand on your requirements?

  3. #3
    Member
    Join Date
    Mar 2009
    Location
    Salò
    Posts
    6
    Quote Originally Posted by Alessandro
    Hi,

    You can definitely have a single Data Adapter for both the kind of subscriptions, as streaming and polling modes are handled by the Server directly. But in most cases the user cannot perceive any difference between streaming and polling, due to the highly optimized polling mechanism implemented by Lightstreamer. So I guess that by "polling" you mean something else, where the user can see a real difference in the quality of service.
    Can you please expand on your requirements?
    As you guessed it's something concening the user experience.
    I have two policies regarding data updates in my JAVA EE application.
    The first one is a plain streaming policy, the user opens the page and the data start to stream as long as the page is being opened.
    The second one is a time restricted streaming policy, the user opens the page but the data starts to stream only if an action is performed by the user. After a certain amount of time the stream will be closed until the users performs the action again.
    Which policy will be applied rely on the type of subscription the customer buyed.
    Customers may buy some data with a policy and some data with the other one.
    The issue is: should a grid display data which may be updated with different policies, my app must update any item with right policy.
    Is this manageble via sessions and metadata-adapters?

  4. #4
    Administrator
    Join Date
    Jul 2006
    Location
    Milan
    Posts
    1,090
    You can have some items pushing for a predetermined time by playing on the subscription requests on an existing permanent session (which is also serving the continuously pushing items).
    Your page can leave the items unsubscribed, then perform "addTable" upon a user action and perform "removeTable" after a timeout.
    All you need is some protection mechanism on the server side, which prevents a user from getting continuous push from an item that is supposed to only supply temporary push, by subscribing to it from a fake client. This is not easy to do, but it is possible, leveraging on the Metadata and Data Adapters.
    However, this would not prevent a user from setting up a client which subscribes to the item at regular intervals.
    Do you think that this way is feasible?

  5. #5
    Member
    Join Date
    Mar 2009
    Location
    Salò
    Posts
    6
    I've got your point of view and it seems to fit very fine with what I was requested to do.
    As you guessed the real concern is how to detect a user who set up a client in order to have those items re-subscribed at regular intervals.
    I think it's enough for now, thank you very much.

 

 

Similar Threads

  1. update items with the same value
    By TehHector in forum Client SDKs
    Replies: 2
    Last Post: April 26th, 2011, 10:46 AM
  2. Add dynamic data in Server and update it to Client
    By giangum in forum Client SDKs
    Replies: 1
    Last Post: September 1st, 2009, 10:20 AM
  3. Update Table
    By EWANG in forum Client SDKs
    Replies: 1
    Last Post: August 19th, 2009, 11:17 AM
  4. Dojo 0.9 Update
    By rakeshxp in forum Client SDKs
    Replies: 1
    Last Post: August 27th, 2007, 12:42 PM
  5. order by update
    By jamesclinton in forum Client SDKs
    Replies: 1
    Last Post: March 12th, 2007, 05:54 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 11:35 AM.