{"id":28578338,"url":"https://github.com/digitalocean/pixels-to-cloud","last_synced_at":"2025-06-11T01:09:35.360Z","repository":{"id":247476646,"uuid":"811779262","full_name":"digitalocean/pixels-to-cloud","owner":"digitalocean","description":"pixels-to-cloud is a photo-editor app that aims to inspire developers to create high-performance, scalable, distributed systems.","archived":false,"fork":false,"pushed_at":"2024-07-09T12:15:01.000Z","size":65054,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-01-15T00:19:06.267Z","etag":null,"topics":["digitalocean-spaces","distributed-systems","grpc","protobuf","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/digitalocean.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-06-07T09:31:46.000Z","updated_at":"2024-08-09T16:40:38.000Z","dependencies_parsed_at":"2024-07-09T01:54:33.447Z","dependency_job_id":null,"html_url":"https://github.com/digitalocean/pixels-to-cloud","commit_stats":null,"previous_names":["digitalocean/pixels-to-cloud"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitalocean%2Fpixels-to-cloud","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitalocean%2Fpixels-to-cloud/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitalocean%2Fpixels-to-cloud/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitalocean%2Fpixels-to-cloud/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/digitalocean","download_url":"https://codeload.github.com/digitalocean/pixels-to-cloud/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitalocean%2Fpixels-to-cloud/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259178542,"owners_count":22817388,"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":["digitalocean-spaces","distributed-systems","grpc","protobuf","rust"],"created_at":"2025-06-11T01:09:34.428Z","updated_at":"2025-06-11T01:09:35.333Z","avatar_url":"https://github.com/digitalocean.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pixels-to-cloud\n\n`pixels-to-cloud` is a photo-editor app that aims to inspire developers to create high-performance, scalable, distributed systems. By leveraging technologies such as [gRPC](https://github.com/grpc) and DigitalOcean Object Storage [(Spaces)](https://www.digitalocean.com/products/spaces), this project showcases the potential of modern tech stacks to build robust and efficient application architectures.\n\nHere is the overview of the architecture:\n\n\u003cimg src=\"images/architecture-overview.png\" alt=\"arch\" width=\"750\" height=\"450\"\u003e\n\n## Prerequisites\n\n- **[Rust](https://www.rust-lang.org/tools/install)**\n  - Includes [Cargo: Rust package manager](https://github.com/rust-lang/cargo)\n- **[DigitalOcean Account](https://cloud.digitalocean.com/registrations/new?refcode=f6fcd01aaffb)**\n  - To create and access [DO Object Storages: Spaces](https://www.digitalocean.com/products/spaces)\n- **[Rclone](https://rclone.org/)**\n  - Spaces sync across different geographies\n\n## Setting Up DigitalOcean Spaces \u0026 Rclone\n\nTo create three DigitalOcean Spaces instances in NYC, AMS, and SYD, follow these steps:\n\n1. **Log in to Your DigitalOcean Account:**\n   - Go to [DigitalOcean](https://cloud.digitalocean.com/registrations/new?refcode=f6fcd01aaffb) and log in.\n\n2. **Navigate to Spaces Object Storage:**\n   - Access the Spaces section: [DigitalOcean Spaces](https://cloud.digitalocean.com/spaces).\n\n3. **Create Spaces across three Data Centers:**\n   - Choose data center regions:\n     - **NYC**: \"New York(nyc3)\"\n     - **AMS**: \"Amsterdam(ams3)\"\n     - **SYD**: \"Sydney(syd1)\"\n   - Name your Spaces (e.g., `pixbox-nyc`, `pixbox-ams`, `pixbox-syd`).\n   - Adjust settings as needed and click \"Create a Spaces Bucket\".\n   - For more details, refer to the [DigitalOcean Spaces Documentation](https://www.digitalocean.com/docs/spaces/).\n\n4. **Generate Spaces Access Keys:**\n   - Go to the [API section](https://cloud.digitalocean.com/account/api/tokens) to generate new Spaces Keys.\n   - Copy the **Access Key** and **Secret Key** and store them securely.\n\n5. **Configure Spaces Access using Rclone:**\n   - Run `rclone config` to set up the rclone configuration\n   - Your configuration file should be similar to the one below:\n\n    ```bash\n    # Rclone configuration example\n    [pixbox-ams]\n    type = s3\n    provider = DigitalOcean\n    env_auth = false\n    access_key_id = \u003cAccess Key\u003e\n    secret_access_key = \u003cSecret\u003e\n    endpoint = ams3.digitaloceanspaces.com\n    acl = \n\n    [pixbox-syd]\n    type = s3\n    provider = DigitalOcean\n    env_auth = false\n    access_key_id = \u003cAccess Key\u003e\n    secret_access_key = \u003cSecret\u003e\n    endpoint = syd1.digitaloceanspaces.com\n    acl = \n\n    [pixbox-nyc]\n    type = s3\n    provider = DigitalOcean\n    env_auth = false\n    access_key_id = \u003cAccess Key\u003e\n    secret_access_key = \u003cSecret\u003e\n    endpoint = nyc3.digitaloceanspaces.com\n    acl = \n    ```\n\n## Run the demo\n\n```bash\ngit clone https://github.com/digitalocean/pixels-to-cloud.git\ncd pixels-to-cloud\n```\n\nThere are three main components:\n\n- [`client`](./src/client.rs)\n- [`server`](./src/server.rs)\n- [`synchronizer`](./scripts/spaces-sync.sh)\n\nFor ease of usage, we have created a [`Makefile`](Makefile) with all the necessary commands to build/run the project.\n\n### Start the Server\n  \n  ```bash\n  # The server will start listening on localhost:9001\n  make run\n  # The above make command translates to\n  cargo run --release --bin server\n  ```\n\n### Start the Rclone Synchronizer\n\n   ```bash\n   ./scripts/spaces-sync.sh \u003cpath to the directory to be synced\u003e\n   # Example\n   ./scripts/spaces-sync.sh ./images/edited \n   ```\n\n### Using the Client\n\n```bash\n# The client is used to upload the image to be edited to the server.\nmake upload\n# The above make command translates to\ncargo run --bin client upload --imgpath \u003c/path/to/your/image\u003e\n```\n\n## Acknowledgments\n\n- [Photon: Image Processing Library in WebAssembly/Rust](https://silvia-odwyer.github.io/photon/)\n- [gRPC Community](https://grpc.io/community/)\n- [Cape Breton](./images/marg-cape-breton.jpg): Photo Courtesy - Margaret MacAfee\n\n## References\n\n- [Postman: What is gRPC?](https://blog.postman.com/what-is-grpc/)\n- [gRPC over HTTP/2 in Rust](https://www.linkedin.com/pulse/grpc-over-http2-rust-luis-soares-m-sc-/)\n- [Tonic: gRPC Client and Server Implementation](https://www.youtube.com/watch?v=kerKXChDmsE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigitalocean%2Fpixels-to-cloud","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdigitalocean%2Fpixels-to-cloud","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigitalocean%2Fpixels-to-cloud/lists"}