Skip to content

Distributed backend system for our home/holiday renting app, Lapis

Notifications You must be signed in to change notification settings

alexisthedev/distributed-home-renting-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A distributed application for home renting

Instructions

To compile and execute the files, make sure that you include the required .jar files under lib/ in the classpath.
The below instructions are provided assuming that the workers will run on the same machine
Set the IP addresses for the workers, server, and reducer by changing the constants on java.com.homerentals.backend.BackendUtils (default is localhost)
  • For Linux and Mac OS: Simply execute our script by running bash startup.sh

  • For Windows:

    1. cd src/main/java
    2. Compile the files javac -cp ../../../lib/commons-io-2.15.1.jar;../../../lib/json-20240303.jar;. com/homerentals/**/*.java
    3. Reserve worker ports: java -cp ../../../lib/commons-io-2.15.1.jar;../../../lib/json-20240303.jar;. com.homerentals.backend.PortManager <NUMBER_OF_WORKERS> com/homerentals/backend/ports.list
    4. Start the server: java -cp ../../../lib/commons-io-2.15.1.jar;../../../lib/json-20240303.jar;. com.homerentals.backend.Server com/homerentals/backend/ports.list
    5. Start the workers. Run the below for as many workers as you defined above. The port should be one of the automatically generated ports inside src/main/java/com/homerentals/backend/ports.list: java -cp ../../../lib/commons-io-2.15.1.jar;../../../lib/json-20240303.jar;. com.homerentals.backend.Worker <PORT>
    6. Start the reducer instance: java -cp ../../../lib/commons-io-2.15.1.jar;../../../lib/json-20240303.jar;. com.homerentals.backend.Reducer <NUMBER_OF_WORKERS>
    7. The backend is up and running. You can connect to it by either a dummy guest console with the credentials [email protected]:guest
      java -cp ../../../lib/commons-io-2.15.1.jar;../../../lib/json-20240303.jar;. com.homerentals.backend.GuestConsole
      or as the host via the host console with the credentials admin:admin
      java -cp ../../../lib/commons-io-2.15.1.jar;../../../lib/json-20240303.jar;. com.homerentals.backend.
      (credentials in username:password format).
    8. Success! You are now connected.

Authors

Created by Alex Papadopoulos and Katerina Mantaraki for 🎓

About

Distributed backend system for our home/holiday renting app, Lapis

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published