Giter Site home page Giter Site logo

project-lingi2241's Introduction

Project: Architecture and performance of computer systems

To launch the project first you have to make sure that the data folder exists in the Server directory:

mkdir -p Server/data
cp path_to_database_file/dbdata.txt Server/data

Then spin up all the virtual machines:

vagrant up

Now you can connect to the Server through ssh and launch the application:

vagrant ssh server
#In the virtual machine
nohup dstat -tcmnps  --output /home/Server/notImproved/$(hostname)Stat.csv &
export _JAVA_OPTIONS="-Xms512m -Xmx1024m"
cp -rf ../Server/* /home/vagrant
javac ReadFile.java 
javac Server.java 
java Server 4999

And after the database is loaded(You should see "Database Loaded!!!" in the output of the server), you can run the clients:

vagrant ssh client1 #There are 2 clients so you have to connect also to the client2
nohup dstat -tcmnps  --output /home/Client/notImproved/$(hostname)Stat.csv &
export _JAVA_OPTIONS="-Xms512m -Xmx1024m"
cp -rf ../Client/* /home/vagrant
javac Client.java 
java Client 10.0.0.10 4999 /home/Client/notImproved/serviceTime$(hostname).csv

Configure the latency:

sudo tc qdisc add dev eth1 root netem delay 10ms

If you want to destroy all the virtual machines:

#In the host machine
vagrant destroy up

project-lingi2241's People

Contributors

manste avatar noxthexelor avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.