Reakt to Guava Bridge
Guava gets used by many libraries for its async support. Many NoSQL drivers use Guava, e.g., Cassandra.
Guava is JDK 1.6 backwards compatible.
Reakt provides composable promises that support lambda expressions, and a fluent API.
This bridge allows you to use Reakt's promises, reactive streams and callbacks to have a more modern Java experience with libs like Cassandra and other libs that use Guava.
Cassandra Reakt example
register(session.executeAsync("SELECT release_version FROM system.local"),
promise().thenExpect(expected ->
gui.setMessage("Cassandra version is " +
expected.get().one().getString("release_version"))
).catchError(error ->
gui.setMessage("Error while reading Cassandra version: "
+ error.getMessage())
)
);
You can also use replay promises, all promises, any promises, and other features of Reakt to simplify async, reactive Java development.
Reakt gets used by QBit, and Conekt.
No comments:
Post a Comment