Pack | 中文
![Coverage Status](https://camo.githubusercontent.com/e367b123db9d52c44d801c273e9603434134c9aec78fa56dcebf003a79d2db71/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f6170616368652f73657276696365636f6d622d7061636b2f62616467652e7376673f6272616e63683d6d6173746572)
![License](https://camo.githubusercontent.com/3e787ad45f0862131e82fe26cfdf93deb2c5fbdd320f047942fa916088cc716e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d417061636865253230322d3445423142412e737667)
![Gitter](https://camo.githubusercontent.com/4ad9c2c0155ecfc91b7aa182bf707c1c3af9a887e14edc14f67b74847765bd05/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53657276696365436f6d622d4769747465722d6666363962342e737667)
Apache ServiceComb Pack is an eventually data consistency solution for micro-service applications.
- 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, now we have Saga and TCC support out of box.
ServiceComb 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.
In this way, we can implement different coordination protocols, such as saga and TCC. See ServiceComb Pack Design for details.
Now we have different lanaguage implementation of Omega
- Go lang version of Omega here https://github.com/jeremyxu2010/matrix-saga-go
- C# version of Omega here https://github.com/OpenSagas-csharp/servicecomb-saga-csharp
- 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 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
- Build the source code and docker images without running tests, the docker profile will be activated if the maven detects the docker installation.
$ mvn clean install -DskipTests=true -Pdemo
- Build the release kit for distribution without running the tests, then you can find the release kits in the distribution/target directory.
$ mvn clean install -DskipTests=true -Prelease
How to build and use can refer to User Guide.
Get released version:
Get snapshot version:
- We publish the snapshot version to Apache nexus repo, please add below repositories into your pom.xml.
<repositories> <repository> <releases /> <snapshots> <enabled>true</enabled> </snapshots> <id>repo.apache.snapshot</id> <url>https://repository.apache.org/content/repositories/snapshots/</url> </repository> </repositories> <pluginRepositories> <pluginRepository> <releases /> <snapshots> <enabled>true</enabled> </snapshots> <id>repo.apache.snapshot</id> <url>https://repository.apache.org/content/repositories/snapshots/</url> </pluginRepository> </pluginRepositories>
See Pull Request Guide for details.
Licensed under an Apache 2.0 license.
This distribution includes cryptographic software. The country in which you currently reside may have restrictions on the import, possession, use, and/or re-export to another country, of encryption software. BEFORE using any encryption software, please check your country's laws, regulations and policies concerning the import, possession, or use, and re-export of encryption software, to see if this is permitted. See http://www.wassenaar.org/ for more information.
The Apache Software Foundation has classified this software as Export Commodity Control Number (ECCN) 5D002, which includes information security software using or performing cryptographic functions with asymmetric algorithms. The form and manner of this Apache Software Foundation distribution makes it eligible for export under the "publicly available" Section 742.15(b) exemption (see the BIS Export Administration Regulations, Section 742.15(b)) for both object code and source code.
The following provides more details on the included cryptographic software:
- Omega/Alpha Transport can be configured use https