8000 GitHub - fiebiga/astockio
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fiebiga/astockio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description

A personal POC to implement a basic stock exchange architecture. Tooling wise, the following tools were used

  • Kafka: Event driven asynchronous processing and messaging
  • FastAPI/Guvicorn: Web API
  • Redis: Caching and Zset for sorted items
  • MongoDB: General data persistence*

*This is now being converted to MariaDB. Upon further analysis of the use cases, stronger ACID reliability is preferred over the data flexibility and distributed scability that NoSQL offers. That said, if MySQL is good enough for Facebook, it's good enough for a stock exchange

The primarily role of this project will be to see how well asyncio driven python processes, which excel large numbers of small I/O operations, are able to process millions of I/O bound transactions in a short amount of time in a humble docker compose deployment

It also just sounded like a neat thing to slap together. There will be no sensitive data used by this application

Architecture Diagram

Architecture Diagram

Roadmap

  1. Convert MongoDB to MariaDB
  2. Implement User Ledger and Account Service
  3. Implement User Order Service
  4. Exclusion of user ability to have simultaneous buy and sell orders for the same stock
  5. Implement Proper Exchange of stocks and account balances in Order Fulfillment Service
  6. Order Lifecycle introspection and record logging
  7. Implement ability for a user to request "all or nothing" batch transactions instead of streamed fulfillment
  8. Nginx proxy in front of all uvicorn hosted localhost web servers
  9. Front End UI for basic order/user account balance

Getting Started

In order to get started with the provided configuration, docker must be installed, as well as docker-compose. Beyond that, all one needs is to execute the following command

docker-compose up

From then on you may access The Fast API Documentation, available on localhost, to get started

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0