Results 1 to 2 of 2

Hybrid View

  1. #1
    Power Member
    Join Date
    Sep 2013
    Location
    Coimbatore
    Posts
    121

    LS server send multiple data to client based on user group

    I have large size users and grouped with some names like Group-A, Group-B etc. Group created dynamically. Now I'm serving the stock data simple to all users. Now I need to serve data to users based on their group. From client, I can send user group name to server after user logged in. I have to process base data and calculate differences in stock rates based on groups and send final result to respected groups.

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

    You should leverage the getItems method of Metadata Adapter. Indeed in this method you can customize the Items in order to specialize the data according to the user.

    "Another typical case is when the same Item has different contents depending on the User that is issuing the request. On the Data Adapter side, different Items (one for each User) can be used; nevertheless, on the client side, the same name can be specified in the subscription request and the actual user-related name can be determined and returned here."

    So, matching information about the user you can change the name of the Item to a specific one (please note that the name of the Item is the third parameter, group), your getItems implementation should look like something like this:
    1. check the user and retrieve information of the group to which it belongs;
    2. concatenate the name of the item with th name of the specific group;
    3. return the new Item name.


    Them in the Data Adapter, for every update you should calculate different rates for different user groups and push to Lightstreamer server several updates,

    Regards,
    Giuseppe

 

 

Similar Threads

  1. Send data from DataAdapter based on user/sessionID
    By gal_nitzan in forum Adapter SDKs
    Replies: 1
    Last Post: February 12th, 2013, 10:16 PM
  2. How to send data to single client rather than all?
    By kpturner in forum Adapter SDKs
    Replies: 18
    Last Post: December 10th, 2012, 08:03 PM
  3. Push data based on url parameter
    By semua60 in forum Client SDKs
    Replies: 3
    Last Post: February 23rd, 2011, 11:12 AM
  4. How to send params from client to server
    By kanibal210 in forum Client SDKs
    Replies: 1
    Last Post: September 30th, 2009, 09:36 AM
  5. General data and User specific data
    By mnenchev in forum Adapter SDKs
    Replies: 5
    Last Post: September 1st, 2009, 10:36 AM

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 09:33 AM.