Nakano is a log-based transactional replication system for
Oracle. It is written in C and consists of three parts,
capture, transformation, and application.
Before reading the REDO logs, Nakano connects to an Oracle Database server
via UPI. It uses this connection to build an in-memory
object resolution table which basically resembles a data
dictionary. The object resolution table is used solely
to resolve objects from the REDO logs during transformation.
After
the initial synchronization of the object resolution table,
the connection is dropped as all subsequent object creation
and removal (tables, columns, etc) is captured and can
be applied to the in-memory table directly. Similarly,
after the table has been loaded, the capture process can
begin.
Logical Change Record Capture
The capture component of Nakano is designed specifically to capture change
vectors for committed transactions. Specifically, it consists
of a multi-threaded module
which reads Oracle REDO logs, inspects REDO headers/records,
and performs appropriate actions based on the record type.
All change vectors are enqueued into a persistent queue
to be handled in the transformation phase.
Transformation
After change data has been captured and enqueued, it can be transformed.
This can either happen locally, within the Nakano instance,
or remotely (should you want to make the performance
overhead as minimal as possible). Transformation simply
consists of translating the captured change vectors of
committed transactions into appropriate SQL statements.
Currently, all table and column names are translated into
generic ANSI SQL using data from the object resolution
table.
After transformation, the generated SQL is placed in another persistent
queue for application.
Application
The application phase of log-based replication is the last and final
operation. It simply consists of dequeueing generated SQL
and executing it on the target system. Currently, application
is performed through an ODBC connecton to the target
database. Though, one could easily replace ODBC with OCI,
FreeTDS, or any other native library for increased performance.
Status: Beta-quality