Vert.x is a toolkit to build reactive and distributed systems.
It's a server API for writing asynchronous networking applications (e.g. for db connectivity, monitoring, authentication, service discovery, clustering, etc.)
You can use Vert.x callback-based API exclusively, but Vert.x also implements an equivalent Rxified API using RxJava under the hood. This provides a great platform to integrate Vert.x modules within RxJava applications.
Vert.x provides fluent HTTP endpoints and route configuration backed by handlers where the business logic is implemented. But the real nervous system is the event bus that acts as a telecom provider to all Vert.x local or distributed components.
Its event-bus supports:
- Communication modes:
1) Point-to-point
2) Request-response
3) Pub-sub messaging
- Unclustered communication between polyglot verticles within the same JVM instance
- Clustered communication between polyglot verticles in multiple JVM instances
- Bridge to Stomp or AMQP implementations for integration with other applications
- Bridge to SockJS for direct integration with Javascript frontends
The event-bus is supported by:
- Cluster managers such as Hazelcast, InfiniSpan, Ignite or ZooKeeper that provides distributed Maps, Locks, and Counters through a higher-level API access
- Vert.x service discovery API providing an address based abstraction to underlying complex addressing schemes
- SSL capable TCP service access points for bi-directional secured communication and maximum performance
Event Loop (Standard) verticles
- Drawn from the event-loop pool, which has 2 x Cores threads
- Always the same thread per verticle, which may have any number of threads.
Worker verticles are drawn from the workers pool; not always the same thread per verticle.
An even loop (never-to-be-blocked) verticle assigns work to a (likely) blocking worker verticle which then alerts the event loop verticle of its completion via a handler.