Alessandro Alinone
A Pre-Processor is created and used internally by Lightstreamer Server for each item and is independent on the user sessions. It manages the updates received from the Data Adapter before dispatching them to all the involved client-specific ItemEventBuffers. A Pre-Processor implements snapshot management and update-frequency Pre-Filtering for the related item. The behavior depends on the item subscription mode. Note that MERGE, DISTINCT and COMMAND subscription modes are exclusive; this means that all the clients have to subscribe the same item in the same way (or in RAW mode, which, on the other hand, can always be combined with the other modes).
Other Pre-Processor parameters can be set by Lightstreamer Server configuration. In particular, a Pre-Filter frequency can be set for items subscribed in MERGE or DISTINCT mode, in order to allow the Server to protect against very high update rates. For example, if the data feed produces 50 updates per second for a given item, but no user session will be allowed to receive more than 5 updates per second, then the data flow can be pre-filtered to 5 updates/second (this is done one time only, instead of doing it one time for each user session). Then each user session will be free to apply a second filtering frequency (e.g. 3 updates/second). Pre-filtering is accomplished by implementing the "getMinSourceFrequency" method in the Metadata Adapter, that is consulted by the Server for each item.