Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

6 Commits

Folders and files

Repository files navigation

Distributed Cinema Seat Reservation System

The project is a distributed cinema reservation system. The frontend is React, the backend is FastAPI, and the database is a 3-node Cassandra cluster. The backend exposes REST endpoints for movies, shows, seats, reservations, updates, cancellations, and stress tests. Cassandra stores data in query-specific tables, so reservations are duplicated by id and by show. The most important part is seat reservation: the backend uses Cassandra lightweight transactions with IF status = 'AVAILABLE' to prevent two users from booking the same seat. The system uses replication factor 3 and QUORUM consistency, so it can continue working when one Cassandra node is down.

Architecture

React GUI -HTTP/REST──> FastAPI backend  ─cassandra-driver──>  Cassandra 3-node cluster
 (port 5173)                  (port 8000)                          (node1/2/3, port 9042)

The React app only talks to FastAPI; FastAPI talks to all three Cassandra nodes.

How to run

docker compose up --build

Verify the cluster

docker exec -it cassandra-node1 nodetool status  
docker exec -it cassandra-node1 cqlsh -e "SELECT count(*) FROM cinema.seats_by_show;"

Using the app

Page What it does
Home Lists movies/shows.
Seat map Clickable seat grid (available / selected / reserved), then reserve with name + email.
Find / Update Look up a reservation by id, see who made it, edit details/seats, or cancel it.
Bulk Cancel Select many reservations for a show and cancel them at once.
Stress Tests Run each required stress test server-side and see the result.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages