Otake
Hello,
I couldn't decide which forum section to post this message; apologize if this is not the proper one.
We have an entity that we are streaming to browsers by using LS and we decided to use 2 different adapters for this entity to save bandwith since some of its properties are changing rapidly but some are rarely changing and we didn't want to send more static values again and again with the frequent ones.
I feel that we have done some unnecessary work here and I wonder, if we have used a single adapter for this; would LS optimize bandwith for us by not sending the unchanged values? To confirm in detail:
1) Does LS send the unchanged values to browser. (I am pretty certain you don't)
2) In my data adapter implemenation, on an update on the frequent properties (after streaming all properties for the first time - snapshot), if I omit adding the unchanged values to the hashtable, would those values be retained in the LS cache to be streaming for the new subscribers?
Dario Crivelli
Points 1 and 2 address the two interfaces where management of unchanged values is advised.
2) Data Adapter to LS Server interface: unchanged values have a special treatment only in updates for items in MERGE and COMMAND mode (in the latter case, this only holds for the command==UPDATE case).
In this cases, unchanged field-value pairs can be omitted and the Server restores them internally and uses the correct values in updates and snapshots.
In the other cases, for field-value pair missing in the update, the value is considered as null for that update.
1) LS Server to Browser interface: this interface is internal to LS and it is managed in an optimized way.
In particular, sending unchanged values through the network is saved.
Then, on the Web Client Library to Application interface, the values for the unchanged fields are available.
Hence, you can try using a single item.
Anyway, it seems to me that you could have used two different items supplied by the same Data Adapter, without the need for using two Data Adapters.