The source code is for testing only and should not be used commercially. The source code comes from the Internet. If there is any infringement, please contact me to remove it.
新一代Java数据库驱动规范-反应式驱动规范

1. preface

Responsive programming is already Java The field of programming has been around for a long time. It has high-performance, event-driven, makes full use of computing resources, and a more elegant asynchronous programming experience. It also provides a backpressure mechanism to prevent system overloading. a long time Java The response can only be the same MongoDBRedis Wait for these non-relational databases to interact. At present, most of our data is still stored in relational databases. In most cases, Java use JDBC to operate relational databases, and JDBC is blocking and synchronous. Therefore, there is an urgent need for a database driver protocol that supports responsiveness. There are two responsive database driver protocols currently on the market. Let's take a look at them.

2. ADBA

ADBA is Oracle dominated Java Standards for asynchronous database access API 。Its purpose is to integrate into the future Java Among the standard distribution versions of, the development is relatively slow at present and currently only providesOpenJDKthesandbox characteristicsFor research by developers. It's not intended to be JDBC an extension or replacement of, but a completely independent API, should API provide JDBC Completely non-blocking access to the same database.

3. R2DBC

Spring officials Spring 5 Released a response Web framework Spring WebFlux Database interactions that can satisfy asynchronous responses are urgently needed API 。Due to a lack of standards and drivers,Pivotal (Spring official) The team began exploring reactive relational database connections (Reactive Relational Database Connectivity), and proposed R2DBC specification API To assess feasibility and discuss whether database vendors are interested in supporting reactive asynchronous non-blocking drivers. At the beginning, only PostgreSQLH2MSSQL Three, now MySQL And joined in.R2DBC latest version is0.8.1.RELEASE。In addition to driver implementation, it also provides R2DBC connection pool and **R2DBC Agent**。In addition, it also supports cloud-native applications.

3.1 Available R2DBC driver implementations

Currently available drivers are:

  • cloud-spanner-r2dbc: used forGoogle Cloud Spannerthe driver
  • jasync-sqlJavaandKotlintheR2DBCPackager, useKotlinpreparedMySQLandPostgreSQLAsynchronous database driver.
  • r2dbc-h2: forH2Implement native drivers to facilitate use as a test database.
  • r2dbc-postgres: forPostgreSQLNative drivers implemented.
  • r2dbc-mssql: forMicrosoft SQL ServerNative drivers implemented.
  • r2dbc-mysql: forMySQLNative drivers implemented.

4. summary

We need to be clear whether ADBA or R2DBC none of them are meant to replace JDBC 。Just to fill the gap under responsive programming. As for the future of reactive style, it is not very clear yet, but it is developing rapidly and I am still very optimistic. for now ADBA It has the advantage of official blessing, and R2DBC With the advantage of an active community, I believe it will be revealed soon who is the leader in industry rules. I will also try to use it experimentally in the future R2DBC And share some of these experiences and pay more attention.

read more
Resource download
PriceFree
The use is limited to testing, experiments, and research purposes. It is prohibited for all commercial operations. This team is not responsible for any illegal behavior of users during use. Please self-test all source codes! There is no guarantee of the integrity and validity of your source code. All source code is collected from the entire network
Original link:https://bcbccb.cn/en/4477.html, please indicate the source for reprinting. Disclaimer: This resource has not been authorized by the original rights holder and is not commercially available. It can only be used to learn and analyze the underlying code, CSS, etc., and is prohibited for commercial purposes. Any relevant disputes and legal liabilities arising from unauthorized commercial use shall be fully borne by the user. Everyone is responsible to support genuine copies. Please delete them within 24 hours after downloading. Thank you for your support!
1

Comments0

Cocos系列情怀源码多套精美UI界面皮肤切换全国600子游戏(带控制)
Cocos series emotions source code, multiple sets of exquisite UI interfaces, skin switching across 600 sub-games across the country (with control)
Someone bought it 5 minutes ago Go and have a look

Site Announcements

The source code (theme/plug-in/application source code) and other resources provided by this site are only for learning and exchange

Commercial use is prohibited, otherwise all consequences will be borne by the downloading user!

Some resources are collected or copied online. If they infringe on your legitimate rights and interests, please write to us.

Currently, members have a big reward, and the current price for a lifetime member is 299 gold coins.Recent price adjustments

Join quickly, opportunities wait for no one! immediately participated in

Captcha

Fast login to social accounts

en_USEnglish