Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Proposed notification format:

Notification
longResource ID (task ID, continuous query ID, etc)
short

Message flags. Bitwise OR operation of following options:

0x0001 Error flag

0x0004 Notification flag (should always be set for notifications)

shortNotification operation code
intError code (if error flag is set)
stringError message (if error flag is set)
...Notification payload (if error flag isn't set)

Operation codes

New request type should be added to start a new task:

...

Code Block
languagejava
titleClientCompute
public interface ClientCompute {
    public ClientClusterGroup clusterGroup();
    // Sync and async task execution methods.
    public <T, R> R execute(String taskName, @Nullable T arg) throws ClientException, InterruptedException;
    public <T, R> ClientFuture<R> executeAsync(String taskName, @Nullable T arg) throws ClientException;
    // Sync and async affinity execution methods, task will be routed to affinity node if partition awareness is enabled.
    public <T, R> R affinityExecute(String cacheName, Object affKey, String taskName, @Nullable T arg)
        throws ClientException, InterruptedException;
    public <T, R> ClientFuture<R> affinityExecuteAsync(String cacheName, Object affKey, String taskName, @Nullable T arg)
        throws ClientException;
    // ClientCompute modificators.
    public ClientCompute withTimeout(long timeout);
    public ClientCompute withNoFailover();
    public ClientCompute withNoResultCache();
}

...

Code Block
languagejava
titleClientFuture
public interface ClientFuture<R> {
    public R get() throws ClientException, CancellationException, InterruptedException;
    public R get(long timeout, TimeUnit unit) throws ClientException, TimeoutException, InterruptedException;
    public boolean isDone();
    public boolean cancel() throws ClientException;
    public boolean isCancelled();
}

Risks and Assumptions

...

If blocking IO is used (as in java thin client, for example) it's impossible to implement async operations without dedicated for each channel thread to process incoming messages. So, the count of threads on the client-side will be increased and can be raised dramatically if partition awareness functionality with a lot of server connections is used.

Discussion Links

http://apache-ignite-developers.2346864.n4.nabble.com/Thin-client-compute-support-td44405.html

...