Skip to content

The framework is a framework to solve distributed problems. It uses the principle of spring automatic assembly, and the idea of this framework draws lessons from the distributed things framework on the market. The framework is to solve the problem of distributed things

License

Notifications You must be signed in to change notification settings

BobSimon/mitbook-mountain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

94 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#框架描述
 1.该框架是解决分布式系统中的分布式事务问题,其原理是借鉴与阿里巴巴的seata思想以及spring事务的思想而改进的一套分布式事务框架,
   seata是日志存储于mysql中,而该框架是把日志数据存放在redis中,当日志数据量比较大的时候数据基于纯内存操作,有助于提升框架的性能,
   其中在在代码层面上设置了redis的key的过期时间,以防redis数据过多导致内存溢出或者导致频繁的 full gc,在数据存储在redis过程中,
   如果存储失败,则会触发重试逻辑,从而保证数据同步的成功,但是这用又引入了一个新的问题,如果数据一直重试,导致框架一直处于重试逻辑从而
   影响系统的性能,所以在这一方面的逻辑在后面进行优化
#使用说明
 1.详细请看mitbook-test工程
#设计原理
 1.目前不提供原理图,如果了解seata框架的话,本框架思想也是比较简单的,因为该框架是基于seata框架的
#支持数据库
 1.市面上的数据库都支持,只要是符合jdbc规范的数据库都支持
#技术选型
 1.springboot,aop,redis等等
#测试地址
 1.http://localhost:8066/order/saveOrder?orderNo=12222&userId=1000&productId=1&productNum=1
#注意
 1.未经本人允许请勿用于商业
 2.该框架目前性能不是很好,后期会通过rpc或者netty来解决性能问题
 3.mitbook-test工程中存在订单扣减问题,不必在意,这不是该分布式框架问题,而是订单扣减库存问题,故不作处理
#集成第三方框架使用
 1.引入maven依赖
 <dependency>
    <groupId>com.mitbook</groupId>
    <artifactId>mitbook-stater</artifactId>
    <version>1.0</version>
  </dependency>
  2.在启动类上加上@EnableMitDistributedTransactional注解,就能解决分布式事务问题
#代码共享说明
 1.如源码爱好者有更好思想,欢迎来扰,本人以真诚的谢意欢迎您来贡献
 2.如发现bug请及时与我联系,本人看到消息会在第一时间联系你,帮您解决问题
 3.本框架只应用于学习,不应用与商业,如需应用于商业,请与本人联系,谢谢

About

The framework is a framework to solve distributed problems. It uses the principle of spring automatic assembly, and the idea of this framework draws lessons from the distributed things framework on the market. The framework is to solve the problem of distributed things

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages