rajesh.palanisamy
Hi,
My ADAPTER makes an REST API call to get the initial snapShot for each subscription in command mode, so basically my table items are pulled via API call for the client.
I wanted to do the standard mechanism how can the client be notified for any Data retrieval Failure cases. So that the Client(UI) can pull the initial snapShot data by making external call via DB/API etc.
My concern is to create a FAST-FAIL notification mechanism to the client so the data can be pulled by some other mechanisms.
I am looking something like a kind of OPTIONS request in HTTP - method allows the client to determine the options and/or requirements associated with a resource, or the capabilities of a server, without implying a resource action or initiating a resource retrieval.
Thanks
RAJESH
Giuseppe Corti
Hi Rajesh,
From a Lightstreamer server point of view any issue between the Data Adapter and the data source (your back-end) should be addressed at the application level.
This means that usually we suggests to add a specific Item(s) or specific field(s) to report status info about the health of data sources.
In the case of specific Items, you can choose between the simplest option with a single Item and single field for a generic problem alert, up to more complex solutions with an Item with a field for each Items subscribed by the client ot an Item in COMMAND mode with the exact list of all the issues occurring in real time.
However, in your case a simpler solution may be the addition of a specific flag field that inform the client about the failure of the snapshot retrieve operation.
So, as soon as the Data Adapter detects the REST API failure would push an update to the Lightstreamer server with only the status flag.
Depending if your COMMAND mode is a two-level or a simple one you should add the status field to the second level schema in the first case or the COMMAND schema in the latter case.
Please let us know if you need any further clarifications.
Regards,
Giuseppe