gaoxianglong / shark Goto Github PK
View Code? Open in Web Editor NEW:shark:分布式mysql分库分表中间件,sharding领域的一站式解决方案
License: Apache License 2.0
:shark:分布式mysql分库分表中间件,sharding领域的一站式解决方案
License: Apache License 2.0
感兴趣、英文不错的小伙伴,可以开始你们的翻译之路。
当初写博客的时候鄙视谁谁谁?现在也不维护了?
1、降低与spring的整体依赖;
2、修复基于zookeeper、redis3cluster作为集中式配置中心的bug;
3、提升单元测试覆盖率;
4、大版本,直接升级为1.4.0
有没有springboot starter?
您好,我看了您的书。其中分库分表中说了shark,然后看了下shark。
一直 有个疑问,
您这个分库分别路由算法的详细原理是什么?
为什么不能直接取模?
为什么dbRuleArray除以32而不是取模32?
这样做好处在哪里?
<property name="dbRuleArray" value="#key1|key2# % 1024 / 32" />
<property name="tbRuleArray" value="#key1|key2# % 1024 % 32" />
<!-- 多库多片模式 -->
<bean id="shardRule" class="com.sharksharding.core.shard.ShardRule"
init-method="init">
<property name="isShard" value="true" />
<property name="wr_index" value="r32w0" />
<property name="shardMode" value="true" />
<property name="consistent" value="true" />
<property name="dbRuleArray" value="#key1|key2# % 1024 / 32" />
<property name="tbRuleArray" value="#key1|key2# % 1024 % 32" />
<property name="tbSuffix" value="_0000" />
</bean>
上述程序示例中,主库一共是32个(1024个子表,每个库包含子表数为32个)
a、基于velocity模板引擎渲染内容,支持动态拼接sql,类似mybatis的sql配置方式(与shark目前的properties方式
并存),支持表达式;
b、自动对spring mapper进行赋值映射操作;
c、调整基于zookeeper生成全局唯一的sequenceid算法;
d、解析sql语句时,开始支持数据库别名;
e、底层解析分库分表索引时将%运算替换为&运算;
f、将切换数据源动作的日志记录调整到SharkDatasourceGroup.
determineCurrentLookupKey()方法中;
g、修复PropertyPlaceholderConfigurer类中update语句占位符“?”替换的bug;
h、增加部分测试用例;
i、降低shark的pom.xml文件中与其它构件的依赖;
j、解析SQL语句WHERE条件后面是否带参数;
k、调整自动生成shark核心配置文件代码;
<dependency>
<groupId>com.sharksharding</groupId>
<artifactId>shark</artifactId>
<version>1.3.8</version>
</dependency>
shark1.4.0版本发布
支持基于zookeepr作为shark的数据源、sharding规则的集中式资源配置中心
a、调整分库分表模式,目前分库分表模式由单库多表和多库多表构成;
b、废弃SharkJdbcTemplate,直接支持Spring的JdbcTemplate,实现业务零侵入;
c、调整com.sharksharding.core包下的目录结构;
d、修改com.sharksharding.util.xml包下自动生成shark配置文件代码;
a、调整shark内置验证页面,优化视图效果,丰富功能后升级为shark moniter(功能包括sql落盘验证、sql执行状态记录、sql执行数统计、慢速sql统计等);
b、集成shark-benchmark;
支持基于zookeeper、redis3.x cluster作为集中式资源配置中心
你好,请问使用读写分离时,能否指定某个操作可以读取主库的数据?
shark目录结构调整,package前缀为com.sharksharding
shark的release版本构件即将上传至maven的**仓库中
新增功能:
1、基于zookeeper3.4.6、redis3.0.7等的配置中心;
2、基于zookeeper3.4.6实现全局id生成器(和目前的id生成策略并存);
3、逐步降低与spring的耦合;
请问架构模型对比中的 proxy 和 应用集成 什么意思?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.