{"id":17053750,"url":"https://github.com/relrin/notifications-service","last_synced_at":"2025-07-14T22:36:24.302Z","repository":{"id":216175125,"uuid":"735920322","full_name":"Relrin/notifications-service","owner":"Relrin","description":"[Experimental] Notifications service","archived":false,"fork":false,"pushed_at":"2024-01-08T18:22:59.000Z","size":70,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-28T12:34:56.113Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Relrin.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}},"created_at":"2023-12-26T13:11:02.000Z","updated_at":"2024-01-08T18:25:00.000Z","dependencies_parsed_at":"2024-01-08T20:48:37.498Z","dependency_job_id":null,"html_url":"https://github.com/Relrin/notifications-service","commit_stats":null,"previous_names":["relrin/notifications-service"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Relrin%2Fnotifications-service","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Relrin%2Fnotifications-service/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Relrin%2Fnotifications-service/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Relrin%2Fnotifications-service/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Relrin","download_url":"https://codeload.github.com/Relrin/notifications-service/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245061384,"owners_count":20554563,"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":[],"created_at":"2024-10-14T10:13:08.623Z","updated_at":"2025-03-23T05:44:02.423Z","avatar_url":"https://github.com/Relrin.png","language":"Elixir","readme":"# notifications-service\n[Experimental] Notifications service\n\nThis repository contains a microservice prototype that exposes PubSub features for game clients over WebSocket connections.  \nBuilt on the top of Elixir \u0026 Phoenix framework to provide better experience on handling traffic in distributed systems.\n\n### Features\n- [x] Uses latest Elixir \u0026 Phoenix framework\n- [x] Utilizes Redis as a service to broadcast messages across server instances \n- [x] Ability to switch from Redis to Elixir OTP features, that allow directly broadcasting notifications between servers\n- [x] Exposes PubSub communications over WebSocket connections (or potentially switch back to long-polling)\n- [x] Exposes Protobuf endpoints that allows to talk the service\n- [x] Authorization \u0026 authentication for the WebSocket connection \u0026 channels\n\n### Running a dev environment\nTo start up a service locally you would need to have installed Docker. \n\nFirst, we would need to start up all the dependencies via a single docker compose command:\n```\ndocker-compose -f docker-compose.dev.yaml up -d\n```\nThis command will download all required Docker images for running an Elixir app \u0026 Redis database.\n\nAfter the installation process, you would need only to connect to the application container:\n```\ndocker-compose -f docker-compose.dev.yml exec app bash\n```\n\nThen we would need to install a protobuf plugin for Elixir, generate protos \u0026 pull dependencies:\n```\nmix setup_protobuf \u0026\u0026 export PATH=~/.mix/escripts:$PATH\nprotoc --elixir_out=plugins=grpc:./lib/ proto/notifications.proto\nmix deps.get\n```\n\nand start the application itself:\n```\nmix run\n```\n\n### Clients\nThe list of available and officially supported clients can be found [here](https://hexdocs.pm/phoenix/channels.html#client-libraries)\n\nReferences to what under the hood of the client:\n- [Graeme Hill's Dev Blog - Websocket Clients and Phoenix Channels](http://graemehill.ca/websocket-clients-and-phoenix-channels/)\n- [Phoenix guides: Channels](https://github.com/jeffkreeftmeijer/phoenix_guides-examples/blob/master/channels.md)\n- [GitHub - Phoenix.JS client source code](https://github.com/phoenixframework/phoenix/blob/v1.2/web/static/js/phoenix.js)\n\n### Recommended resources to read\nIf you're wondering how this microservice was built, it works or in general you would like to know more about the Elixir, then I would recommend following books \u0026 articles:\n- [Elixir in Action](https://www.manning.com/books/elixir-in-action-second-edition)\n- [Real-Time Phoenix: Build Highly Scalable Systems with Channels](https://pragprog.com/titles/sbsockets/real-time-phoenix/) \n- [Phoenix Websockets under a microscope](https://zorbash.com/post/phoenix-websockets-under-a-microscope/)\n- Official Phoenix framework documentation:\n  - [Phoenix Controllers](https://hexdocs.pm/phoenix/controllers.html)\n  - [Phoenix Channels](https://hexdocs.pm/phoenix/channels.html)\n\nFor more information you can also check the [Community](https://hexdocs.pm/phoenix/community.html) page of the Phoenix framework.\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frelrin%2Fnotifications-service","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frelrin%2Fnotifications-service","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frelrin%2Fnotifications-service/lists"}