{"id":25536187,"url":"https://github.com/bhaskarblur/distributed-chat-system","last_synced_at":"2026-01-27T13:32:10.225Z","repository":{"id":264478489,"uuid":"893479434","full_name":"bhaskarblur/Distributed-Chat-System","owner":"bhaskarblur","description":"A scalable, distributed chat system built with Go - Gin, Kafka, and WebSocket. Distributes messages over services via Kafka","archived":false,"fork":false,"pushed_at":"2024-11-24T19:35:13.000Z","size":56,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2025-05-29T21:35:39.432Z","etag":null,"topics":["chat-application","gin-gonic","golang","kafka","redis","websocket"],"latest_commit_sha":null,"homepage":"","language":"Go","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/bhaskarblur.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,"zenodo":null}},"created_at":"2024-11-24T14:58:27.000Z","updated_at":"2025-01-05T10:07:36.000Z","dependencies_parsed_at":"2024-11-24T16:34:29.978Z","dependency_job_id":"6621ba1f-41db-454f-9629-3239df1ad7bd","html_url":"https://github.com/bhaskarblur/Distributed-Chat-System","commit_stats":null,"previous_names":["bhaskarblur/distributed-chat-system"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bhaskarblur/Distributed-Chat-System","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhaskarblur%2FDistributed-Chat-System","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhaskarblur%2FDistributed-Chat-System/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhaskarblur%2FDistributed-Chat-System/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhaskarblur%2FDistributed-Chat-System/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bhaskarblur","download_url":"https://codeload.github.com/bhaskarblur/Distributed-Chat-System/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhaskarblur%2FDistributed-Chat-System/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28813537,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T12:25:15.069Z","status":"ssl_error","status_checked_at":"2026-01-27T12:25:05.297Z","response_time":168,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["chat-application","gin-gonic","golang","kafka","redis","websocket"],"created_at":"2025-02-20T04:30:34.066Z","updated_at":"2026-01-27T13:32:10.220Z","avatar_url":"https://github.com/bhaskarblur.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Distributed Chat System\n\nA scalable, distributed chat system built with Go, Kafka, and WebSocket. This system enables real-time communication between users, leveraging Kafka for message brokering and WebSocket for maintaining persistent connections.\n\n---\n\n## Features\n\n- **Real-time Messaging**: Supports instant communication using WebSocket.\n- **Scalability**: Designed to handle a large number of users and messages with Kafka's horizontal scaling.\n- **Distributed Architecture**: Runs multiple chat service instances seamlessly.\n- **Dynamic Message Routing**: Routes messages to the correct chat service based on user connections.\n- **Fault Tolerance**: Ensures reliable message delivery, even during failures.\n- **Dynamic Topic Creation**: Automatically creates Kafka topics for new server instances.\n\n---\n\n## Architecture\n\n1. **WebSocket Layer**:\n   - Maintains persistent connections with users.\n   - Forwards received messages to Kafka.\n\n2. **Kafka (Message Broker)**:\n   - Distributes messages across chat service instances.\n   - Routes messages to appropriate partitions based on `ServerId`.\n\n3. **Chat Services**:\n   - Each service consumes messages from Kafka partitions.\n   - Sends messages to connected users via WebSocket.\n\n4. **User-to-Server Mapping**:\n   - Maintains a mapping of which user is connected to which server.\n   - Ensures message delivery to the correct server.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbhaskarblur%2Fdistributed-chat-system","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbhaskarblur%2Fdistributed-chat-system","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbhaskarblur%2Fdistributed-chat-system/lists"}