{"id":26706512,"url":"https://github.com/sahil2k07/redis-pub-sub","last_synced_at":"2026-05-01T15:39:25.363Z","repository":{"id":284589390,"uuid":"955432491","full_name":"Sahil2k07/Redis-Pub-Sub","owner":"Sahil2k07","description":"Used  Redis as  Pub-Sub in a websocket controller in golang","archived":false,"fork":false,"pushed_at":"2025-03-26T16:22:46.000Z","size":1,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-26T17:31:50.091Z","etag":null,"topics":["echo","golang","gorilla-websocket","pubsub","redis"],"latest_commit_sha":null,"homepage":"","language":"Go","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/Sahil2k07.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":"2025-03-26T16:20:23.000Z","updated_at":"2025-03-26T16:22:50.000Z","dependencies_parsed_at":"2025-03-26T17:43:00.222Z","dependency_job_id":null,"html_url":"https://github.com/Sahil2k07/Redis-Pub-Sub","commit_stats":null,"previous_names":["sahil2k07/redis-pub-sub"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sahil2k07%2FRedis-Pub-Sub","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sahil2k07%2FRedis-Pub-Sub/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sahil2k07%2FRedis-Pub-Sub/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sahil2k07%2FRedis-Pub-Sub/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Sahil2k07","download_url":"https://codeload.github.com/Sahil2k07/Redis-Pub-Sub/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245791956,"owners_count":20672671,"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":["echo","golang","gorilla-websocket","pubsub","redis"],"created_at":"2025-03-27T06:18:07.783Z","updated_at":"2026-05-01T15:39:25.355Z","avatar_url":"https://github.com/Sahil2k07.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Redis-Pub-Sub\n\nThis project explores how Redis Pub/Sub can be used to implement a real-time chat system using WebSockets. It mimics a real-world chat room where messages are published to a Redis channel and received by subscribed clients.\n\n⚠️ Note: This is a proof-of-concept and not a production-ready implementation. However, it effectively demonstrates how Redis can be leveraged as a Pub/Sub mechanism for real-time communication.\n\n## Features\n\n- WebSocket-based real-time messaging\n\n- Redis Pub/Sub for message broadcasting\n\n- Multiple users can join the same chat room\n\n- Echo framework for handling WebSocket connections\n\n## Try it for yourself\n\n### Start with a Redis instance\n\n1. Use a redis instance, better to use a docker container, download `docker` first.\n\n   [Docker Download Page](https://docs.docker.com/engine/install/)\n\n2. Pull the redis image from dockerhub\n\n   ```bash\n    docker pull redis\n   ```\n\n3. Start the redis container\n\n   ```bash\n    docker run --name redis-container -p 6379:6379 -d redis\n   ```\n\n   for each consecutive use\n\n   ```bash\n    docker start redis-container\n   ```\n\n4. If you want to use the Redis-CLI\n\n   ```bash\n    docker exec -it redis-container redis-cli\n   ```\n\n### Set-Up the project\n\n1. Clone the project\n\n   ```bash\n    git clone https://github.com/Sahil2k07/Redis-Pub-Sub.git\n   ```\n\n2. Change Directory\n\n   ```bash\n    cd Redis-Pub-Sub\n   ```\n\n3. Get all the packages\n\n   ```bash\n    go mod download\n   ```\n\n4. Get the vendor ( optional )\n\n   ```bash\n    go mod vendor\n   ```\n\n5. Start the project\n\n   ```bash\n    go run .\n   ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsahil2k07%2Fredis-pub-sub","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsahil2k07%2Fredis-pub-sub","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsahil2k07%2Fredis-pub-sub/lists"}