This document provides an overview of Vert.x and how it can be used to build reactive microservices. Vert.x is a toolkit for building distributed and reactive systems on the JVM using asynchronous non-blocking code. It allows building microservices that are responsive, elastic, and resilient. Vert.x provides tools like HTTP servers and clients, event bus messaging, distributed data structures, and reliability patterns like circuit breakers to help build scalable and fault-tolerant reactive microservices. These microservices can be deployed and managed on OpenShift.
3. V E R T. X I S A TO O L K I T T O B U I L D
D I S T R I B U T E D A N D R E AC T I V E
S Y S T E M S O N T O P O F T H E J V M U S I N G
A N A S Y N C H R O N O U S N O N - B L O C K I N G
D E V E L O P M E N T M O D E L .
17. PICK YOUR OWN
DEVELOPMENT MODEL
HttpServer server = vertx.createHttpServer();
server.requestStream().toObservable()
.subscribe(req -> {
Observable<String> a = doA("Austin");
Observable<String> b = doB("Reactive Summit");
Observable.zip(a, b, (s1, s2) -> s1 + "n" + s2)
.subscribe(s -> req.response().end(s));
});
server.listen(8080);