...
ID | IEP-50 |
Author | |
Sponsor | |
Created | |
Status | Status |
---|
| |
---|
colour | Green |
---|
title | DRAFTCOMPLETED |
---|
|
|
Motivation
...
- Cache update listener: while query is active, client receives events. Server → Client notification mechanism already exists for that (see IEP-42 Thin client: compute supportClient Compute).
- (Optional) Remote filter
...
Name | Code |
---|
OP_QUERY_CONTINUOUS | 2006 |
OP_QUERY_CONTINUOUS_EVENT_NOTIFICATION | 2007 OP_QUERY_CONTINUOUS_END_NOTIFICATION | 2008 |
OP_QUERY_CONTINUOUS starts the query.
Existing OP_RESOURCE_CLOSE stops the query using the id provided in the OP_QUERY_CONTINUOUS response message.
OP_QUERY_CONTINUOUS
...
OP_QUERY_CONTINUOUS message format
Request |
---|
int | cacheId |
byte | flags: standard cache flags, see ClientCacheRequest. Only KEEP_BINARY is applicable to Continuous Query. When KEEP_BINARY is set, the filter should receive key/val in binary form. |
int | bufferSize (see AbstractContinuousQuery, default 1) |
long | timeInterval (see AbstractContinuousQuery, default 0) |
bool | includeExpired (see AbstractContinuousQuery, default false) |
BinaryObject | filter |
byte | filterPlatform (see ClientCacheScanQueryRequest, 1= Java, 2 = .NET) (when filter is not null) |
...
int | event count |
n * CacheEntryEvent |
BinaryObject | key | BinaryObject | old value | BinaryObject | value | byte | event type (0 = CREATED, 1 = UPDATED, 2 = REMOVED, 3 = EXPIRED) |
|
OP_QUERY_CONTINUOUS_END_NOTIFICATION message format
...
Risks & Assumptions
- Flow control & backpressure: We assume no special flow control and rely on GridNioServer to handle "slow client, fast server" scenario.
- Fault tolerance: Initial implementation does not provide failover in case when server node that holds the query goes down or client connection fails. It is up to specific client implementation to notify user code about the connection loss (for example, by providing special CacheEntryEvent instance that throws an exception from all members).
...
Tickets
Jira |
---|
server | ASF JIRA |
---|
columns | key,summary,type,created,updated,due,assignee,reporter,priority,status,resolution |
---|
maximumIssues | 20 |
---|
jqlQuery | labels=iep-50 |
---|
serverId | 5aa69414-a9e9-3523-82ec-879b028fb15b | key | IGNITE-13148 |
---|
|