Giter Site home page Giter Site logo

cdhhappy / incubator-servicecomb-saga Goto Github PK

View Code? Open in Web Editor NEW

This project forked from apache/servicecomb-pack

0.0 2.0 0.0 3.8 MB

Apache ServiceComb Saga (Incubating)

Home Page: https://servicecomb.apache.org/

License: Apache License 2.0

Java 93.16% Gherkin 1.52% Shell 0.91% HTML 1.87% CSS 0.19% JavaScript 2.35%

incubator-servicecomb-saga's Introduction

Saga | 中文 Build Status Coverage StatusMaven Central License Gitter

Apache ServiceComb (incubating) Saga is an eventually data consistency solution for micro-service applications.

Features

  • High availability. The coordinator is stateless and thus can have multiple instances.
  • High reliability. All transaction events are stored in database permanently.
  • High performance. Transaction events are reported to coordinator via gRPC and transaction payloads are serialized/deserialized by Kyro.
  • Low invasion. All you need to do is add 2-3 annotations and the corresponding compensate methods.
  • Easy to deploy. All components can boot via docker.
  • Support both forward(retry) and backward(compensate) recovery.
  • Easy to extend other coordination protocol which is based on the Pack.

Architecture

Saga Pack is composed of alpha and omega.

  • The alpha plays as the coordinator. It is responsible for the management of transactions.
  • The omega plays as an agent inside the micro-service. It intercepts incoming/outgoing requests and reports transaction events to alpha.

The following diagram shows the relationships among alpha, omega and services. Saga Pack Architecture

In this way, we can implement different coordination protocols, such as saga and TCC. See Saga Pack Design for details.

Now we have different lanaguage implementation of Omega

Get Started

  • For ServiceComb Java Chassis application, please see Booking Demo for details.
  • For Spring applications, please see Booking Demo for details.
  • For Dubbo applications, please see Dubbo Demo for details.
  • For TCC with Spring application, please see Tcc Demo for details.
  • To debug the applications, please see Spring Demo Debugging for details.

Build and Run the tests from source

  • Build the source code and run the tests
       $ mvn clean install
  • Build the source demo docker images and run the accept tests
       $ mvn clean install -Pdemo,docker
  • Current Saga code supports Spring Boot 1.x and Spring Boot 2.x at the same time, saga uses Spring Boot 1.x by default, you can use -Pspring-boot-2 to switch Spring Boot version to 2.x. Since Spring Boot supports JDK9 since 2.x, if you want to build and run test the Saga with JDK9 or JDK10, you need to use the spring-boot-2 profile.
       $ mvn clean install -Pdemo,docker,spring-boot-2

User Guide

How to build and use can refer to User Guide.

Get The Latest Release

Download Saga

Contact Us

Contributing

See Pull Request Guide for details.

License

Licensed under an Apache 2.0 license.

incubator-servicecomb-saga's People

Contributors

seanyinx avatar willemjiang avatar eric-lee-ltk avatar cherrylzhao avatar yangbor avatar komachision avatar crystaldust avatar zhfeng avatar chanjarster avatar zhang2014 avatar asifdxtreme avatar imlijinting avatar mabingo avatar zhanglongchun avatar chenhaoqing avatar oliugian avatar liuzhenyang avatar jeremyxu2010 avatar lionelpang avatar venjiang avatar david0825 avatar tanktian avatar singlex avatar geektjs avatar lijasonvip avatar lium200309 avatar tuohai666 avatar smiletomyself avatar yetiea avatar wenj91 avatar

Watchers

James Cloos avatar cdhhappy 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.