currency-market-pulse

module
v0.0.0-...-87b6879 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 13, 2024 License: MIT

README

currency-market-pulse

A demo project that aims to show the usage of the following technologies:

  • Microservice architecture
  • REST
  • Protobufs
  • Kafka
  • Clickhouse
  • Memcache
  • Load Balancer using nginx
  • Rate Limiter using Redis sorted sets
  • Docker and Docker Compose

Requirements

Currency market trade processor consumes trade messages via an endpoint, processes those messages in some way and delivers a frontend of processed information based on the consumed messages.

Consumption

The trade messages are POST’d to a REST endpoint and take the JSON form of:

{
    "userId": "134256", 
    "currencyFrom": "EUR", 
    "currencyTo": "USD", 
    "amountSell": 1000, 
    "amountBuy": 1093.47, 
    "timePlaced" : "12-AUG-24 11:23:45", 
    "originatingCountry" : "US"
}

Then the trade messages are sent to Kafka for further processing.

Processor

The trade messages are consumed from Kafka and stored to a Clickhouse DB in batches.

Frontend

A frontend can consume currency exchange trends via a REST endpoint. Responses are cached using memcache.

System Design

System Diagram

Develop

Run all services
docker compose up
Generate protobufs
protoc --go_out=./proto-gen ./proto/currencymarket.proto

Directories

Path Synopsis
consumer
cmd
importer
cmd
proto-gen
trends
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL