Skip to content

Add composable future support (next major release) #102

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
sharonovd opened this issue Dec 28, 2018 · 2 comments
Closed

Add composable future support (next major release) #102

sharonovd opened this issue Dec 28, 2018 · 2 comments
Assignees
Labels

Comments

@sharonovd
Copy link

sharonovd commented Dec 28, 2018

Java 8 introduced CompletableFuture - more powerful primitive, which allows to chain async operations in a non-blocking fashion using future.andThan.

It would be nice to have such possibility to have this support onboard e. g. via ComposableAsyncOps.

The idea is taken from this fork:
https://github.com/peterservice-rnd/tarantool-java/commits/master

Relevant commits are:
peterservice-rnd@8362063
peterservice-rnd@9b4d03c

I suggest to rebase this commits on top of current master, squash, add tests, relevant build/test targets, and release a major (since the change would be backward-incompatible) version.

ponomarevDmitri pushed a commit to ponomarevDmitri/tarantool-java that referenced this issue Jan 27, 2019
Minimal java version changed from 1.7 to 1.8.

Add support of composable operations as ability to return
TarantoolClientOps with CompletionStage as Result. This feature is taken
from peterservice's fork
(see https://github.com/peterservice-rnd/tarantool-java)

FutureImpl is replaced with CompletableFuture under the hood of
TarantulClientImpl.

test: add ClientComposableAsyncOpsIT and AbstractAsyncClientOperationsIT
as ancestor of it and AsyncClientOperationsIT.
ponomarevDmitri pushed a commit to ponomarevDmitri/tarantool-java that referenced this issue Jan 30, 2019
Minimal java version changed from 1.7 to 1.8.

Add support of composable operations as ability to return
TarantoolClientOps with CompletionStage as Result. This feature is taken
from peterservice's fork
(see https://github.com/peterservice-rnd/tarantool-java)

FutureImpl is replaced with CompletableFuture under the hood of
TarantoolClientImpl. Note about behaviour of CompletableFuture
(relatively FutureImpl): a result of a CompletableFuture future will not
change after the first call of the 'complete' method
(unlike FutureImpl.setValue).

test: add ClientComposableAsyncOpsIT and AbstractAsyncClientOperationsIT
as ancestor of it and AsyncClientOperationsIT.

Fixes tarantool#102
ponomarevDmitri pushed a commit to ponomarevDmitri/tarantool-java that referenced this issue Jan 30, 2019
Minimal java version changed from 1.6 to 1.8.

Add support of composable operations as ability to return
TarantoolClientOps with CompletionStage as Result. This feature is taken
from peterservice's fork
(see https://github.com/peterservice-rnd/tarantool-java)

FutureImpl is replaced with CompletableFuture under the hood of
TarantoolClientImpl. Note about behaviour of CompletableFuture
(relatively FutureImpl): a result of a CompletableFuture future will not
change after the first call of the 'complete' method
(unlike FutureImpl.setValue).

test: add ClientComposableAsyncOpsIT and AbstractAsyncClientOperationsIT
as ancestor of it and AsyncClientOperationsIT.

Fixes tarantool#102
Totktonada pushed a commit to ponomarevDmitri/tarantool-java that referenced this issue Jan 31, 2019
Minimal java version changed from 1.6 to 1.8.

Add support of composable operations as ability to return
TarantoolClientOps with CompletionStage as Result. This feature is taken
from peterservice's fork (see
https://github.com/peterservice-rnd/tarantool-java)

FutureImpl is replaced with CompletableFuture under the hood of
TarantoolClientImpl. Note about behaviour of CompletableFuture
(relatively FutureImpl): a result of a CompletableFuture future will not
change after the first call of the 'complete' method (unlike
FutureImpl.setValue).

test: add ClientComposableAsyncOpsIT and AbstractAsyncClientOperationsIT
as ancestor of it and AsyncClientOperationsIT.

Fixes tarantool#102
@Totktonada
Copy link
Member

Assigned Dmitri for the record.

@Totktonada
Copy link
Member

Decided to release it as the next minor release (1.9.0), because the change is quite small and should not affect much users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants