{"id":25332216,"url":"https://github.com/ashvegeta/polygrid","last_synced_at":"2026-05-02T11:35:15.816Z","repository":{"id":277420872,"uuid":"916929863","full_name":"ashvegeta/PolyGrid","owner":"ashvegeta","description":"grid of diverse microservices working together with use of gRPC, REST, Docker and Kubernetes","archived":false,"fork":false,"pushed_at":"2025-02-13T20:18:28.000Z","size":14220,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-13T21:26:35.084Z","etag":null,"topics":["golang","grpc","nodejs","python"],"latest_commit_sha":null,"homepage":"","language":"Python","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/ashvegeta.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":"2025-01-15T02:53:26.000Z","updated_at":"2025-02-13T20:19:27.000Z","dependencies_parsed_at":"2025-02-13T21:36:59.873Z","dependency_job_id":null,"html_url":"https://github.com/ashvegeta/PolyGrid","commit_stats":null,"previous_names":["ashvegeta/polygrid"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashvegeta%2FPolyGrid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashvegeta%2FPolyGrid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashvegeta%2FPolyGrid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashvegeta%2FPolyGrid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ashvegeta","download_url":"https://codeload.github.com/ashvegeta/PolyGrid/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247792899,"owners_count":20996893,"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":["golang","grpc","nodejs","python"],"created_at":"2025-02-14T04:31:30.722Z","updated_at":"2026-05-02T11:35:15.777Z","avatar_url":"https://github.com/ashvegeta.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Microservices Project\n\n## About\n\nThis project is a proof of concept (PoC) for a microservices-based architecture that uses Kafka for messaging and gRPC for inter-service communication. The project consists of three main services: a producer service, a consumer service, and an analytics service.\n\n## Tech Stack\n\n- **Programming Languages**: Go, Python, JavaScript (Node.js)\n- **Messaging**: Apache Kafka\n- **gRPC**: For inter-service communication\n- **Docker**: For containerization\n- **Environment Variables**: Managed using `.env` files\n\n## Services\n\n### Producer Service\n\n- **Language**: Node.js\n- **Description**: Produces messages to a Kafka topic and logs the messages using a gRPC call to the analytics service.\n- **Dependencies**: `kafkajs`, `@grpc/grpc-js`, `@grpc/proto-loader`, `dotenv`\n- **File**: `producer-service/producer.js`\n\n### Consumer Service\n\n- **Language**: Go\n- **Description**: Consumes messages from a Kafka topic and logs the messages using a gRPC call to the analytics service.\n- **Dependencies**: `sarama`, `google.golang.org/grpc`\n- **File**: `consumer-service/main.go`\n\n### Analytics Service\n\n- **Language**: Python\n- **Description**: Receives log messages via gRPC and stores them in log files.\n- **Dependencies**: `grpcio`, `grpcio-tools`, `python-dotenv`\n- **File**: `analytics-service/server.py`\n\n## Setup\n\n- ### Prerequisites\n\n  - Docker\n  - Node.js\n  - Go\n  - Python\n\n- ### Environment Variables\n\n  - Create a `.env` file in the root directory with the following content:\n  - add\n    ```\n    KAFKA_ADDR=localhost:9092\n    ANALYTICS_GRPC_ADDR=localhost:8080\n    ```\n\n- ### Generate gRPC Code\n\n  - For the analytics service (Python):\n\n    ```sh\n    cd analytics-service\n    make gen\n    ```\n\n  - For the consumer service (Go):\n\n    ```sh\n    cd consumer-service\n    make gen\n    ```\n\n  - For the producer service (Node.js):\n\n    ```sh\n    cd producer-service\n    make gen\n    ```\n\n- ### Running the Services\n\n  - Setup and start Kafka broker:\n\n    if first time setting up (run in root folder):\n\n    ```sh\n    make setup-kafka\n    ```\n\n    else, run:\n\n    ```sh\n    make run\n    ```\n\n  - Start the analytics service:\n\n    ```sh\n    cd analytics-service\n    make run\n    ```\n\n  - Start the consumer service:\n\n    ```sh\n    cd consumer-service\n    make run\n    ```\n\n  - Start the producer service::\n\n    ```sh\n    cd producer-service\n    make run\n    ```\n\n## Architecture\n\nThe project follows a microservices architecture with the following components:\n\n1. **Producer Service**: Sends messages to a Kafka topic and logs them using gRPC.\n\n2. **Consumer Service**: Consumes messages from the Kafka topic and logs them using gRPC.\n\n3. **Analytics Service**: Receives log messages via gRPC and stores them in log files.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fashvegeta%2Fpolygrid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fashvegeta%2Fpolygrid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fashvegeta%2Fpolygrid/lists"}