Results 1 to 10 of 15

Hybrid View

  1. #1
    Thanks for response Giuseppe,
    We configured DEBUG as you recommended.
    We are going to monitor.
    It seems we had some problem with java script module pattern and subscription to LS events.

    Regarding another question.
    For example we want to know city population of Italy.
    So we subscribe:
    new Subscription("COMMAND", "Italy", cellList);
    and return items:
    Italy|Milano
    Italy|Roma
    Italy|Lanciano

    We want population per region, so we subscribe:
    new Subscription("COMMAND", "Abbruzzo", cellList);
    and return items:
    Abbruzzo|Aquila
    Abbruzzo|Lanciano


    When Lanciano has changes in population do we need to do:
    _listener.OnEvent("Italy", update[Lanciano], false)
    _listener.OnEvent("Abbruzzo", update[Lanciano], false)

    or
    it is better to subscribe at city level?
    new Subscription("COMMAND", "Milano", cellList);
    new Subscription("COMMAND", "Aquila", cellList);
    new Subscription("COMMAND", "Lanciano", cellList);
    new Subscription("COMMAND", "Roma", cellList);

    Best regards !

  2. #2
    Administrator
    Join Date
    Feb 2012
    Location
    Milano
    Posts
    716
    Hi Slavko,

    In your example, "Lanciano" is the same key of two different Items, "Italy" and "Abruzzo", subscribed in COMMAND mode. In this case if the value of any field of Lanciano updates you have to push the update for every Item that lists "Lanciano" in the set of own keys.

    So, in your example, the two commands

    are needed.

    But, in a case like this, you should consider the option to switch to the COMMAND mode with "two-level push". Please refer to the Portfolio Demo for a full example of implementation of "two-level push".
    In these cases, COMMAND mode is applied to stock portfolios, rather than city population of Italy, but the principle is the same (stock name <--> city name and price <--> population count). Please note that when a stock updates its price will need to send one single update to the server Lightstreamer,

    regardless of how many portfolios contain that stock.

 

 

Tags for this Thread

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 05:44 PM.