{"id":20532255,"url":"https://github.com/unitvectory-labs/crossfiresync-pubsub","last_synced_at":"2026-03-02T22:11:17.605Z","repository":{"id":233660903,"uuid":"787637292","full_name":"UnitVectorY-Labs/crossfiresync-pubsub","owner":"UnitVectorY-Labs","description":"Reference implementation of a crossfiresync Pub/Sub consumer, featuring Java code and deployment scripts for Cloud Functions.","archived":false,"fork":false,"pushed_at":"2025-02-15T21:52:47.000Z","size":68,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-15T22:27:52.692Z","etag":null,"topics":["crossfiresync","gcp-firestore","java-17"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/UnitVectorY-Labs.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":"2024-04-16T22:38:10.000Z","updated_at":"2025-02-15T21:52:50.000Z","dependencies_parsed_at":"2024-04-17T02:49:48.517Z","dependency_job_id":"1b9ccc6f-46ed-4329-88ef-613926b5e4c8","html_url":"https://github.com/UnitVectorY-Labs/crossfiresync-pubsub","commit_stats":null,"previous_names":["unitvectory-labs/crossfiresync-pubsub"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UnitVectorY-Labs%2Fcrossfiresync-pubsub","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UnitVectorY-Labs%2Fcrossfiresync-pubsub/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UnitVectorY-Labs%2Fcrossfiresync-pubsub/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UnitVectorY-Labs%2Fcrossfiresync-pubsub/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/UnitVectorY-Labs","download_url":"https://codeload.github.com/UnitVectorY-Labs/crossfiresync-pubsub/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242138803,"owners_count":20078007,"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":["crossfiresync","gcp-firestore","java-17"],"created_at":"2024-11-16T00:13:54.954Z","updated_at":"2026-03-02T22:11:12.577Z","avatar_url":"https://github.com/UnitVectorY-Labs.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![Active](https://img.shields.io/badge/Status-Active-green)](https://guide.unitvectorylabs.com/bestpractices/status/#active)\n\n# crossfiresync-pubsub\n\nReference implementation of a [crossfiresync](https://github.com/UnitVectorY-Labs/crossfiresync) Pub/Sub consumer, featuring Java code and deployment scripts for Cloud Functions.\n\n## References\n\n- [crossfiresync](https://github.com/UnitVectorY-Labs/crossfiresync) - A Java library enabling real-time synchronization between GCP Firestore instances across regions using Pub/Sub.\n- [crossfiresyncrun](https://github.com/UnitVectorY-Labs/crossfiresyncrun) - Provides real-time synchronization between GCP Firestore instances across regions using Pub/Sub, packaged as a Docker image for deployment on Cloud Run.\n- [crossfiresyncrun-tofu](https://github.com/UnitVectorY-Labs/crossfiresyncrun-tofu) - A module for OpenTofu that deploys crossfiresyncrun to GCP Cloud Run, along with configuring essential services including Firestore and Pub/Sub.\n- [crossfiresync-firestore](https://github.com/UnitVectorY-Labs/crossfiresync-firestore) - Reference implementation of a crossfiresync Firestore publisher, featuring Java code and deployment scripts for Cloud Functions.\n- [crossfiresync-pubsub](https://github.com/UnitVectorY-Labs/crossfiresync-pubsub) - Reference implementation of a crossfiresync Pub/Sub consumer, featuring Java code and deployment scripts for Cloud Functions.\n\n## Overview\n\nThe examples in this repository assume 3 regions are used, but this is just for demonstration purposes.  Any number of regions can be used in practice.\n\nFor this example the database names are used:\n\n- **alpha** in `us-central`\n- **beta** in `us-east1`\n- **gamma** in `us-west1`\n\nThe PubSub topic name for this example is `crossfiresync`.\n\nThis repository is only for deploying `crossfiresync-pubsub` the corresponding deployments of [crossfiresync-firestore](https://github.com/UnitVectorY-Labs/crossfiresync-firestore) must also be completed for replication to function.\n\n## Single Region Primary\n\nIn this single region example `us-east1` and `us-west1` are the replica regions.\n\n```mermaid\nflowchart LR\n\nsubgraph us-east1\n    crossfiresync-pubsub-east[crossfiresync-pubsub]\n    beta[(beta)]\nend\nsubgraph us-central1\n    crossfiresync-firestore-central[crossfiresync-firestore]\n    alpha[(alpha)]\nend\nsubgraph us-west1\n    crossfiresync-pubsub-west[crossfiresync-pubsub]\n    gamma[(gamma)]\nend\n\ncrossfiresync-firestore-central --\u003e PubSub\u003ePubSub\\ncrossfiresync]\n\nPubSub --\u003e crossfiresync-pubsub-east\nPubSub --\u003e crossfiresync-pubsub-west\n\nclassDef function fill:#90EE90,stroke:#000000,stroke-width:2px;\nclass crossfiresync-pubsub-east,crossfiresync-pubsub-west function;\n```\n\nThe deployment for this example requires deploying `crossfiresync-pubsub` to `us-east1` and `us-west1` as that are the replica regions\n\n```\nbash ./deploy-single-region-primary.sh us-east1 crossfiresync beta\nbash ./deploy-single-region-primary.sh us-west1 crossfiresync gamma\n```\n\n## Multi Region Primary\n\nIn the multi-region example `us-east1`, `us-central1`, and `us-west1` are all able to handle writes.\n\n```mermaid\nflowchart LR\n\nsubgraph us-east1\n    crossfiresync-firestore-east[crossfiresync-firestore]\n    crossfiresync-pubsub-east[crossfiresync-pubsub]\n    beta[(beta)]\nend\nsubgraph us-central1\n    crossfiresync-firestore-central[crossfiresync-firestore]\n    crossfiresync-pubsub-central[crossfiresync-pubsub]\n    alpha[(alpha)]\nend\nsubgraph us-west1\n    crossfiresync-firestore-west[crossfiresync-firestore]\n    crossfiresync-pubsub-west[crossfiresync-pubsub]\n    gamma[(gamma)]\nend\nPubSub\u003ePubSub\\ncrossfiresync]\ncrossfiresync-firestore-east --\u003e PubSub\ncrossfiresync-firestore-central --\u003e PubSub\ncrossfiresync-firestore-west --\u003e PubSub\n\nPubSub --\u003e crossfiresync-pubsub-east\nPubSub --\u003e crossfiresync-pubsub-central\nPubSub --\u003e crossfiresync-pubsub-west\n\nclassDef function fill:#90EE90,stroke:#000000,stroke-width:2px;\nclass crossfiresync-pubsub-central,crossfiresync-pubsub-east,crossfiresync-pubsub-west function;\n```\n\nThe deployment for this example requires deploying `crossfiresync-pubsub` to all 3 regions.\n\n```\nbash ./deploy-multi-region-primary.sh us-central1 crossfiresync alpha\nbash ./deploy-multi-region-primary.sh us-east1 crossfiresync beta\nbash ./deploy-multi-region-primary.sh us-west1 crossfiresync gamma\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funitvectory-labs%2Fcrossfiresync-pubsub","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funitvectory-labs%2Fcrossfiresync-pubsub","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funitvectory-labs%2Fcrossfiresync-pubsub/lists"}