Results 1 to 10 of 13

Hybrid View

  1. #1
    Power Member
    Join Date
    Sep 2013
    Location
    Coimbatore
    Posts
    121
    Hello,
    Could you please clarify in data structure in the second point how to I have to change the structure for clients rates.

  2. #2
    Administrator
    Join Date
    Feb 2012
    Location
    Milano
    Posts
    716
    In vb there is some system utilities (this for example) that help to serialize and deserialize from json to a common collection object, such a Dictionary, or a List, ...
    In this case you could keep up to date a dictionary with the updates received by the server and serialize to a json for display if that helps.

    Regards,
    Giuseppe

  3. #3
    Power Member
    Join Date
    Sep 2013
    Location
    Coimbatore
    Posts
    121
    Hello,
    Now I have created structure like this,
    [{"com_id":"33","com_name":"GOLD BAR","selling_rate":"4952","buying_rate":"-","delivery":"30-06-2020","retail_rate":"-","client":"lmxtrade","client_com_id":"lmxtrade_33"},{"com_id":"36","com_name":"GOLD FT","selling_rate":"4952","buying_rate":"4751","de livery":"30-06-2020","retail_rate":"-","client":"lmxtrade","client_com_id":"lmxtrade_36 "},{"com_id":"37","com_name":"GOLD RTGS","selling_rate":"4852","buying_rate":"-","delivery":"30-06-2020","retail_rate":"-","client":"lmxtrade","client_com_id":"lmxtrade_37"},{"com_id":"38","com_name":"SILVER","selling_rate ":"48955","buying_rate":"48428","delivery":"30-06-2020","retail_rate":"-","client":"lmxtrade","client_com_id":"lmxtrade_38"},{"com_id":"33","com_name":"GOLD CBE RTGS ","selling_rate":"4943","buying_rate":"4831","deli very":"30-06-2020","retail_rate":"-","client":"kkvtrade","client_com_id":"kkvtrade_33 "},{"com_id":"36","com_name":"GOLD FT","selling_rate":"4943","buying_rate":"4841","de livery":"30-06-2020","retail_rate":"-","client":"kkvtrade","client_com_id":"kkvtrade_36"},{"com_id":"37","com_name":"GOLD RTGS","selling_rate":"4843","buying_rate":"4941"," delivery":"30-06-2020","retail_rate":"-","client":"kkvtrade","client_com_id":"kkvtrade_37 "},{"com_id":"38","com_name":"SILVER","selling_rat e":"48455","buying_rate":"48428","delivery":"30-06-2020","retail_rate":"-","client":"kkvtrade","client_com_id":"kkvtrade_38 "}]
    wlclientrates : "[{\"com_id\":\"33\",\"com_name\":\"GOLD BAR\",\"selling_rate\":\"4952\",\"buying_rate\":\"-\",\"delivery\":\"30-06-2020\",\"retail_rate\":\"-\",\"client\":\"lmxtrade\",\"client_com_id\":\"lmx trade_33\"},{\"com_id\":\"36\",\"com_name\":\"GOLD FT\",\"selling_rate\":\"4952\",\"buying_rate\":\"4 751\",\"delivery\":\"30-06-2020\",\"retail_rate\":\"-\",\"client\":\"lmxtrade\",\"client_com_id\":\"lmx trade_36\"},{\"com_id\":\"37\",\"com_name\":\"GOLD RTGS\",\"selling_rate\":\"4852\",\"buying_rate\":\ "-\",\"delivery\":\"30-06-2020\",\"retail_rate\":\"-\",\"client\":\"lmxtrade\",\"client_com_id\":\"lmx trade_37\"},{\"com_id\":\"38\",\"com_name\":\"SILV ER\",\"selling_rate\":\"48955\",\"buying_rate\":\" 48428\",\"delivery\":\"30-06-2020\",\"retail_rate\":\"-\",\"client\":\"lmxtrade\",\"client_com_id\":\"lmx trade_38\"},{\"com_id\":\"33\",\"com_name\":\"GOLD CBE RTGS \",\"selling_rate\":\"4943\",\"buying_rate\":\"483 1\",\"delivery\":\"30-06-2020\",\"retail_rate\":\"-\",\"client\":\"kkvtrade\",\"client_com_id\":\"kkv trade_33\"},{\"com_id\":\"36\",\"com_name\":\"GOLD FT\",\"selling_rate\":\"4943\",\"buying_rate\":\"4 841\",\"delivery\":\"30-06-2020\",\"retail_rate\":\"-\",\"client\":\"kkvtrade\",\"client_com_id\":\"kkv trade_36\"},{\"com_id\":\"37\",\"com_name\":\"GOLD RTGS\",\"selling_rate\":\"4843\",\"buying_rate\":\ "4941\",\"delivery\":\"30-06-2020\",\"retail_rate\":\"-\",\"client\":\"kkvtrade\",\"client_com_id\":\"kkv trade_37\"},{\"com_id\":\"38\",\"com_name\":\"SILV ER\",\"selling_rate\":\"48455\",\"buying_rate\":\" 48428\",\"delivery\":\"30-06-2020\",\"retail_rate\":\"-\",\"client\":\"kkvtrade\",\"client_com_id\":\"kkv trade_38\"}]"
    here client_com_id will be unique for every clients. Can you please help me on the logic to connect the client and serve only respected clients rates. Here in this list will be having all the clients rates. Is this possible to connect the client who is passing the client name with request and send represent client data from server.

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

    The scenario you described requires a personalized Item. I mean that each user subscribes to a specific Item reserved to the specific user.
    The Item name could be the client_com_id itself, if the client knows it this makes things easy; otherwise you have to make a customization in the Metadata Adapter (getItem method).

    Then in the adapter when you parse the json, for each element you first check the client_com_id, and then you will update the personalized Item with Command mode 'ADD', 'UPDATE', or 'DELETE' depending on the com_id.

    Please let us know if you need any further clarifications.

    Regards,
    Giuseppe

  5. #5
    Power Member
    Join Date
    Sep 2013
    Location
    Coimbatore
    Posts
    121
    Hello,
    Need to subscribe set of items, in this above json list "client":"lmxtrade", this lmxtrade will be send from client this have to connect with LS server and need to server lmxtrade list, this list will have n number of row.

 

 

Similar Threads

  1. how many server adapter are created?
    By josephpanchal in forum General
    Replies: 1
    Last Post: October 21st, 2019, 09:35 AM
  2. Creating adapter for dynamic stock list
    By rvkvino in forum General
    Replies: 1
    Last Post: February 14th, 2017, 09:22 AM
  3. how many server adapter are created?
    By brunovaghi in forum General
    Replies: 1
    Last Post: September 30th, 2016, 08:58 AM
  4. Snapshot in Remote Data Adapter
    By Dejan Milosevic in forum Adapter SDKs
    Replies: 5
    Last Post: July 31st, 2014, 03:06 PM
  5. Add dynamic data in Server and update it to Client
    By giangum in forum Client SDKs
    Replies: 1
    Last Post: September 1st, 2009, 09:20 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 01:46 PM.