Results 1 to 8 of 8

Hybrid View

  1. #1
    Administrator
    Join Date
    Feb 2012
    Location
    Milano
    Posts
    716
    Hi Megabyzus,

    Actually in the Grid example (https://demos.lightstreamer.com/GridDemo/) the list of elements displayed by the grid is not static but changes dynamically based on user interaction.
    Incidentally since it is a very basic example, the list of Items that can be viewed is hard-coded in the client but this is not the decisive point.
    The precondition for using this option is that the single client (or user) is able to independently determine the list of Items even when it changes over time.

    But if the changes are caused by external sources and therefore must somehow be communicated to the client, then the approach with the COMMAND mode is preferable.
    It allows the server (more precisely the adapter) to collect all the events that modify the list of items to be subscribed, keep this list updated and in turn update all the affected clients.

    Please also note that as an alternative to COMMAND mode it can be managed in a more basic way through a new Item in MERGE mode that simply publishes the updated list of Items to be subscribed.
    Then the client has to manage the subscriptions; all work that with a subscription in COMMAND mode is done out of the box.

    Regards,
    Giuseppe

  2. #2
    Giuseppe, many thanks.

    I'm still a bit unclear. To reiterate, multiple users will be working on the same ng-grid. Can you explicitly clarify the following?:

    - What's special about the viewport (ng-grid in our case)? For conversation's sake, let's imagine we haven't determined the list we get is static or dynamic. Regardless of either choice, why do we care about managing subscriptions on items displayed in the viewport? Why can't we manage subscription on items that the ng-grid contains (rather what's in the viewport)? In other words, why not unsubscribe from previous list and subscribe to the updated one? In the case of the static list there's only one initial subscription and that's it Why not?.

    - what is the performance impact on the client repeatedly subscribing/unsubscribing/subscribing to updated lists?

    - I'm looking at your ng-grid demo example here. I see MERGE subscription mode is used. Why wasn't COMMAND used? Why not DISTINCT? I'm still unclear on what the subscription mode differences are. The documentation is not clear to me. What is a good series of examples that clearly differentiate those use cases?

    - is the ng-grid list above static or dynamic? I don't see any unsubscribes...

    - what is a good example on a grid that is updated simultaneous by multiple users?

    Again, thanks!
    Last edited by Megabyzus; January 28th, 2022 at 01:20 PM.

  3. #3
    Administrator
    Join Date
    Feb 2012
    Location
    Milano
    Posts
    716
    Hi Megabyzus,

    - Yes you are right. Any consideration regarding the viewport or the widgets chosen for display should be independent from the choices regarding the mode and the handling of subscribing requests.
    These should only be driven by the data model of your application.

    - Continuous subscribe and unsubscribe requests can have an impact in terms of load both on the client side and on the server side.
    Whether it can still be a sustainable workload depends on the frequency for each user and on the total load on the server which also depends on the number of connected clients.
    But to properly assess this situation you should do some load tests in a scenario as close as possible to what you expect in the production.

    - StockList is the perfect example for MERGE mode; as well as Portfolio for COMMAND mode and Chat for DISTINCT mode.
    But please consider that any specific use case can better suit a mode or another based on particular needs.
    So it is necessary to understand well the peculiarities of each subscription mode as described in the "3.2 Data Model and Subscription Modes" paragraph of General Concepts documentation.

    - in the example above the list of subscribed items is static.

    - PortfolioDemo you can open the demo from different tabs/browsers and modify the list of subscribed stocks concurrently.

    Regards,
    Giuseppe

  4. #4
    Giuseppe, many thanks. For a shared collaborative grid what subscription mode do you believe is suited best and why?

  5. #5
    Administrator
    Join Date
    Feb 2012
    Location
    Milano
    Posts
    716
    Hi Megabyzus,

    As I said in previous posts you can choose between various implementation options, but in general I think that COMMAND mode is to be preferred in this scenario.
    In fact, this mode allows you to automatically keep updated all the clients with the changes in the list of items to be displayed.
    Please consider this scenario where each client can autonomously make changes to the grid, also to add or remove a row, and communicate these changes to the adapter through for example a sendmessage.
    At this point the adapter processes the changes, updates its internal state and produces the proper commands (in terms of ADD, DELETE, or UPDATE) to be forwarded in order to synchronize all the other clients.

    Please let me know if this is something applicable to your use case.

    Regards,
    Giuseppe

 

 

Similar Threads

  1. File Logger - LS client and server subscriptions
    By rajesh.palanisamy in forum General
    Replies: 1
    Last Post: April 20th, 2018, 09:41 AM
  2. Demo of Lightstreamer and JQuery Grid Plugin
    By Alessandro in forum Client SDKs
    Replies: 1
    Last Post: May 10th, 2012, 12:20 PM
  3. Adding or Removing Subscriptions
    By subuta in forum Client SDKs
    Replies: 4
    Last Post: December 27th, 2011, 03:03 PM
  4. .NET Client Multiple Subscriptions
    By wwatts in forum Client SDKs
    Replies: 4
    Last Post: February 16th, 2010, 08:58 AM
  5. Simple Grid Demo Released
    By Alessandro in forum Client SDKs
    Replies: 0
    Last Post: November 24th, 2006, 03:49 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 03:52 PM.