基于iBatis的开源分布式数据访问层
http://code.alibabatech.com/wiki/display/cobarclient/Home
这个东西其实已经出来很长时间了,思路和成型也比其它相似的东西要早一些,公司近期才准备开源,所以就放出来了, 当然,不一定完美,东西比较简单, 所以开源出来希望能集思广益, 欢迎使用,拍砖,提意见
主要features: 1- data access support with horizontal or vertical partitions. 2- support 2-master active HA deployment infrustructure, of course, the applications still can choose other 3- HA solutions, like the ones specific to destination databases(e.g. RAC of Oracle). 4- Data aggregation support, currently only simple data merge functionality is available. 5- Local database transaction support(Currently, such requirement is fulfilled by using “Best Efforts 1PC Pattern” ). 6- SQL auditing, analysis, etc.
公司要求文档和网站一概英文,所以看英文费力的,可以check out代码出来, 然后通过maven编译,之后可以在target/docs目录下找到一份中文的完整文档(实际上中文和英文各准备了一份)
GL&HF
虽然不是完整的支持,但排序是指定支持的, 至于分页,我们没有需求,所以没有投入精力去支持。 我们希望的是,大家的融入社区并做贡献, 谢谢
对于大多数网络应用, 以及不需要事务的应用, 现在的版本应该是可以平滑过度到3的, 但现在没有资源测试这方面的版本兼容性, 如果有心,你不妨可以测试一下然后反馈给社区啊
我就很想知道分布式数据源,水平切分之后排序、分页的解决方案!
什么时候支持mybatis3、spring3
Spring3的API有变动, 之前测试过,现在的处理会有问题,比如事务管理的concern。
升级到 ibatis3 和spring3 ,改动大么
是hibernate-shards吧?呵呵,其实要在这些ORM上面做扩展, 许多时候CUD不是大问题, R可能才是比较棘手的 :-)
你好, 事务管理有几个层级,比如2PC, 1PC…, BestEffort 1PC, etc., CobarClient采用的是Best Effort 1PC模式的事务管理, 简单来讲就是可以保证一个数据操作过程中多个数据源各自的本地事务, 但不保证全局的分布式事务(因为这样的性能对大部分应用来说不可容忍)。
不过,CobarClient依赖的是DataSource粒度的资源管理,所以, 如果你的Middleware可以提供支持XA的DS, 那也是可以的。
CobarClient定位的是中小型应用, 如果非要在大规模集群使用,那建议引入某些中间件产品来统一资源的throttle等关注点。 另外, CobarClient因为是更高层次的封装(相对于protocol,driver等级别), 所以,用户可以根据自己的需要, 很容易的进行扩展。(CobarClient在设计的时候尽量在保证兼容性的前提下提高扩展性的考虑)
希望以上能够解答你的疑惑, 建议你check out代码读一下,代码不多,应该不难理解,也希望你能够提供建议和patch等 :-)
研究研究,正好要做分布式这块
LZ,对于多应用服务器+分布式数据源中的事务管理目前这个方案能胜任么?
很好,有时间可以研究研究
这些你可以修改你的settings去抓有这些库的repo, 或者你直接install到本地repo也可以, maven就是这样。
这个问题是sun将这些jar包笼罩在license管理的淫威下,如果是单纯的记录日志,可以使用log4j1.2.14
原来真是! :D
mark 准备下载学习
hibernate 之前有个hibernate-share 的项目的。。现在不知道怎样了。。虽然没用过ibaits ,但大概了解比hibernate 简单很多,hiernate 感觉太过于复杂,封装了好多。。不容易扩展。。 :wink:
不错,编译成功,不知道有没有关于hibernate的,呵呵
还是有错,本地的一些依赖没有修改完成,下面是日志
Failed to resolve artifact.
Missing:
Try downloading the file manually from the project website.
Then, install it using the command: mvn install:install-file -DgroupId=com.h2database -DartifactId=h2 -Dversion=1.2.130 -Dpackaging=jar -Dfile=/path/to/file
Alternatively, if you host your own repository you can deploy the file there: mvn deploy:deploy-file -DgroupId=com.h2database -DartifactId=h2 -Dversion=1.2.130 -Dpackaging=jar -Dfile=/path/to/file -Durl=< -DrepositoryId=
Path to dependency: 1) com.alibaba.cobar:cobar-client:jar:1.0.3 2) com.h2database:h2:jar:1.2.130
Try downloading the file manually from the project website.
Then, install it using the command: mvn install:install-file -DgroupId=mysql -DartifactId=mysql-connector-java -Dversion=5.1.12 -Dpackaging=jar -Dfile=/path/to/file
Alternatively, if you host your own repository you can deploy the file there: mvn deploy:deploy-file -DgroupId=mysql -DartifactId=mysql-connector-java -Dversion=5.1.12 -Dpackaging=jar -Dfile=/path/to/file -Durl=< -DrepositoryId=
Path to dependency: 1) com.alibaba.cobar:cobar-client:jar:1.0.3 2) mysql:mysql-connector-java:jar:5.1.12
Try downloading the file manually from the project website.
Then, install it using the command: mvn install:install-file -DgroupId=org.testng -DartifactId=testng -Dversion=5.11 -Dclassifier=jdk15 -Dpackaging=jar -Dfile=/path/to/file
Alternatively, if you host your own repository you can deploy the file there: mvn deploy:deploy-file -DgroupId=org.testng -DartifactId=testng -Dversion=5.11 -Dclassifier=jdk15 -Dpackaging=jar -Dfile=/path/to/file -Durl=< -DrepositoryId=
Path to dependency: 1) com.alibaba.cobar:cobar-client:jar:1.0.3 2) org.testng:testng:jar:jdk15:5.11
3 required artifacts are missing.
for artifact: com.alibaba.cobar:cobar-client:jar:1.0.3