Reactive Object/Relational Mapping
Hibernate Reactive is a reactive API for Hibernate ORM, supporting non-blocking database drivers and a reactive style of interaction with the database.
Hibernate Reactive is intended for use in a reactive programming environment like Vert.x or Quarkus, where interaction with the database should occur in a non-blocking fashion. Persistence operations are orchestrated via the construction of a reactive stream rather than via direct invocation of synchronous functions in procedural Java code.
JDBC, JPA and Hibernate ORM use blocking IO for interaction with the database, and are therefore not appropriate for use in a reactive environment. Hibernate Reactive is a feature rich ORM implementation designed to take advantage of non-blocking database clients.
Compatibility
Hibernate Reactive requires:
-
Java 11,
-
Hibernate ORM 6.2, and
-
the Vert.x 4.4 reactive database client for your database.
It works with PostgreSQL, MySQL, MariaDB, Db2, SQL Server, Oracle and CockroachDB.
Getting Started
The Introduction to Hibernate Reactive covers everything you need to know to get started, including:
-
setting up a project that uses Hibernate Reactive and the Vert.x reactive SQL client for your database,
-
configuring Hibernate Reactive to access your database,
-
writing Java code to define the entities of your data model,
-
writing reactive data access code using a reactive session, and
-
tuning the performance of your program.