{"id":16957915,"url":"https://github.com/joshnuss/xuber2","last_synced_at":"2025-04-11T21:52:38.252Z","repository":{"id":66379982,"uuid":"114158814","full_name":"joshnuss/xuber2","owner":"joshnuss","description":"An example ridesharing app built with Elixir","archived":false,"fork":false,"pushed_at":"2018-12-22T13:45:33.000Z","size":96,"stargazers_count":28,"open_issues_count":0,"forks_count":12,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-11T21:52:33.511Z","etag":null,"topics":["actor-model","elixir","geolocation"],"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/joshnuss.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-12-13T19:08:36.000Z","updated_at":"2024-11-08T16:11:07.000Z","dependencies_parsed_at":"2023-02-21T04:45:56.322Z","dependency_job_id":null,"html_url":"https://github.com/joshnuss/xuber2","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshnuss%2Fxuber2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshnuss%2Fxuber2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshnuss%2Fxuber2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshnuss%2Fxuber2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joshnuss","download_url":"https://codeload.github.com/joshnuss/xuber2/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248487733,"owners_count":21112188,"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":["actor-model","elixir","geolocation"],"created_at":"2024-10-13T22:20:33.753Z","updated_at":"2025-04-11T21:52:38.244Z","avatar_url":"https://github.com/joshnuss.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# XUber\n\nA reference design for a ride sharing application (similar to Uber \u0026 Lyft)\n\n## Overview\n\nRide sharing apps are uniquely suited to Elixir/Erlang because the are:\n\n- **Asynchronous**: examples of async operations are passenger requesting a ride, drivers notifying the server of their locations, broadcasting a driver's coordinates to mutiple passengers.\n- **Parallel**: Millions of peers can be connected simultaneously (theoretically, not yet benchmarked).\n- **Soft-realtime**: Communication between drivers \u0026 passengers occur in near realtime (subsecond).\n- **Full-duplex**: Phoenix supports full-duplex WebSockets between mobile device and cloud.\n- **Fault tolerance**: Failures do no propagate. For example a exception in a specific ride cannot effect another, same goes for a node, cell and data center.\n- **Resiliency**: Failures can have backup plans. For example, if a driver is not responding to a pickup request, a different driver can be dispatched.\n- **Multi DC**: The management of drivers and passengers is sharded geographically (like a cell phone network). If failure occurs in a specific geographic region, other regions are unaffected.\n\n## Installation\n\n```bash\nhub clone joshnuss/xuber2\ncd xuber2\nmix do deps.get, ecto.create, ecto.migrate\n```\n\n## Running examples\n\n```\nmix run --no-halt examples/basic.exs\n```\n\n## Actual log data\n\n```\nPassenger `mary` has joined at coordinates {10, 10}\nDriver `tom` has joined at coordinates {10, 10}\nDriver `tom` has indicated they are available\nPassenger `mary` is searching for drivers within 5km of coordinates {10, 10}\nPassenger `mary` found drivers: `tom` @distance=0.0km\nPassenger `mary` is searching for drivers within 5km of coordinates {10, 10}\nPassenger `mary` found drivers: `tom` @distance=0.0km\nPassenger `mary` is searching for drivers within 5km of coordinates {10, 10}\nPassenger `mary` found drivers: `tom` @distance=0.0km\nPassenger `mary` has requested a pickup at coordinates {10, 10}\nDispatcher received request for pickup at {10, 10} for `mary`\nDispatcher assigned driver `tom` to pickup `mary`\nDriver `tom` has been notified to pickup passenger `mary`, pickup #PID\u003c0.878.0\u003e\nPassenger `mary` has been notified that driver `tom` will pick them up, pickup #PID\u003c0.878.0\u003e\nDriver `tom` has moved to coordinates {10, 15}\nDriver `tom` has moved to coordinates {10, 16}\nDriver `tom` has arrived at destination {10, 16}\nRide #PID\u003c0.879.0\u003e has started for passenger `mary` and driver `tom`\nDriver `tom` has departed, ride #PID\u003c0.879.0\u003e\nPassenger `mary` has been picked up and is departing with ride #PID\u003c0.879.0\u003e\nRide #PID\u003c0.879.0\u003e is at {10, 16}\nDriver `tom` has moved to coordinates {10, 16}\nRide #PID\u003c0.879.0\u003e is at {10, 16}\nPassenger `mary` has moved to coordinates {10, 16}\nDriver `tom` has moved to coordinates {10, 17}\nRide #PID\u003c0.879.0\u003e is at {10, 17}\nPassenger `mary` has moved to coordinates {10, 17}\nRide #PID\u003c0.879.0\u003e is at {10, 17}\nRide #PID\u003c0.879.0\u003e is at {10, 18}\nDriver `tom` has moved to coordinates {10, 18}\nPassenger `mary` has moved to coordinates {10, 18}\nRide #PID\u003c0.879.0\u003e is at {10, 18}\nPassenger `mary` has arrived at destination {10, 18}\nDriver `tom` has dropped off passenger `mary` at coordinates {10, 18}\nRide #PID\u003c0.879.0\u003e has been completed. Dropoff location was {10, 18}\nPassenger `mary` has gone offline\nDriver `tom` has indicated they are unavailable\nDriver `tom` has gone offline\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoshnuss%2Fxuber2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoshnuss%2Fxuber2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoshnuss%2Fxuber2/lists"}