Wednesday, April 13, 2016

Reakt reactive Java lib to Guava Bridge

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 " +
  ).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.

Related projects

Kafka and Cassandra support, training for AWS EC2 Cassandra 3.0 Training