The data link of OceanBase Database provides optimal data access performance from the client to the database. The data link makes the distributed nature of OceanBase Database imperceptible to users while providing high scalability, high performance, and high availability. The data link consists of OceanBase Database Proxy (ODP), also known as ODP, and database drivers.
ODP
ODP is a proxy service dedicated to OceanBase Database. Data in OceanBase Database is stored in multiple replicas on various OBServers. ODP receives SQL requests from users and forwards the requests to an OBServer based on the data distribution information involved in the requests. After the OBServer processes a request, ODP receives the execution result and returns the result to the user.
As a key component of OceanBase Database, ODP has the following features:
High-performance forwarding
ODP is fully compatible with the MySQL protocol and supports the proprietary protocol of OceanBase. It adopts the multi-threaded asynchronous framework and transparent streaming forwarding to ensure high-performance data forwarding. In addition, it consumes minimal cluster resources.
Optimal routing
ODP fully considers the location of replicas that are included in each user request, read/write split routing strategy configured by each user, optimal procedure for multi-region deployment of OceanBase Database, and the status and load of each OBServer. ODP routes user requests to an OBServer, and ensures the performance of OceanBase Database operations.
Connection management
For the physical connections of a client, ODP maintains its connections to multiple OBServers at the backend. It also adopts the incremental data synchronization solution based on version numbers to maintain the session status of each OBServer connection. This ensures efficient client access to each OBServer.
Proprietary protocol
ODP and OBServers use the proprietary protocol of OceanBase Database by default. For example, ODP performs cyclic redundancy checks (CRCs) on messages to ensure the correctness of the OBServer connections. ODP also enhances the transmission protocol to support the Oracle-compatible data types and interaction models.
Easy O&M
ODP is stateless and supports unlimited horizontal scale-out. It allows users to access multiple OceanBase clusters at the same time. Users can monitor the status of OceanBase Database in real time by using various internal commands. This allows users to perform routine O&M in an efficient manner.
For more information about ODP, see ODP.
Database drivers
Database drivers are provided by database vendors or vendors that are specialized in database driver development. Database drivers provide an interface for external applications to access databases. Currently, OceanBase Database provides the MySQL mode, which is compatible with MySQL, and the Oracle mode, which is compatible with Oracle. In MySQL mode, users can use official MySQL connectors except for connectors for MySQL 8.0 to access OceanBase Database. In Oracle mode, users must use the self-developed database drivers of OceanBase Database. The database drivers of OceanBase Database support the MySQL and Oracle modes, and can automatically identify whether OceanBase Database is running in MySQL or Oracle mode.
OceanBase Database provides database drivers in different languages. The following list describes the details:
OBCI
OceanBase Call Interface (OBCI) is compatible with Oracle Call Interface (OCI) and serves as a C driver that supports the Oracle mode.
For more information about OBCI, see OBCI.
OceanBase Connector/C
OceanBase Connector/C is compatible with ODBC and serves as a C driver that supports both the MySQL and Oracle modes.
For more information about OceanBase Connector/C, see OceanBase Connector/C.
OceanBase Connector/J
OceanBase Connector/J is compatible with JDBC and serves as a Java driver that supports both the MySQL and Oracle modes.
For more information about OceanBase Connector/J, see OceanBase Connector/J.
For more information about database drivers, see Database drivers.