c-jdbc, sequoia, continuent, SymmetricDS

c-jdbc 是一个开源的数据库集群中间件. 处理数据复制, 数据分布, 负载均衡, 数据恢复等操作, 对应用程序透明.

c-jdbc 项目最近的更新时间为2005年, 后来更名为sequoia.

http://forge.ow2.org/projects/c-jdbc/

后来sequoia没多久就被continuent收购, 开始走商业化路线.

Overview

C-JDBC is an open source (LGPL) database cluster middleware that allows any Java application (standalone application, servlet or EJB container, ...) to transparently access a cluster of databases through JDBC(tm). The database is distributed and replicated among several nodes and C-JDBC balances the queries among these nodes. C-JDBC handles node failures and provides support for checkpointing and hot recovery.

Sequoia is a new version of C-JDBC available under an Apache license. You can download Sequoia from the Continuent.org Forge.

Quick facts
  • No modification of existing applications or databases,
  • High availability provided by advanced RAIDb technology,
  • Performance scalability with unique load balancing and query result caching features,
  • Integrated JMX-based administration and monitoring,
  • 100% Java implementation allowing portability across platforms,
  • Open source licensed under LGPL.

架构图

SymmetricDS 是一个开源的数据复制软件, 目前支持12种主流的数据库产品, 属于基于触发器的数据捕获, 表级别的复制配置, 支持异构数据库的复制(例如从mysql复制到postgresql), 多主复制(双向复制), 单向复制, 使用HTTP|HTTPS协议传输复制的数据, 同时还支持re-map复制对象, 合并复制对象, 复制过滤(即复制表的部分数据) 等. 功能非常强大, 而且不依赖网络稳定性. 

有点类似PostgreSQL的第三方复制软件londiste3, slony-I. 

http://blog.163.com/digoal@126/blog/static/163877040201242945632912/

http://blog.163.com/digoal@126/blog/static/163877040201243051338137/

http://blog.163.com/digoal@126/blog/static/1638770402012431102448951/

http://blog.163.com/digoal@126/blog/static/16387704020125441314324/

Wide Database Support

Compatibility is a key aspect of SymmetricDS, which supports 12 major database platforms, making it the perfect choice for heterogenous enterprise environments.

Scale Out

Optimized for performance and scalability, SymmetricDS can replicate thousands of databases asynchronously in near real time.

Flexible Configuration

Configure which tables to sync 1-way or bi-directional. Use horizontal or vertical filtering to subset tables. Combine, filter, or change data with powerful transformations.

Features

  • Data Channels - Table synchronizations are grouped into independent channels
  • Guaranteed Delivery - Synchronized data is guaranteed to arrive at the target destination. If a synchronization fails, the same batch of data will be retried until it succeeds or manual intervention is taken. All other data synchronization is halted for the failed channel only.
  • Transaction Aware - Data updates are recorded and replayed with the same atomicity
  • Centralized Configuration - All configuration is downloaded from a central registration server
  • Multiple Deployment Options - Standalone engine, web application, embedded software component
  • Data Filtering and Rerouting - Allows for localized passwords and sensitive data filtering/routing
  • HTTP Transport - Pluggable transport defaults to Representation State Transfer (REST-style) HTTP services
  • Payload Compression - Optionally compresses data on transport
  • Notification Schemes - Push (trickle-back data) or Pull (trickle-poll data) changes
  • Symmetric Data Protocol - A fast streaming data format that is easy to generate, parse, and load
  • Plug-In API - Add customizations through extensions and plug-in points
  • Two-Way Table Synchronization - The same table can be synchronized both to and from the host system while avoiding update loops
  • Database Versioning - Specify data synchronization by version of target database
  • Auto Database Creation - Optionally allow creating and upgrading of database schema
  • Embeddable - Small enough to embed or bootstrap within another application (i.e. a POS application)
  • Multiple Schemas - Supports multiple database schemas naturally through the existence of Data Channels
  • Primary Key Updates - Captures the "before" and "after" data being changed, allowing updates to primary key data
  • Remote Management - Administration through a Java Management Extensions (JMX) console
  • Remote Database Administration - SQL can be delivered and run at remote databases via the synchronization infrastructure
  • Initial Data Load - Prepare the satellite database with an initial or recovery load of data

FAQ, 可以窥探到SymmetricDS的强大. 从其他数据库迁移到PostgreSQL除了使用fdw的方式, 还可以考虑一下SymmetricDS了.

http://www.symmetricds.org/docs/faq

Frequently Asked Questions

What is SymmetricDS?

SymmetricDS is software that replicates relational database tables between multiple databases. It uses a light-weight, web-based protocol to send and receive data, which makes it easy to work with firewalls. Replication is done in the background asynchronously, allowing data changes in offline mode. It supports most commercial and open source database platforms.

How does it work?

Triggers are installed in the database to guarantee that data changes are captured. This means that applications continue to use the database as usual without any special driver software. The triggers are written to be as small and efficient as possible. Routing and syncing of data is done outside of the database in the SymmetricDS process.

Is replication using timestamps?

No, timestamps are not used. Data is captured as it is changed, and each change is given a sequence number. Data changes are grouped together and given a batch number to route through the system. Data changes within a transactional unit are preserved together within a batch.

Can partial tables be replicated?

Yes, subsets of data can be synchronized to other databases. The subset can be: vertical, selecting only some columns to sync; horizontal, selecting only some rows to sync, or both. Different subsets of data can be sent to different databases. For example, a retail store chain can have a central database containing data for all stores, while each retail store database contains just its subset.

Can table names and column names be re-mapped?

Yes, the source table can be mapped to a different table name and different column names at the target database. It is also possible to add new columns and ignore existing columns.

Is there data transformation support?

Data transformation is a built-in core feature. A source table is mapped column by column to a destination table. Data can be transformed using one of several built-in transformers or specifying a Beanshell script. Multiple tables can be mapped together to merge data, and data can be looked up with SQL queries on either the source or target side to supplement data.

Does replication require a fast network connection?

No, the network connection can be slow and even unreliable for periods of time. SymmetricDS makes efficient use of the network with low overhead, batching of data, and data compression. It is designed to withstand periods of network outage by tracking changes that were unsuccessful and retrying.

How quickly are databases replicated?

Asynchronous replication allows the data capture to happen immediately, allowing the source system to continue its activity without waiting. The target system is synchronized in the background separately. The user configures a delay in milliseconds for when the changes are replicated to the target system.

How many replicas are supported?

SymmetricDS is designed to scale to thousands of replicated databases. To scale vertically, configuration properties allow adding more resources to a single node. To scale horizontally, more nodes can be added and configured in cluster mode. A large installation of SymmetricDS at a central database can have multiple instances running together.

Is replication one-way or two-way?

Both one-way and two-way replication configurations are possible. Configuration is at the table level, so table A can be replicated one-way, while table B is replicated two-way. One-way replication, sometimes called primary-backup, means changes are captured at the source system and replicated to the target system. Two-way replication, sometimes called multi-primary, means changes are captured at both source and target systems and replicated to both.

How is data replicated securely?

Data can be encrypted by configuring node addresses to use HTTPS (SSL over HTTP) instead of the default HTTP. By default, connections between instances of SymmetricDS require password authentication. The setup between SymmetricDS instances is called registration, which initiates the password generation and transfer. The registration process can also be customized to use other methods of key exchange.

Can multiple instances be run on the same machine?

Yes, by specifying a different port number for each instance. You can also run multiple nodes in the same instance, which gives each node a different URL to contact.

Can I embed SymmetricDS in my application?

Yes, an application can include SymmetricDS as a library, which allows it to have more control and feedback of replication. This type of application is popular when using a small database system like H2, Apache Derby, or HSQLDB, which gives the overall application a small footprint on memory.

How do I troubleshoot errors?

When an error is encountered during replication, it is written to the log file at the ERROR level with details, using standard Log4J logging. On the source side, the database has an outgoing batch entry with an error status and the captured data that was unable to sync. On the target side, the database has an incoming batch entry with an error status along with the source system's error code and message. Data errors are retried, so if the underlying problem is resolved, such as a missing parent record, then data replication will continue automatically.

[参考]
1. http://c-jdbc.ow2.org/

2. http://www.symmetricds.org/

3. http://www.continuent.com/

时间: 2024-11-08 22:15:41

c-jdbc, sequoia, continuent, SymmetricDS的相关文章

关于jdbc中插入和更新的问题

问题描述 关于jdbc中插入和更新的问题 我用的oracle用jdbc进行相关操作,可是,只有插入语句能执行,不能执行更新和删除语句,这是怎么回事呢? 解决方案 不能执行更新和删除语句,检查下代码有问题吗?运行时有没有异常信息呢?如果你用的是纯JDBC操作的话,问题就可能出在代码上,把代码的异常分支打印堆栈日子,检查更新删除操作有没有提交事务.事出必有因,仔细找找呗. 解决方案二: 那就是你的sq语句,出现问题了,和JDBC没有关系,既然你保存能进去,那就证明数据库连接成功,在好好检查一下. 解

java 连接异常-java 启动jdbc 事务报错 嵌套异常

问题描述 java 启动jdbc 事务报错 嵌套异常 org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException: Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC

java-memory leak我的 jdbc 被强制注销

问题描述 memory leak我的 jdbc 被强制注销 memory leak我的 jdbc 被强制注销 我前几天还好好的,今天发现能够连到数据库oracle,但是新的程序无法在数据库中呈现出来,并且原来的表也没有了 The web application [UsersManager2] registered the JDBC driver [oracle.jdbc.driver.OracleDriver] but failed to unregister it when the web a

利用jdbc连接db2数据库

问题描述 利用jdbc连接db2数据库 数据库连接配置如下: jdbc.driver=com.ibm.db2.jcc.DB2Driver jdbc.url=jdbc:db2://localhost:50000/finical jdbc.username=db2admin jdbc.password=325314 报错如下: com.ibm.db2.jcc.b.DisconnectException: The application server rejected establishment of

javamelody+c3p0-Javamelody监控jdbc,数据库连接监控的问题

问题描述 Javamelody监控jdbc,数据库连接监控的问题 我用的数据库连接池是c3p0,javamelody么有监控到,怎么配置一下Javamelody让它监控呀!我网上查的 资料都是跟hibernate或者spring一起使用才能监控,如果就只用c3p0可以做到监控吗?哪位大神懂呀!帮帮忙了,谢谢! 解决方案 JavaMelody监控

jdbctemmple-在PLSQL中执行没问题,在JDBC中查询报列名无效

问题描述 在PLSQL中执行没问题,在JDBC中查询报列名无效 大家帮忙看看,这段SQL有什么问题,我在PLSQL中执行没问题,但是用JDBC查的时候就报列名无效的错误. select * from (select T_c_p_i.HOUSEHOLD_ID, T_c_p_i.HOUSEHOLD_HEAD_RELATIONSHIP, T_P_H_A.attribute_meaning as attribute_meaning, T_c_p_i.PERSON_NAME, T_c_p_i.GENDER

JDBC 连接 Oracle 11g Release 2

/********************************************************************************** * Created on Nov, 2011 Copyright(c) http://vigilance.co.in All Rights Reserved. ***********************************************************************************/ p

jsp用jdbc连接db2数据库的方法

js|数据|数据库 数据库版本:db2 UDB v7.2服务器操作系统:aix4.3.3 1.关闭服务器上的web服务:2.停止jdbc侦听进程db2jd,db2jd一般启动的是6789的端口服务,   先用ps -ef | grep db2jd 查看到它的进程号   然后用kill -9 <进程号>  命令停止;3.在数据库服务器中,进入/usr/lpp/db2_07_01/java12目录,执行./usejdbc2以启用jdbc2:4.将/usr/lpp/db2_07_01/java12下

Servlet开发中JDBC的高级应用

servlet|高级 连结数据库 JDBC使用数据库URL来说明数据库驱动程序.数据库URL类似于通用的URL,但SUN 在定义时作了一点简化,其语法如下: Jdbc::[node]/[database] 其中子协议(subprotocal)定义驱动程序类型,node提供网络数据库的位置和端口号,后面跟可选的参数.例如: String url="jdbc:inetdae:myserver:1433?language=us-english&sql7=true" 表示采用inetd