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) and database drivers.
ODP
ODP is a proxy service dedicated to OceanBase Database. OceanBase Database stores data in multiple replicas on OBServer nodes. ODP receives SQL requests from users, forwards the requests to the optimal target OBServer node based on the distribution of the data involved in the requests, executes the requests, and returns the execution results to users.
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 node. ODP routes user requests to an OBServer node, and ensures the performance of OceanBase Database operations.
Connection management
For the physical connections of a client, ODP maintains its connections to multiple OBServer nodes at the backend. It also adopts the incremental synchronization solution based on version numbers to maintain the session status of connections to each OBServer node. This ensures efficient client access to each OBServer node.
Proprietary protocol
By default, ODP and OBServer nodes use the proprietary protocol of OceanBase. For example, ODP performs a cyclic redundancy check (CRC) on messages to ensure the correctness of the connection to each OBServer node. ODP also enhances the transmission protocol to support Oracle-compatible data types and interaction models.
Easy O&M
ODP is stateless and supports unlimited horizontal scale-out. It allows you 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 Database proxy.
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 proprietary 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.
Applicability
OceanBase Database Community Edition provides only the MySQL mode.
OceanBase Database supports database drivers for various languages, including the following products:
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 Open Database Connectivity (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.