Code Monkey home page Code Monkey logo

happylifeplat-transaction's Introduction

happylifeplat-transaction

碧桂园旺生活平台强一致性分布式事务,是基于三阶段提交+本地事务补偿机制来实现。原理介绍

基于java语言来开发(JDK1.8),事务发起者,参与者与协调者底层基于netty长连接通信. 支持dubbo,springcloud进行分布式事务。

因为文件名太长,大家在拉取代码的时候执git命令:git config core.longpaths true

Features

  • 事务角色

  • 事务发起者(可理解为消费者 如:dubbo的消费者,springcloud的调用方),发起分布式事务

  • 事务参与者(可理解为提供者 如:dubbo的提供者,springcloud的rest服务提供者),参与事务发起者的事务

  • 事务协调者(tx-manager),协调分布式事务的提交,回滚等。

  • 技术方案

    • 协调者(tx-manager)采用eureka作为注册中心,集群配置,达到服务的高可用,采用redis集群来分布式存储事务数据, springboot 提供rest服务,采用netty与参与者,发起者进行长连接通信。

    • 发起者与协调者,采用Aspect AOP 切面**,SPI,多线程,异步回调,线程池,netty通信等技术。

  • SPI扩展

    • 本地事务恢复,支持redis,mogondb,zookeeper,file,mysql等关系型数据库
    • 本地事务序列化保存,支持java,hessian,kryo,protostuff
    • netty通信序列化方式,支持 hessian,kryo,protostuff

Design

Configuration

Usage

Support

如有任何问题欢迎加入QQ群:162614487 进行讨论

Contribution

happylifeplat-transaction's People

Contributors

yu199195 avatar

Watchers

Benjamin Basone avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.