https://github.com/atreib/cqrs
CQRS pattern example project using Node.js with Typescript, MongoDB (Mongoose), PostgreSQL (Prisma), RabbitMQ and Docker-Compose
https://github.com/atreib/cqrs
cqrs docker-compose javascript mongodb mongoose nodejs postgresql prisma rabbitmq typescript
Last synced: 3 months ago
JSON representation
CQRS pattern example project using Node.js with Typescript, MongoDB (Mongoose), PostgreSQL (Prisma), RabbitMQ and Docker-Compose
- Host: GitHub
- URL: https://github.com/atreib/cqrs
- Owner: atreib
- Created: 2022-03-12T03:30:26.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-03-12T13:21:57.000Z (over 4 years ago)
- Last Synced: 2023-03-07T16:48:53.837Z (over 3 years ago)
- Topics: cqrs, docker-compose, javascript, mongodb, mongoose, nodejs, postgresql, prisma, rabbitmq, typescript
- Language: TypeScript
- Homepage:
- Size: 442 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CQRS example
CQRS stands for Command and Query Responsibility Segregation, a pattern that separates read and update operations for a data store.
We'll create a fictional scenario where a few services communicate in order to fetch some big chunk of data, asynchronous and incrementally insert it into a relational database, wait until it's ready to process and map it to a non-relational database, then asynchronous analyze each mapped document, while providing an endpoint to fetch it.

# Get started
We're using [docker-compose](https://docs.docker.com/compose/) to manage our infrastructure (as database and other services). After installing docker-compose in your machine, just run `docker-compose up -d` to set up everything.
The next step is set the relational database. To do so, access the `/sql-database` directory and read its README file.
After setting up the database, you can start the `/fetcher`, `/mirror` and `/analyzer` services. Go to their directories and read their README files to do that.