January 31st, 2008, 05:35 PM
Flushing the LS cache
Is there way to flush the LS cache through a protocol command or other means?
We are planning to keep the data feeders stateless. So, if there is a failure in the feeder, we would like flush the LS snapshot cache. We are using the 'COMMAND' mode and want to make sure we don't go out of sync. in case of a failure.
February 1st, 2008, 02:49 PM
The snapshot kept by Lightstreamer Server for an item is cleared only when no more clients are subscribed to that item.
If snapshot management is not needed at all, then RAW mode could be used instead of COMMAND mode. On the other hand, if snapshot management is required, when a Data Adapter fails, it has two options: a) manage the data recovery, by sending the necessary updates to LS Server to keep a coherent snaoshot; b) call a failure to make the LS Server restart.
Lightstreamer Server 4.0 (not available soon) will feature complete item status management, with the possibility of marking individual items as stale and letting the system handle coherency.
In the meanwhile, some workarounds could be implemented with the client collaboration. For example, for each COMMAND-mode item, a status item could be associated. If the feeder for the COMMAND-mode item fails, it pushes a notification through the status item. As a consequence, the client will unsubscribe from the COMMAND-mode item and will resubscribe to it with a new name (e.g. appending an incremental number to the item name). This will provoke the unsubscription to the stale item, and the snapshot flush. At the same time, the Adapter will start serving that item from scratch under a different name.
April 19th, 2012, 09:58 PM
We are currently using 4.0 version of Lightstreamer and have a similar problem with how to handle failover of Data Adapters to prevent stale data that may have been deleted when the Data Adapter was down. You mentioned in your reply that "Lightstreamer Server 4.0 (not available soon) will feature complete item status management, with the possibility of marking individual items as stale and letting the system handle coherency". Could you provide more details on what is meant by this feature and provide references to applicable documentation or examples. By the way, we are using the .NET version of Lightstreamer with a client application.
Thanks in advance for the support.
April 21st, 2012, 03:55 PM
At the end, we did not release this feature as part of LS 4.0, due to higher priorities. It might be included in a subsequent release of LS 5.0 (such as 5.1). But if this feature is vital for you, as a customer please get back to firstname.lastname@example.org directly, so that we can talk about your use case and perhaps anticipate the feature implementation.