{"id":13612963,"url":"https://github.com/wuqinqiang/easycar","last_synced_at":"2025-10-27T13:17:49.015Z","repository":{"id":61623213,"uuid":"423098390","full_name":"wuqinqiang/easycar","owner":"wuqinqiang","description":"A simple distributed transaction framework implemented by go","archived":false,"fork":false,"pushed_at":"2023-05-03T04:44:52.000Z","size":423,"stargazers_count":69,"open_issues_count":0,"forks_count":5,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-08-02T20:44:57.653Z","etag":null,"topics":["distributed-transaction","easycar","golang","grpc","saga","tcc"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wuqinqiang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-10-31T08:58:57.000Z","updated_at":"2024-05-31T08:13:10.000Z","dependencies_parsed_at":"2024-06-19T15:45:26.885Z","dependency_job_id":"ca8bbe76-8a37-4a33-92c5-2a89bdfe9e79","html_url":"https://github.com/wuqinqiang/easycar","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wuqinqiang%2Feasycar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wuqinqiang%2Feasycar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wuqinqiang%2Feasycar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wuqinqiang%2Feasycar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wuqinqiang","download_url":"https://codeload.github.com/wuqinqiang/easycar/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219843493,"owners_count":16556504,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["distributed-transaction","easycar","golang","grpc","saga","tcc"],"created_at":"2024-08-01T20:00:37.330Z","updated_at":"2025-10-27T13:17:48.925Z","avatar_url":"https://github.com/wuqinqiang.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# easycar\n\n[简体中文](https://github.com/wuqinqiang/easycar/blob/main/README_CN.md)\n\n## What is easycar？\n\neasycar is a distributed transaction framework implemented in go that supports a two-phase commit protocol. Its full\nname is (easy commit and rollback).\n\nFor more information about easycar see this post [easycar](https://www.syst.top/posts/go/easycar/).\n\nArchitecture\n\n![easycar](https://cdn.syst.top/easycar2.jpg)\n\n## Features\n\n**Supports both protocol and transaction mode mixing**\n\nIn a set of distributed transactions, each RM can use a different transport protocol (HTTP/gRPC) and transaction mode (\nTCC/Sage...), so it allows a mix of RM protocols and transaction modes.\n\n**Support for concurrent execution of transactions**\n\nSupports concurrent execution in layers. The participating RMs are layered by the set weights, and RMs in the same layer\ncan be invoked concurrently, and the next layer is processed after one layer is finished.\n\n**Service Registration and Discovery**\n\nCurrently supports etcd and consul.\n\n**Client-side load balancing**\n\n**Support**：\n\n- IPHash\n- ConsistentHash\n- P2C\n- Random\n- R2\n- LeastLoad\n- Bounded\n\n## Examples of success\n\n![success](https://cdn.syst.top/success2.png)\n\n## Examples of failed\n\n![success](https://cdn.syst.top/failed2.png)\n\n## State\n\n**global state**\n![global](https://cdn.syst.top/state3.png)\n\n## Run\n\n```shell\ncp conf.example.yml conf.ymal\n```\n\n**Modify configuration**\n\n```ymal\n## conf\nautomaticExecution2: true  #when the first stage of execution ends, it will commit automatically or rollback if it is true\ntimeout: 7 #unit of second\nserver:\n  grpc:\n    listenOn: 127.0.0.1:8088\n    keyFile:   #server key\n    certFile:  #server cert\n    gateway:\n      isOpen: true\n      certFile:  #client cert\n      serverName:\n  http:\n    listenOn: 127.0.0.1:8085\n\ndb: #easycar server db\n  driver: mongodb\n  mysql:\n    dbURL: easycar:easycar@tcp(127.0.0.1:3306)/easycar?charset=utf8\u0026parseTime=True\u0026loc=Local\n    maxLifetime: 7200\n    maxIdleConns: 10\n    maxOpenConns: 20\n  mongodb:\n    url: mongodb://127.0.0.1:27017/easycar\n    minPool: 10\n    maxPool: 20\n\nregistry: \n  etcd:\n    user: \"\"\n    pass: \"\"\n    hosts:\n      - 127.0.0.1:2379\n  #add more\n\ntracing:\n  jaegerUrl: http://localhost:14268/api/traces\n\ncron:\n  maxTimes: 2   #max retry times when rm is not available\n  timeInterval: 1 #unit is minute. it means that the next retry is 1m later, not in strict mode  \n```\n\n**run**\n```shell\ngo run cmd/main.go \n```\n\n**docker-compose**\n```shell\ndocker-compose up -d easycar\n```\n\n## examples\n\nmore examples to:[examples](https://github.com/easycar/examples)\n\n## todo list\n\n- [x] Saga\n- [x] TCC\n- [ ] XA\n- [ ] client\n  - [x] client-go\n  - [ ] client-rust\n  - [ ] client-php\n  - [ ] client-python\n  - [ ] client-java\n- [x] retry\n- [x] registry and discovery\n  - [x] etcd\n  - [x] consul\n- [x] balancer\n- [x] notify\n- [x] tracing\n- [ ] tool\n- more store\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwuqinqiang%2Feasycar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwuqinqiang%2Feasycar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwuqinqiang%2Feasycar/lists"}