-
Notifications
You must be signed in to change notification settings - Fork 8
Home
Reactive interfaces for Java. Reakt website
Reakt is reactive interfaces for Java:
- Promise,
- Stream,
- Callback,
- Async Results (Result, StreamResult)
The emphasis is on defining interfaces that enable lambda expressions, and fluent APIs for asynchronous programming for Java. We briefly cover some examples and refer you to the code base for the rest.
Note: This mostly just provides the interfaces not the implementations. There are some starter implementations but the idea is that anyone can implement this. It is all about interfaces. There will be adapters for Vertx, RxJava, Reactive Streams, Guava Async Futures, etc.
Promise<Employee> promise = promise()
.then(e -> saveEmployee(e))
.catchError(error ->
logger.error("Unable to lookup employee", error));
employeeService.lookupEmployee(33, promise);
Or you can handle it in one line.
employeeService.lookupEmployee(33,
promise().then(e -> saveEmployee(e))
.catchError(error -> logger.error(
"Unable to lookup ", error))
);
Promises are both a callback and a Result; however, you can work with Callbacks directly.
employeeService.lookupEmployee(33, result -> {
result.then(e -> saveEmployee(e))
.catchError(error -> {
logger.error("Unable to lookup", error);
});
});
In both of these examples, lookupEmployee would look like:
public void lookupEmployee(long employeeId, Callback<Employee> callback){...}
QBit version 2 is going to use Reakt. Connekt, a slimmed down fork of Vert.x, will also use Reakt.
See QBit microservices lib for more details.
See our wiki for more details on Reakt.
Java Promises
- Promise
- Promise then*() and catchError()
- Promise thenMap()
- Promise all()
- Promise any()
- Blocking Promise
- Invokable Promise
- Reactor Replay Promises
Reactor, Stream, Results
- QBit Reactive Microservices
- Reakt Reactive Java
- Reakt Guava Bridge
- QBit Extensions
- Elekt Consul Leadership election
- Elekt Leadership election
- Reactive Microservices
What is Microservices Architecture?
QBit Java Micorservices lib tutorials
The Java microservice lib. QBit is a reactive programming lib for building microservices - JSON, HTTP, WebSocket, and REST. QBit uses reactive programming to build elastic REST, and WebSockets based cloud friendly, web services. SOA evolved for mobile and cloud. ServiceDiscovery, Health, reactive StatService, events, Java idiomatic reactive programming for Microservices.
Reactive Programming, Java Microservices, Rick Hightower
Java Microservices Architecture
[Microservice Service Discovery with Consul] (http://www.mammatustech.com/Microservice-Service-Discovery-with-Consul)
Microservices Service Discovery Tutorial with Consul
[Reactive Microservices] (http://www.mammatustech.com/reactive-microservices)
[High Speed Microservices] (http://www.mammatustech.com/high-speed-microservices)
Reactive Microservices Tutorial, using the Reactor
QBit is mentioned in the Restlet blog
All code is written using JetBrains Idea - the best IDE ever!
Kafka training, Kafka consulting, Cassandra training, Cassandra consulting, Spark training, Spark consulting
Java Promises
- Promise
- Promise then*() and catchError()
- Promise thenMap()
- Promise all()
- Promise any()
- Blocking Promise
- Invokable Promise
- Reactor Replay Promises
Callback, and async Results
Reactor, Stream and Stream Result
Expected & Circuit Breaker
Scala Akka and Reakt