API derived Flask app that tracks Auction Bids on items.
This simple projects exposes 4 APIs to do the following:
- record a user’s bid on an item.
- get the current winning bid for an item.
- get all the bids for an item.
- get all the items on which a user has bid.
Currently, it's a very naive solution.
Downsides to tackle:
- Concurrent realtime bid tracking for all users
- Suggested solution using WebSocket Protocol and broadcast the changes in realtime.
- DBMS to handle structured data PostgreSQL
- Table for users.
- Table to items.
- Table for bids with foreign key to user and item.
- Performance Cautions:
- Handle N+1 queries for Bids by using DB JOINS.
Development is running using on bar metal.
The following details how to run this application (locally).
To build:
$ virtualenv -p python3 venv
$ source venv/bin/activate
$ pip install -r requirements.txt
$ python3 main.py
You can now access on http://0.0.0.0:8989/