Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CobarClient 2.0 RoadMap #3

Open
fujohnwang opened this issue Jul 15, 2013 · 22 comments
Open

CobarClient 2.0 RoadMap #3

fujohnwang opened this issue Jul 15, 2013 · 22 comments

Comments

@fujohnwang
Copy link
Contributor

  • new Routing and LB strategy and implementation
    • multiple Route DSL with unique Route Abstraction Core
    • will TrieTree be more suitable for route selection?!
  • new Parallel Execution Structure
  • newest framework support : mybatis + spring3.x
  • new configuration abstraction for both local and global configuration strategy
  • minimised 3rd dependencies
  • split modules
@fujohnwang
Copy link
Contributor Author

  • draft documentations with markdown, and put them on wiki of github so that everything can be found in one place.

@fujohnwang
Copy link
Contributor Author

split into 2 more branches?

  1. Spring3.x + iBatis2.x
  2. Spring3.x + MyBatis3.x

@LaiZhou
Copy link

LaiZhou commented Jul 24, 2013

Spring3.x + MyBatis3.x 就够了

@JoeCao
Copy link
Contributor

JoeCao commented Jul 25, 2013

Spring3.x+ibatis2.x还是有意义的,上次特地问了一下其他公司的,很多还在ibatis上面工作。毕竟官方没有集成mybatis

@fujohnwang
Copy link
Contributor Author

  • deprecate BatchInsertTask functionality feature;
  • deprecate HA feature;
    • most of the time, solutions based on VIP or data Source implementation level are practical in production.

@fujohnwang
Copy link
Contributor Author

  • 读写分离
    • 针对读写提供不同的线程池, global scope可调的, 不再需要指定特定于每一个Data Source的线程池

@JoeCao 使用global scope的线程池,从你角度看是否有问题?

@fujohnwang
Copy link
Contributor Author

https://github.com/fujohnwang/scarface/tree/master/src/main/scala/mysdal 这里用Scala写了点儿验证性代码

@LaiZhou
Copy link

LaiZhou commented Jul 30, 2013

scala 小语种表示看不懂啊,强哥!

@JoeCao
Copy link
Contributor

JoeCao commented Jul 30, 2013

如果是单元数据源就在原来的线程直接调用,如果是多数据源再到线程池中,OK;
读和写的线程池是否需要分离?

@JoeCao
Copy link
Contributor

JoeCao commented Jul 30, 2013

建议去掉SQL执行时间的监控,监控的都是预制SQL,意义不是很大,而且像Druid这样的连接池已经可以提供界面的监控能力了,我们就交给更专业的组件去做。

@fujohnwang
Copy link
Contributor Author

@hhlai1990 现在可以看当前repo下cobarclient-2.0这个branch的代码, 精简的基本也就没几行了,呵呵

@ws-yuxf
Copy link

ws-yuxf commented Aug 21, 2013

请问什么情况下会把数据源切换到备用数据库? 文档里说:standbyDataSource. 与主要目标数据源并列的备用数据源, 当主要目标数据源出现问题之后, 如果启用了CobarClient的HA功能支持, CobarClient将自动将数据访问切换到该备用数据源上. 这里说‘当主要目标数据源出现问题之后’,我在测试过程中主库并没有出现问题,还是莫名其妙切换到standbyDataSource。

@JoeCao
Copy link
Contributor

JoeCao commented Aug 26, 2013

HA功能在新版本应该是去掉了,意义不是很大,还是让专门的数据库方案来解决这个HA问题更合适

@ws-yuxf
Copy link

ws-yuxf commented Sep 4, 2013

CobarClient2.x都有做哪些修改呢?除了去除HA功能,然后将Spring2.x升级到3.x?

@fujohnwang
Copy link
Contributor Author

最主要的时升级依赖,并且重新设计了API结构,做减法

@digitalsonic
Copy link

有的地方,还是要应用自己来做HA的,DB方面不做这个,这个和一些公司的风格习惯有关。如果已经有了这样的功能为什么要去掉呢……

@JoeCao
Copy link
Contributor

JoeCao commented Dec 3, 2013

应用做HA,最大的问题--在决定切换到备机之前,如何判断问题是应用自己的而不是数据库的。特别是在应用集群的情况下,很容易造成混乱。而数据的主备双机方案一直都是很成熟的,不存在上述问题。

@lovewangwei
Copy link

Hi~

您好!

向您请教一下关于cobar的一个问题,最近在使用cobar的时候,遇到一个问题,查询语句排序的问题

场景:我用cobar将我的userdb分成了8个数据库userdb0~userdb7, 现在执行一条sql语句
SELECT user_name FROM user_info ORDER BY create_time
每次去查询得到的结果的排列顺序,总有那么几次不一样,请问这个怎么控制,让每次查询到的结果的排序是固定的???

@fujohnwang
Copy link
Contributor Author

所有shards都查询的整体排序其实没有太好的办法,单shard排序完全可以借力数据库自身的功能, 如果非要搞整体的排序,建议是代码层面在shards各自结果排序的基础上做merge sort, sort的因子自己根据情况决定

@lovewangwei
Copy link

好的!谢谢老师!

行百里者,看周遭事;行千里者,阅世间情;行万里者,穷天下经。

2014-02-23 13:04 GMT+08:00 王福强 notifications@github.com:

所有shards都查询的_整体排序_其实没有太好的办法,单shard排序完全可以借力数据库自身的功能,
如果非要搞整体的排序,建议是代码层面在shards各自结果排序的基础上做merge sort, sort的因子自己根据情况决定


Reply to this email directly or view it on GitHubhttps://github.com//issues/3#issuecomment-35824098
.

@bwzhang2011
Copy link

@fujohnwang , how does this going on ? we're looking forward to cobaclient 2.0 released especially for mybatis integration.

@fujohnwang
Copy link
Contributor Author

@bwzhang2011, sorry, man, I don't have proper time to make it done.

maybe you should turn to some other alternatives if the old one don't meet your need.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants