{"id":31759327,"url":"https://github.com/chassisframework/two_phase_commit","last_synced_at":"2025-10-09T20:56:50.083Z","repository":{"id":62430584,"uuid":"305539043","full_name":"chassisframework/two_phase_commit","owner":"chassisframework","description":"(WIP) Two Phase Commit state machine for Elixir","archived":false,"fork":false,"pushed_at":"2022-01-02T07:48:03.000Z","size":15,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-20T16:00:29.959Z","etag":null,"topics":["2pc","distributed-systems","elixir","two-phase-commit"],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chassisframework.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-10-19T23:39:46.000Z","updated_at":"2023-07-11T17:27:23.000Z","dependencies_parsed_at":"2022-11-01T20:22:18.709Z","dependency_job_id":null,"html_url":"https://github.com/chassisframework/two_phase_commit","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/chassisframework/two_phase_commit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chassisframework%2Ftwo_phase_commit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chassisframework%2Ftwo_phase_commit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chassisframework%2Ftwo_phase_commit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chassisframework%2Ftwo_phase_commit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chassisframework","download_url":"https://codeload.github.com/chassisframework/two_phase_commit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chassisframework%2Ftwo_phase_commit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279001904,"owners_count":26083260,"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","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["2pc","distributed-systems","elixir","two-phase-commit"],"created_at":"2025-10-09T20:56:48.493Z","updated_at":"2025-10-09T20:56:50.079Z","avatar_url":"https://github.com/chassisframework.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TwoPhaseCommit\n\n*WORK IN PROGRESS*\n\n[Two Phase Commit](https://en.wikipedia.org/wiki/Two-phase_commit_protocol) state machine model.\n\nYou can use the state machine to build a transaction coordinator, there's a bare-bones GenServer [implementation](example/lib/coordinator.ex) included.\n\n## Installation\n\nThe package can be installed by adding `two_phase_commit` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:two_phase_commit, \"~\u003e 0.1.0\"}\n  ]\nend\n```\n\nThe docs can be found at [https://hexdocs.pm/two_phase_commit](https://hexdocs.pm/two_phase_commit).\n\n## State Machine Diagram\n\n```\n\n                             +\n                             |\n                             | new/2\n                             |\n                             v\n                     +-------+------+\n                  +--+              |\nadd_participant/2 |  | :interactive |\n                  +-\u003e+              |                aborted/2\n                     +-------+------+\n                             |                       +------+\n                             | prepare/1             |      |\n                             v                       |      v\n                     +-------+------+           +----+------+---+               +---------------+\n                  +--+              | aborted/2 |               | rolled_back/2 |               |\n       prepared/2 |  |   :voting    +----------\u003e+ :rolling_back +--------------\u003e+   :aborted    |\n                  +-\u003e+              |           |               |               |               |\n                     +-------+------+           +----+------+---+               +---------------+\n                             |                       |      ^\n                             | prepared/2            |      |\n                             v                       +------+\n                     +-------+-------+\n                  +--+               |             rolled_back/2\n      committed/2 |  |  :committing  |\n                  +-\u003e+               |\n                     +-------+-------+\n                             |\n                             | committed/2\n                             v\n                     +-------+-------+\n                     |               |\n                     |  :committed   |\n                     |               |\n                     +---------------+\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchassisframework%2Ftwo_phase_commit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchassisframework%2Ftwo_phase_commit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchassisframework%2Ftwo_phase_commit/lists"}