https://github.com/eddie4k-code/express-based-event-bus
an example of an Express-based Event Bus that distributes events to other services (posts, comments, query)
https://github.com/eddie4k-code/express-based-event-bus
Last synced: about 2 months ago
JSON representation
an example of an Express-based Event Bus that distributes events to other services (posts, comments, query)
- Host: GitHub
- URL: https://github.com/eddie4k-code/express-based-event-bus
- Owner: Eddie4k-code
- Created: 2024-04-13T21:52:59.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2024-04-20T21:45:36.000Z (about 1 year ago)
- Last Synced: 2025-02-12T12:21:54.318Z (3 months ago)
- Language: TypeScript
- Size: 30.3 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: ReadME.md
Awesome Lists containing this project
README
# Express Event Bus Demo
This project demonstrates an event-driven architecture using an Express-based event bus. It consists of several microservices:
- **Posts Service:** Responsible for managing posts.
- **Query Service:** Handles queries related to posts.
- **Comments Service:** Manages comments on posts.
- **Event-Broker Service:** Distributes events among other services.The Event Broker distributes events to other services, and all other services post events to the Event Broker.
## Prerequisites
- Kubernetes installed on your system.
- Terraform installed on your system.## Getting Started
1. Clone this repository.
2. Ensure you have a Kubernetes installed and Terraform installed.
3. Run `make apply` to install the Ingress-Nginx controller and provision all Kubernetes manifests for the services.
4. Access the services through the Ingress controller.## Usage
### `make apply`
This command will install the Ingress-Nginx controller and provision all Kubernetes manifests for the services.
### `make destroy`
This command will destroy all Kubernetes-related infrastructure provisioned by Terraform.
## Services
- **Posts Service:** Manages posts.
- **Query Service:** Handles queries related to posts.
- **Comments Service:** Manages comments on posts.
- **Event-Broker Service:** Distributes events among other services.## Nginx Routes
- **localhost/posts/create:** Reaches the post-service to create a new post
- **localhost/posts:** Reaches the query-service to query posts
- **localhost/posts/comments:** Reaches the comment-service for creating comments## Project Structure
- `/post-service`: Contains the Posts Service.
- `/query-service`: Contains the Query Service.
- `/comments-service`: Contains the Comments Service.
- `/event-broker`: Contains the Event Broker Service.
- `/terraform`: Contains Terraform configurations for Kubernetes infrastructure provisioning.