Download
airline reservation system dr paul schragger distributed systems n.
Skip this Video
Loading SlideShow in 5 Seconds..
Airline Reservation System Dr.Paul Schragger Distributed Systems PowerPoint Presentation
Download Presentation
Airline Reservation System Dr.Paul Schragger Distributed Systems

Airline Reservation System Dr.Paul Schragger Distributed Systems

296 Views Download Presentation
Download Presentation

Airline Reservation System Dr.Paul Schragger Distributed Systems

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. Airline Reservation SystemDr.Paul SchraggerDistributed Systems Presented By Archana Annamaneni

  2. INTRODUCTION • The software used to drive real-world airline reservations is complex. It needs to respond to thousands of simultaneous users and interact with constantly changing flight data. • The airline reservation software developed in this project, only models a small number of transactions • Technology:JAVA RMI

  3. PURPOSE • The primary purpose of doing this project is to learn the concepts of distributed systems and to learn JAVA RMI technology. • Transferring data is basic computational operation. Java’s message-method paradigm transfers data from a calling object to a called object within a single Java virtual machine. • We can cross virtual machine boundaries using sockets, to transfer data from one host to another .If we consider both paradigms- method calls and sockets – achieves the same goal: the transfer of data.  • If we consider the two methods, it’s easier to invoke a method than to send a message over a socket. And RMI achieves to send data to a remote host as easily as we invoke a method.

  4. Architecture Database

  5. USE-CASES • Actor searches for a flight • Actor makes reservation • Actor searches for an active reservation

  6. Activity Diagram desired flight exists Actor leaves Actor selects a flight Actor makes reservation Actor searches for a flight Actor looks for active reservation

  7. Implementation The following are the three transactions implemented in the project • Search Flights: returns each flight details stored in the database • Book Seat: It does a reservation for a specified passenger and a flight. The transaction makes several simplifying assumptions like the passenger and flight must already exist as entities; the transaction does not create new passengers or flights. It informs if the flight does not exist, and if it does not reserve a seat. • Show Reservation: returns the reservation information for a specific passenger identified by passenger number. It informs if the passenger does not exist

  8. Class Diagram

  9. Actor Searches For A Flight

  10. Actor makes reservation

  11. Actor looks for an active reservation

  12. Issues Covered Related To DS • Scalability • Concurrency • Openness

  13. int theReservationNo = si.lockSeat(theConnection,flight_no ,passenger_no); String query = "Delete From LockedSeat Where ReservationNo ="+theReservationNo; int n = st.executeUpdate(query); int seats = flight.getSeats(); int reservations = flight.getReservations(); if(reservations >=seats)throw new FlightBookedException(); flight.setReservations(reservations+1); flight.dbWrite(db); query ="Insert Into LockedSeat"+"(ReservationN,FlightNo ,PassengerNo,TimeStamp) Values ('"+theReservationNo+"','"+theFlightNo+"','"+thePassengerNo+"','" +new Timestamp(new date())+"')"; int up = st.executeUpdate(query); db.commit(); Reservation res = new Reservation(theReservationNo , flight_no ,passenger_no); int reser = res.dbWrite(theConnection); Flight flight =Flight.getInstance(db,flight_no); Int reservations=flight.getReservations(); Flight.serReservations(reservations-1); Flight.dbWrite(db); db.commit();

  14. Key Technology:RMI • RMI Registry A naming service is an application that runs on a central server and functions like a phone book In RMI , the default naming service that ships with JDK is called the RMI Registry Server: serverInterface s = new serverImpl(); Naming.rebind(“rmi://localhost:1099/ARServer”,s); Client: serverInterface theServer =(serverInterface)Naming.lookup(“rmi://localhost/ARServer”)

  15. Key Technology Continued…… • theServer.searchFlights() marshal parameters send request unmarshal parameters invoke implementation return Flight[] impl receive return(or exception) marshal return(or exception) skel send reply unmarshal reply stub return value(throw exception)

  16. Conclusion • How Important Design and Analysis is? • Real time problems while developing a distributed application • Ways to implement Synchronization