Skip to content

Microservices in Node.js using IoC concepts, designed for asynchronous processing through messaging via RabbitMQ, integrated with Redis and PostgreSQL via Docker

Notifications You must be signed in to change notification settings

reidn3r/async-btg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Asynchronous Processing

Backend Challenge BTG Pactual (07/2024)


Architecture:

Software Architecture

Relational Data Modeling - Customer Service:

Software Architecture

Relational Data Modeling - Orders Service:

Software Architecture

Request: /create/customer

{
    "email": "[email protected]",
    "username": "lorem ipsum"
}

Request: /create/product

{
    "name": "product_name"
    "value": 3150,
}

Request: /create/order

{
    "email": "[email protected]",
    "products": [
        {
            "name": "product_1",
            "quantity": 2
        },
        {
            "name": "product_2",
            "quantity": 1
        },
        {
            "name": "product_3",
            "quantity": 7
        }
    ]
}

Details:

1.0: "Customers" Service

    - 1.1: Assigned for creating products, customers, and customer orders.

    - 1.2: Order data is stored in PostgreSQL, and then the information is sent via messaging (RabbitMQ exchange) to the "orders" service.

2.0: "Orders" Service.

    - 2.1: Assigned for consuming the message sent by the "customers" service.

    - 2.2: Data stored in memory (Redis) has a TTL.

    - 2.3: Information about orders and messages consumed within a month are persisted to disk.

3.0: The services also communicate via HTTP requests.

    - 3.1: CORS prevents the client from directly accessing the "orders" service.

LinkedIn and Gmail

LinkedIn Gmail

About

Microservices in Node.js using IoC concepts, designed for asynchronous processing through messaging via RabbitMQ, integrated with Redis and PostgreSQL via Docker

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published