Skip to content

b1ink0/SPPU-BE-IT-DS

Repository files navigation

SPPU-BE-IT-DS

Important Requirements & Prerequisites

  • java 8
# install java 8 on Ubuntu
sudo apt update 
sudo apt install openjdk-8-jdk -y
# to check if you have multiple version of java and setting default to java 8
sudo update-alternatives --config java

ALT

# now other versions of java needs to be deleted 
# if not deleted Assignment2 will cause an error
# fist list the installed java versions using this command
dpkg --list | grep -i jdk
# now use this command to remove all the components of other version
sudo apt purge openjdk-11-jdk
sudo apt purge openjdk-11-jdk-headless
sudo apt purge openjdk-11-jre
sudo apt purge openjdk-11-jre-headless
# now check again if only java 8 present
dpkg --list | grep -i jdk

ALT ALT


Assignment 1

  1. Terminal 1
    # compile all java files
    javac *.java
    # compile implementation file
    rmic ServerImplementation
    # start rmiregistry
    rmiregistry
    
  2. Terminal 2
    # start the server
    java Server
  3. Terminal 3
    # connect the client
    # for addtion, substraction, division, multiplication
    java Client 10 20
    # for square, square root
    java Client 25
    # for string equal
    java Client abc abc
    # for palindrome
    java Client aba

Assignment 2

  1. Terminal 1
    # complile all the files
    idlj -fall ServiceModule.idl
    javac *.java ServiceModule/*.java
    # start orbd 
    orbd -ORBInitialPort 1056
  2. Terminal 2
    # start the server
    java ServiceServer -ORBInitialPort 1056
  3. Terminal 3
    # connect the client
    java ServiceClient -ORBInitialPort 1056 -ORBInitialHost localhost

Assignment 3

  • MPI setup
  • Download MPJ Express
  • Extract it in Downloads Folder
    # replace {ubuntu_username} with your machines username like ubuntu, vboxuser
    # or check username by going into home dir
    cd /home && ls
    # set MPJ_HOME env variable
    export MPJ_HOME=/home/{ubuntu_username}/Downloads/mpj-v0_44
    # update PATH env variable
    export PATH=$MPJ_HOME/bin:$PATH
    # compile the java program
    javac -cp $MPJ_HOME/lib/mpj.jar ArrSum.java
    # run compiled java program
    $MPJ_HOME/bin/mpjrun.sh -np 4 ArrSum
    

Assignment 4

  1. Terminal 1
    python server.py
    # or 
    python3 server.py
  2. Terminal 2
    python client.py
    #or
    python3 client.py

Assignment 5

  • Terminal 1
    # complile the java program
    javac TokenRing.java
    # run compiled java program
    java TokenRing

Assignment 6

  • Terminal 1
    # compile the java program
    javac Bully.java
    javac Ring.java
    # run compiled java program
    java Bully
    java Ring

Download Repo zip without git in terminal

# git clone for ubuntu
git clone https://github.com/b1ink0/SPPU-BE-IT-DS.git

# in cmd
curl -L -o SPPU-BE-IT-DS-main.zip https://github.com/b1ink0/SPPU-BE-IT-DS/archive/refs/heads/main.zip

# or in powershell
Invoke-WebRequest -Uri "https://github.com/b1ink0/SPPU-BE-IT-DS/archive/refs/heads/main.zip" -OutFile "SPPU-BE-IT-DS-main.zip"

About

SPPU BE IT Distributed Systems Lab Assignments

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages