Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Update JIRA link to use label

...

IDIEP-50
Author
Sponsor
Created

 

Status

Status
colourGreen
titleDRAFTCOMPLETED


Table of Contents

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
  • (Optional) Initial query: Sql or Scan

Remote Filter is a BinaryObject:

...

ContinuousQueryWithTransformer is out of scope: it is a separate class, and should have a separate client operation.

Initial Query functionality is excluded intentionally, it does not bring value due to lack of guarantees - see dev list threads linked below.

Operation codes

Name

Code

OP_QUERY_CONTINUOUS2006

OP_QUERY_CONTINUOUS_EVENT_NOTIFICATION

2007

OP_QUERY_CONTINUOUS starts the query.

Existing OP_RESOURCE_CLOSE should be used to stop stops the continuous query using the id provided in the OP_QUERY_CONTINUOUS response message.

...

filterPlatform (when filter is not null)partition (-1 for no partition)

when initialQueryType == 2 (SQL)

bool
Request
intcacheId
byteflags: 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.
intbufferSize (see AbstractContinuousQuery, default 1)
longtimeInterval (see AbstractContinuousQuery, default 0)
boolincludeExpired (see AbstractContinuousQuery, default false)
BinaryObjectfilter
bytefilterPlatform (see ClientCacheScanQueryRequest, 1= Java, 2 = .NET) (when filter is not null)byteinitialQueryType (0 = NONE, 1 = SQL, 2 = SCAN) initialQuery (when initialQueryType > 0)

when initialQueryType == 1 (SCAN)

BinaryObjectfilter
byte
intpageSize
int
boollocal
stringschema
intpageSize
stringsql
intargument count
n * Objectarguments
distributed joins
boollocal
boolenforce join order
boolcolocated
boollazy
longtimeout, in milliseconds


Response
longcontinuousQueryId - used to retrieve initial query data and stop the query with OP_RESOURCE_CLOSE
intcolumnCount (when initial query is SQL)
n * stringcolumn names (when initial query is SQL)

...

_RESOURCE_CLOSE

...

Note: AbstractContinuousQuery.autoUnsubscribe should be always true for thin client continuous queries.

As a result of OP_QUERY_CONTINUOUS and until OP_RESOURCE_CLOSE is called, client should expect OP_QUERY_CONTINUOUS_EVENT_NOTIFICATION messages from the server:

...

Tickets


Jira
serverASF JIRA
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
maximumIssues20
jqlQuerylabels=iep-50
serverId5aa69414-a9e9-3523-82ec-879b028fb15bkeyIGNITE-13148