Hibernate and Reactive Programming

Taken from https://in.relation.to/2020/12/03/hibernate-reactive/

"Reactive programming lets us take advantage of non-blocking IO to reduce resource usage in our programs. For a long time, non-blocking IO was something that just wasn’t an option for programs which interact with relational databases, since data access APIs like JDBC and ODBC were designed around a fundamentally synchronous, blocking paradigm."

"Hibernate Reactive is only really useful in the context of a stack of end-to-end reactive technologies. So of course we’re making sure it works great with Vert.x, and that it’s straightforward to integrate into other platforms.

But the exciting news here is that we’re also integrating it with a new reactive API for Quarkus that we’ll announce very soon. Our goal is to provide the most comfortable and familiar way for Java developers to transition to a reactive programming model."

"But even in many much more realistic situations, reactive code isn’t automatically faster than regular code using blocking IO. To measure an effect, you would need a situation where many server threads would block waiting for a response from a remote database server."

"On the other hand, we have not even begun to optimize the performance of Hibernate Reactive, so the initial performance tests were really rather encouraging."

Comments

Popular posts from this blog

Go down to the source code.