This project is a distributed system for managing room rentals, similar to platforms like Airbnb and Booking.com. It consists of a Java-based backend using TCP communication and an Android frontend for user interaction. The system allows users to list, search, and book accommodations while ensuring scalability and fault tolerance through distributed computing techniques.
- Add accommodations with details and images.
- Define available booking dates.
- View bookings for owned accommodations.
- Communicate with the Master node using a TCP-based console application.
- Search for accommodations using filters:
- Location
- Available dates
- Number of guests
- Price
- Star rating
- Make a reservation for a selected accommodation.
- Rate accommodations (1-5 stars).
- All interactions occur asynchronously via TCP sockets.
- Handles requests from tenants and managers.
- Routes data to appropriate worker nodes.
- Implements MapReduce for distributed data processing.
- Ensures thread-safe request handling using synchronized, wait, and notify mechanisms.
- Store and manage accommodation data in-memory.
- Handle room availability and reservations.
- Support dynamic allocation at system initialization.
- Communicate with the Master node using TCP sockets.
- Provides a user-friendly interface for tenants.
- Uses TCP sockets for communication with the backend.
- Implements asynchronous requests to maintain responsiveness.
{
"roomName": "roomName",
"noOfPersons": 5,
"area": "Area1",
"stars": 3,
"noOfReviews": 15,
"roomImage": "/usr/bin/images/roomName.png"
}
- Backend: Java with TCP-based communication.
- Frontend: Android (Java/Kotlin) with TCP sockets.
- Concurrency: Multi-threading using synchronized, wait, and notify.
- Data Storage: In-memory structures (no database, except for storing images).
- Distributed Processing: MapReduce for efficient query handling.
- Implements active replication for worker nodes.
- Ensures data consistency across multiple nodes.
- Reroutes requests to replicas in case of worker failure.
- Start the Master Node: Runs as a TCP server.
- Start Worker Nodes: Connect dynamically to the Master.
- Run the Console App (Manager): Adds accommodations.
- Run the Android App (Tenant): Searches and books rooms.