Limitations and anticipated improvements

As the area of reactive connectivity is relatively new, there are some limitations that prohibit using the approach in many applications:

  • The lack of reactive drivers for popular databases used in large part of modern projects. So far, we have reactive or asynchronous drivers for MongoDB, Cassandra, Redis, and Couchbase. Consequently, these databases have reactive connectors in the Spring Data ecosystem. Also, we have a few options for reactive access to PostgreSQL. At the same time, there is some work going on to enable reactive access for MySQL and MariaDB. Even though the few databases with reactive support cover many use cases, this list is still limiting. To become a trendy development technique, the reactive data access should have connectors for most widespread relational databases, such as PostgreSQL, MySQL, Oracle, MS SQL, for popular search engines such as ElasticSearch and Apache Solr, as well as for cloud databases such as Google Big Query, Amazon Redshift, and Microsoft CosmosDB.
  • The lack of reactive JPA. Currently, the reactive persistence operates at a pretty low level. We can not easily work with entities in the ways proposed by ordinary JPA. With the current reactive connectors, we have no support for entity relationship mappings, for entity caching, or for lazy loading. However, it would be odd to demand such capabilities even before consenting to any low-level API for the reactive data access.
  • The lack of a language-level reactive API for data access. As was described previously in this chapter, at the time of writing, the Java platform has only JDBC API for data access, which is synchronous and blocking, and, consequently, cannot smoothly be used with a reactive application.

However, we may see that the increasing number of NoSQL solutions provide reactive drivers or at least asynchronous drivers that are easy to wrap into the reactive API. Also, serious improvements are currently being made in the area of a language-level APIs for data access in Java. At the time of writing, there are two prominent proposals to fulfill that niche, namely ADBA and R2DBC. Now, let's look at them more closely.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.139.83.96