{"id":16490425,"url":"https://github.com/sangqle/message-platform","last_synced_at":"2025-03-01T06:22:24.884Z","repository":{"id":65310957,"uuid":"584482518","full_name":"sangqle/message-platform","owner":"sangqle","description":"Implement a high-load messaging system, use Cassandra for heavy writing, and Kafka for a message broker and message queue system","archived":false,"fork":false,"pushed_at":"2023-01-31T02:11:07.000Z","size":880,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-11T20:33:13.272Z","etag":null,"topics":["cassandra","high-performance","kafka","message-broker","mysql","redis"],"latest_commit_sha":null,"homepage":"","language":"Java","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/sangqle.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}},"created_at":"2023-01-02T17:35:49.000Z","updated_at":"2023-01-16T07:48:55.000Z","dependencies_parsed_at":"2023-02-16T14:30:51.563Z","dependency_job_id":null,"html_url":"https://github.com/sangqle/message-platform","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/sangqle%2Fmessage-platform","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sangqle%2Fmessage-platform/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sangqle%2Fmessage-platform/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sangqle%2Fmessage-platform/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sangqle","download_url":"https://codeload.github.com/sangqle/message-platform/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241325521,"owners_count":19944381,"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":["cassandra","high-performance","kafka","message-broker","mysql","redis"],"created_at":"2024-10-11T13:47:57.950Z","updated_at":"2025-03-01T06:22:24.863Z","avatar_url":"https://github.com/sangqle.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# The system operation flow is inspired by the model below\n\nYou can refer in github link: [Go to site](https://github.com/codekarle/system-design/tree/master/system-design-prep-material/architecture-diagrams)\n\nAnd some refer from [ACE-the system interview design](https://towardsdatascience.com/ace-the-system-interview-design-a-chat-application-3f34fd5b85d0)\n\n![architecture flow](assets/message-architecture.png)\n\n# How to start (may be later)\n## Setup Docker\nIn root directory\n### Setup Redis for User Mapping Service\n```bash\ndocker run -d --name some-redis -p 6379:6379 redis\n```\n\n### Setup Mysql for User Service (maybe use later, this is optional)\n```bash\ndocker run --name jmysql -e MYSQL_ROOT_PASSWORD=root -p 3307:3306 -d mysql:latest\n```\n### Setup Cassandra for message service\n```code\n./setup-config.sh\n```\nRun docker compose Cassandra it will be create 3 nodes as docker-compsose define\n```code\ndocker-compose up\n```\n\nsetup cassandra for sorting data:\n```bash\n$cqlsh:spring_cassandra\u003e CREATE TABLE spring_cassandra.messages(id text, conversationId text, content text, recipientUserId bigint, authorUserId bigint, replyMessageId text, createdAt bigint, updatedAt bigint, isDeleted boolean, PRIMARY KEY(conversationId, createdat));\n```\n```bash\n$cqlsh:spring_cassandra\u003e CREATE TABLE spring_cassandra.conversations(id text, title text, participantuserids map\u003cbigint,text\u003e, owneruserid bigint, createdAt bigint, updatedAt bigint, isDeleted boolean, PRIMARY KEY((owneruserid), updatedat));\n\nINSERT INTO conversations (id, owneruserid, createdat, updatedat, isdeleted, participantuserids, title) VALUES ('96045da2-00ab-46b3-824f-d1e86c98efe6', 276260728, 1, 1, False, {276260728: 'c947df16-38ba-48a3-974d-9faa437448cf', 276260729: 'c947df16-38ba-48a3-974d-9faa437448cg'}, 'conversation1');\n\nINSERT INTO conversations (id, owneruserid, createdat, updatedat, isdeleted, participantuserids, title) VALUES ('96045da2-00ab-46b3-824f-d1e86c98efe7', 276260728, 3, 3, False, {276260728: 'c947df16-38ba-48a3-974d-9faa437448cg', 276260729: 'c947df16-38ba-48a3-974d-9faa437448ch'}, 'conversation2');\n```\n## Run Spring boot project\n\n```code\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsangqle%2Fmessage-platform","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsangqle%2Fmessage-platform","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsangqle%2Fmessage-platform/lists"}