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.
Uses new Reakt and new Lokate libs which simplified Promise and Callback interfaces.
There have been a lot of improvements to WebSocket RPC.
We also improved marshaling and now support Java 8 LocalDateTime
for WebSocket RPC and JSON/REST.
We continue to improve our Reakt support. Now both clients proxies and services can return invokable promises. This gives a nice fluent interface for reactive microservices.
QBit Java Microservices Lib uses Reakt Reactive Java Lib.
QueueCallbackHandler
s with serviceEndpoints, serviceQueues and serviceBundles. You can also register QueueCallbackHandler
s when you register a service with the ManagedServiceBuilder
. This allows you to get rid of @QueueCallback
annotation.ServiceManagementBundle
.QBit Microservices Lib now supports Reakt invokable promises for local and remote client proxies. This gives a nice fluent API for async programming.
employeeService.lookupEmployee("123")
.then((employee)-> {...}).catchError(...).invoke();
QBit callbacks are now also Reakt Callbacks without breaking the QBit contract for Callbacks.
See Reakt Invokable Promises for more details.
A full write up on QBit Invokable Promise is pending, but the curious can see ReaktInterfacesTest Service Queue, ServiceBundle for more details, and the Remote Websocket Reakt interfaces for remote access proxies.
Early on in this release, we added this.
The current release notes for the current build can be found under releases and there are 27 public releases in the maven repo.
We added ability to convert to Reakt promises and Reakt Callbacks.
QBit 2 will use Reakt for reactor, callbacks and promises by default, but until then we need a way to start using promises on new projects as it is a simpler API than QBit CallbackBuilder (which will be gone in QBit 2).
import io.advantageous.qbit.reactive.Callback;
import io.advantageous.reakt.promise.Promise;
import static io.advantageous.qbit.reakt.Reakt.convertPromise;
import static io.advantageous.reakt.promise.Promise.promise;
...
final AtomicReference<Employee> ref = new AtomicReference<>();
final Promise<Employee> promise = promise();
/* Set then callback in promise. */
promise.then(ref::set);
/* Convert promise to callback and then call the callback. */
final Callback<Employee> employeeCallback = convertPromise(promise);
employeeCallback.returnThis(new Employee("Rick"));
/** Set up success callback and failure callback. */
promise.then(ref::set)
.catchError(error::set);
/** Convert promise to callback and then call the callback with error. */
final Callback<Employee> employeeCallback = convertPromise(promise);
employeeCallback.onError(new IllegalStateException());
QBit Microservices Lib 1.3.0.RELEASE
This release was published to the maven public repo.
'io.advantageous.reakt:reakt:2.3.0.RELEASE'
ServiceHealthManager
to simplify access to the low level service health system.ManagedServiceBuilder
to create ServiceHealthManager
with callbacks for service failure and service recovery.ManagedServiceBuilder
to work better with Mesosphere/Marathon port binding in bridge mode and host mode.This release was published to the maven public repo.
Using newest version of Reakt which is using a different group name.
This release was published to the maven public repo.
Added support for Consul Session to support leader election.
Moved add-on libs into QBit Extensions.
Updated to match Reakt 2.0.0.RELEASE.
You can now use Reakt's expect()
, thenExpect()
, Expected
with Reakt as well as the Reakt Reactor.
See Reakt 2.0.0.RELEASE release notes for more information.
We recommend using the Reakt Reactor
instead of the QBit Reactor for new projects.
The QBit Reactor is getting phased out and will not exist in QBit 2.0.
From QBit 0.9.10 to QBit 1.x , the QBit Reactor will still exist, but all new focus will be on using Reakt's Reactor.
Skip this release and use 0.9.10.RELEASE.
Updated to match Reakt 2.0.0.RELEASE.
You can now use Reakt's expect()
, thenExpect()
, Expected
with Reakt as well as the Reakt Reactor.
See Reakt 2.0.0.RELEASE release notes for more information.
We recommend using the Reakt Reactor
instead of the QBit Reactor for new projects.
The QBit Reactor is getting phased out and will not exist in QBit 2.0.
From QBit 0.9.9 to QBit 1.x , the QBit Reactor will still exist, but all new focus will be on using Reakt's Reactor.