{"id":17948585,"url":"https://github.com/havl-code/my-redis","last_synced_at":"2025-08-09T16:20:13.636Z","repository":{"id":260033707,"uuid":"880078794","full_name":"havl-code/my-redis","owner":"havl-code","description":"A C-based project inspired by Redis, focused on building a key-value store with TCP client-server communication and basic data handling.","archived":false,"fork":false,"pushed_at":"2024-12-22T05:18:08.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-09T04:17:02.423Z","etag":null,"topics":["c","data-caching","network-programming","programming","system-programming"],"latest_commit_sha":null,"homepage":"","language":"C","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/havl-code.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":"2024-10-29T04:21:06.000Z","updated_at":"2024-12-22T05:18:10.000Z","dependencies_parsed_at":"2024-10-29T06:28:24.642Z","dependency_job_id":"14d754a1-c96a-446b-8b97-81f4e3a48683","html_url":"https://github.com/havl-code/my-redis","commit_stats":null,"previous_names":["havl-code/my-redis"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/havl-code%2Fmy-redis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/havl-code%2Fmy-redis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/havl-code%2Fmy-redis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/havl-code%2Fmy-redis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/havl-code","download_url":"https://codeload.github.com/havl-code/my-redis/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247026185,"owners_count":20871336,"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":["c","data-caching","network-programming","programming","system-programming"],"created_at":"2024-10-29T09:07:02.630Z","updated_at":"2025-04-03T15:26:17.389Z","avatar_url":"https://github.com/havl-code.png","language":"C","readme":"# My Redis-Inspired Program\n\nThis project is inspired by the \"Build Your Own Redis with C/C++\" guide. It aims to break down and implement essential features of an in-memory key-value store.\n\n## Project Goals\n- Hands-on learning: Build an understanding of systems programming with C, focusing on socket communication, memory management, data structures, and efficient client-server protocols.\n- Feature staging: Develop in incremental stages to gradually introduce network protocols, command handling, and storage techniques\n\n## Current Featues\n1. **TCP Server-Client Communication:**\n   - The server and client communicate using a structured message protocol, with each message prefixed by a 4-byte length header.\n   - The server listens on a specified port, accepts multiple requests per client connection, and returns structured responses.\n\n2. **Error Handling and Debugging:**\n   - Expanded error handling to manage socket errors, unexpected disconnections, and message size validations.\n   - Helper functions provide consistent logging and error messages for ease of debugging.\n\n3. **Pipelined Request Handling:**\n   - Managing multiple client requests in a single connection efficiently.\n\n4. **Non-blocking I/O Operations:**\n   - Implementing non-blocking reads and writes to enhance performance.\n\n## Getting Started\n### Prerequisites\n- **C Compiler**: Required for building the code\n- **Linux Environment**: The project is currently developed on Linux for compatibility with networking libraries.\n\n### Cloning the Repository\n```bash\ngit clone https://github.com/havl-code/my-redis.git\ncd my-redis\n```\n\n### Compilation and Running\n1. Compile the code:\n```bash\ngcc -o server server.c\ngcc -o client client.c\n```\n2. Run the server:\n```bash\n./server\n```\n3. Run the client in a new terminal:\n```bash\n./client\n```\nThe client will send a message to the server and receive a response.\n\n## Project Structure\n- **server.c**: Contains the server code with modular handling of client requests, structured message protocol, and multi-request capability per client connection.\n- **client.c**: Implements the client code with multiple requests to the server, modular query handling, and complete data transmission with helper functions.\n\n## Resources\nThis project is based on concepts and code from the [\"Build Your Own Redis with C/C++\"](https://build-your-own.org/redis) guide.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhavl-code%2Fmy-redis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhavl-code%2Fmy-redis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhavl-code%2Fmy-redis/lists"}