Skip to content

A fault-tolerant, scalable reservation platform for managing library resources, built with modern web technologies and a distributed Cassandra backend.

License

Notifications You must be signed in to change notification settings

MichalRedm/distributed-library-system

Repository files navigation

📘 Distributed Library System

A fault-tolerant, scalable reservation platform for managing library resources, built with modern web technologies and a distributed Cassandra backend.

License: CC BY-NC 4.0 React Frontend CI Backend Python Application Backend Frontend Database Deployment


📚 Project Overview

This system enables users to:

  • 📖 View available books across distributed nodes.
  • 📝 Reserve books and manage reservations.
  • 🔁 Cancel individual or bulk reservations.
  • 🔍 See who reserved which book.
  • ⚙️ Stress test the system under concurrent loads (for performance evaluation).

Built as a two-node distributed application to fulfill course requirements for Big Data and Distributed Processing.


🧠 Tech Stack

Layer Tech
Frontend React, TypeScript, SCSS, Tailwind CSS
Backend Python, Tornado
Database Apache Cassandra
Cluster Multi-node Docker (or manual)
Dev Tools Vite, React Query, Axios, GitHub, VS Code

🚀 Quick Start

✅ Prerequisites

  • Node.js ≥ 18
  • Python ≥ 3.10
  • Docker (for Cassandra cluster)
  • Git

📦 Setup

  1. Clone the repository:
git clone https://github.com/MichalRedm/distributed-library-system.git
cd distributed-library-system
  1. Install frontend dependencies:
cd frontend
npm install
  1. Set up backend virtual environment:
cd ../backend
python -m venv venv
source venv/bin/activate  # or venv\Scripts\activate on Windows
pip install -r requirements.txt
  1. Start Cassandra (e.g., via Docker):
docker-compose up -d

Ensure multiple nodes are configured in docker-compose.yml.


🧪 Run in Development Mode

From the root directory:

npm run dev

This will concurrently start:

  • 🖥️ Frontend at http://localhost:5173
  • ⚙️ Backend at http://localhost:8000

🧩 Architecture

[Frontend: React + TS]
       ↓ REST API
[Backend: Tornado]
       ↓ CQL
[Cassandra Node 1] ⇄ [Cassandra Node 2]
  • Stateless Tornado backend handles business logic and routes.
  • Cassandra cluster provides eventual consistency and scalability.
  • Stress testing tools simulate heavy concurrent usage.

📈 Features

  • 🔐 Make, update, cancel, and view reservations

  • 👥 Track who reserved what

  • 🚨 Supports stress tests:

    • Rapid repeated requests
    • Concurrent client races
    • Bulk cancellation and occupancy
  • ⚡ Async + non-blocking backend

  • 🎨 Stylish responsive frontend UI


📁 Monorepo Structure

bigdata-distributed-app/
├── frontend/      # React app (Vite + TypeScript)
├── backend/       # Tornado app (Python + Cassandra)
├── docs/          # Report, schema, diagrams
├── docker-compose.yml
├── package.json   # Root dev scripts
└── README.md

🧑‍💻 Authors

Name GitHub
Deniz Aksoy @dka124
Michał Redmer @MichalRedm

📄 Report & Documentation

Located in /docs/:

  • 🧾 System architecture
  • 🗃️ Database schema
  • 🛠️ Performance analysis
  • 🧵 Challenges and conclusions

📜 License

This project is licensed under the Creative Commons Attribution-NonCommercial 4.0 International License (CC BY-NC 4.0). You may share and adapt this work for non-commercial purposes, provided that appropriate credit is given.

About

A fault-tolerant, scalable reservation platform for managing library resources, built with modern web technologies and a distributed Cassandra backend.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •