Skip to content
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

Remove :client-events and :transcoder, working directly with CompletableFutures. #67

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

evg-tso
Copy link
Member

@evg-tso evg-tso commented Aug 8, 2023

In this PR:

Removed

  • Remove the funcool/promesa dependency.
    • This doesn't affect the return values, they remain java.util.concurrent.CompletableFuture as before.
    • This reduces the libraries dependencies without sacrificing its functionality.
  • Remove the :client-events from the options map per client and per operation. The return values are java.util.concurrent.CompletableFuture, and the client is feel to compose additional functionally on top of these futures.
    • The previous on-success can be achieved with CompletableFuture.thenApply or CompletableFuture.thenCompose.
    • The previous on-failure can be achieved with CompletableFuture.exceptionally or CompletableFuture.exceptionallyCompose.
  • Remove the :transcoder from the options map per client and per operation.
    • Mapping the response can be achieved with CompletableFuture.thenApply or CompletableFuture.thenCompose.
    • To map the request's payload, supply a different payload.
  • Remove the advanced-async-hooks.md.

Changed

  • Update the README.md and the tutorial.md to reflect the above changes.
  • Bump clj-kondo: 2022.04.25 -> 2023.07.13.
  • Move batch-record->map from aerospike-clj.client to aerospike-clj.aerospike-record.
  • All async continuation functions are now reified and assigned as a def at compile-time.
    • This should reduce the number of allocations due to the removal of (p/then' (fn [...)).

…pletableFuture`s.

### Removed

* Remove the `funcool/promesa` dependency.
  * This doesn't affect the return values, they remain `java.util.concurrent.CompletableFuture` as before.
  * This reduces the libraries dependencies without sacrificing its functionality.
* Remove the `:client-events` from the options map per client and per operation.
  The return values are `java.util.concurrent.CompletableFuture`, and the client is feel to compose additional
  functionally on top of these futures.
  * The previous `on-success` can be achieved with `CompletableFuture.thenApply` or `CompletableFuture.thenCompose`.
  * The previous `on-failure` can be achieved with `CompletableFuture.exceptionally`
    or `CompletableFuture.exceptionallyCompose`.
* Remove the `:transcoder` from the options map per client and per operation.
  * Mapping the response can be achieved with `CompletableFuture.thenApply` or `CompletableFuture.thenCompose`.
  * To map the request's payload, supply a different payload.
* Remove the `advanced-async-hooks.md`.

### Changed

* Update the [README.md](README.md) and the [tutorial.md](doc/tutorial.md) to reflect the above changes.
* Bump `clj-kondo`: `2022.04.25` -> `2023.07.13`.
* Move `batch-record->map` from `aerospike-clj.client` to `aerospike-clj.aerospike-record`.
* All async continuation functions are now reified and assigned as a `def` at compile-time.
  * This should reduce the number of allocations due to the removal of `(p/then' (fn [...))`.
@github-actions
Copy link

github-actions bot commented Aug 8, 2023

Unit Test Results

0 tests   0 ✔️  0s ⏱️
0 suites  0 💤
0 files    0

Results for commit 851bc21.

♻️ This comment has been updated with latest results.

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

Successfully merging this pull request may close these issues.

1 participant