Hello,
Can I create two sessions connect to two metadata adapters at the same time on IPhone? Will it produce conflict?
Thanks!
Best Regards,
Stephen Lam
Printable View
Hello,
Can I create two sessions connect to two metadata adapters at the same time on IPhone? Will it produce conflict?
Thanks!
Best Regards,
Stephen Lam
Hi,
Each Lightstreamer session is bound to an Adapter Set, which comprises a single Metadata Adapter and one or more Data Adapters.
Usually, a single Metadata Adapter should be able to govern gloval user's authentication and the fine-grained permissioning for each Data Adapter subscriptions. Why should you need to access multiple Metadata Adapters? In any case, you can do that by creating two different sessions with two different Adapter Sets.
Dear Alessandro,
Thanks for your reply. We have two kind of data. Some data allow user access unlimitedly. Some data need to count usage time and want to bind it to a separate metadata adapter for generate CDR. Do you think this is a good approach?
Best Regards,
Stephen Lam
If you don't have to face client-side restrictions on the number of sockets that can be simultaneously open,
and using a single session for your application is awkward,
then you can make use of multiple sessions and multiple Adapter Sets.
However, if you just need to deserve different processing to different items based on the item names only,
then doing that with a single Metadata Adapter may turn out to be simple enough to stick to the classical one-session approach.
Note that different Adapter Sets must run different Data Adapters;
if any data is in common, they can include some Data Adapters in common, but distinct instances will be run.
I agree multiple Metadata Adapters will complicate the architecture. As we have to log time consumption per user on some data. For single Metadata Adapter approach, How can we differentiate which client is subscribed which data adapter?Quote:
However, if you just need to deserve different processing to different items based on the item names only,
then doing that with a single Metadata Adapter may turn out to be simple enough to stick to the classical one-session approach.
I'm not sure I understand the details.
Do you mean that you have two separate Data Adapters
and that you need to measure time consumption for all the items supplied by the first Data Adapter and only for them?
In this case, admittedly, if you define a single Adapter Set which includes both Data Adapters, you will incur in a Metadata Adapter interface limitation.
In fact, the Metadata Adapter is notified about the beginnig and the ending of the subscription of each item and the involved user name is also supplied;
but only the item names are supplied, not the related Data Adapter IDs.
Hence, if you can distinguish the two sets of items based on the item names only,
then you can treat them in different ways in a common Metadata Adapter;
otherwise, things would become complicated with the single Metadata Adapter approach too.