Skip to content

SukhmeetSingh2002/Railway-Managment-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Railway-Managment-System

Overview :octocat:

Railway reservation system which handles concurrent requests for booking tickets in postgress. It uses explicit locking to handle parallel requests.

Setup before running

  • Make a config.properties file in the Java/ directory and store the name of the database,user and its password as following
    database=XXXXXX
    user=XXXXXX
    password=XXXXXX
  • Make a database in postgresql then run setup.sql (change the paths before running)
    \i setup.sql
  • Download JDBC driver and keep it in Java/ directory
  • Make two directories Input/ and Output/ and keep in input files in Input/ folder
  • Make a Trainschedule.txt file in Java/ folder

How to Run ⚡

  • First we need to add all the train by running ReleaseTrain and Train schedule resides in Trainschedule or specify the path of the file

    javac ReleaseTrain.java && java ReleaseTrain
  • Then, run Service Module which will keep listening for connections from the client and book tickets using multithreading.

    javac ServiceModule.java && java ServiceModule
  • Now, open a new terminal and run the Client which will send parallel requests to Service Module. This will read the input files present in Input/ directory and give the output in Output/ directory

    javac *.java && java client

    Below are all the commands used above

    & is added so that the Service module runs in background (no need to open a new terminal ✌️)

    javac ReleaseTrain.java && java ReleaseTrain
    javac ServiceModule.java && java ServiceModule &
    javac *.java && java client
    

Contributors

Under the guidance of Dr. Vishwanath Gunturi :

Name Entry Number
Sukhmeet Singh 2020CSB1129
Vishnusai Janjanam 2020CSB1142

About

Railway reservation system which handles concurrent requests

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published