Skip to content

anirudhcsp/Task2_FastAPI-Microservice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Abacus Microservice

Distributed running sum service with strong consistency.

Architecture

  • FastAPI: Web framework
  • Redis: Shared storage (atomic operations)
  • 2 Nodes: Demonstrated locally

Run

docker-compose up --build

Starts:

Test

python tests/test_simple.py

API

POST /abacus/number

curl -X POST http://localhost:9001/abacus/number \
  -H "Content-Type: application/json" \
  -d '{"number": 10}'

GET /abacus/sum

curl http://localhost:9001/abacus/sum

DELETE /abacus/sum

curl -X DELETE http://localhost:9001/abacus/sum

Consistency

Redis INCRBY ensures atomic operations - no race conditions across nodes.

About

Distributed running sum service with strong consistency.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors