GithubHelp home page GithubHelp logo

sukhmeetsingh2002 / railway-managment-system Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 1.0 44 KB

Railway reservation system which handles concurrent requests

License: MIT License

PLpgSQL 29.29% Python 0.86% Java 69.85%
database-management jdbc-driver postgresql railway-reservation java

railway-managment-system's Introduction

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

railway-managment-system's People

Contributors

sukhmeetsingh2002 avatar vishnusai-janjanam 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.