Distributed Transaction on CORBA Presented by Leung Kin Wai, Andrew Student No.: Supervisor: Professor Michael R. Lyu
Content Introduction System Overview Client Overview Server Overview Discussion Conclusion Q & A
Introduction World Wide Web Components are autonomous Object ‑ oriented component model CORBA (Common Object Request Broker Architecture) IDL, the OMG Interface Definition Language
Introduction (2) Language bindings Object request broker
System Overview Cinema tickets booking system Cinema management side Customers side System Functions of cinema managers: –Register a new film –View films’ information –Create schedule for booking
System Overview (2) System Functions of customers: –Online user registration –View films’ information –Add comments and grade to film –View the comments and grade –Buy tickets –Check booking information
System Requirement Support multiple cinemas Support multiple films Support multiple arenas of a cinema Support multiple customers booking films Support customers booking multiple films Support a person to login as a customer or cinema manager
System Requirement (2) Support a person to register as a new customer Support cinema managers to add films to the system Support cinema managers to create schedule for booking Support to view films’ information in the system
System Requirement (3) Support customers to acquire seats’ status in the arenas of cinemas Support customers to check their bookings Support customers to add comments and grade to films Support customers to retrieve comments and grade of films
Components of system Database server - store persistent data Object server - provides services Web server - download web page and applets IIOP proxy - allows applets to communicate with different hosts Client applet - front end to users
Client & Server Interactions
Client & Server Interactions (2) 1. Web browser downloads HTTP page 2. Web browser retrieves Java applet and ORB classes from HTTP server 3. Web browser loads and starts applet 4. Applet invokes CORBA server objects 5. CORBA server return result values
User Interfaces (1)
User Interfaces (2)
User Interfaces (3)
User Interfaces (4)
Methods of Server Object (1) authenticateBooker - check Users’ ID createFilm - create a film allFilmName - retrieve all films’ name createCustomer - register a customer createSche - create a schedule for booking getCineName - get a cinema’s name getArenaName - get an arena’s name
Methods of Server Object (2) getDates - get dates for booking getTimes - get times for booking makeBooking - make booking getSeatStatus - get seats’ status getFilmPrice - get price of a film getBooking - get booking information getMaxBookRef - get max. booking ref.
Methods of Server Object (3) getFilmInfo - get films’ information createComment - create a comment getMaxCommentRef - get max. comment ref. getComment - get comments getAvgGrade - get average grade of a film authenticateCinema - check managers’ ID
Methods of Server Object (4) logout - for customers to logout logoutMan - for managers to logout
Database Design Table: Film –A record in this table stores the information of a film. Table: Customer –A record in this table stores the information of a customer.
Database Design (2) Table: Schedule –A record in this table stores the information of a showing schedule. Table: Booking –A record in this table stores the information of a booking.
Database Design (3) Table: Comment –A record in this table stores the information of a comment. Table: Cinema –A record in this table stores the information of a cinema.
Implementation of Server BookingCenterMain –initializes the ORB –obtains a reference to the BOA –invokes obj_is_ready, register the BookingCenterImpl –invokes impl_is_ready
Implementation of Server (2) BookingCenterImpl –implements the IDL-defined interface –creates a new BookDb object –connects to it –BookDb –pre-connected to the database –handles all the interactions with JDBC
Discussion Excellent CORBA/Java Integration A modern 3-tier client/server foundation CORBA works just fine from within applets You can create multi-panel applets using AWT Callbacks
Conclusion Study CORBA –powerful for distributed system construction Developed a cinema tickets reservation 3- tier system for demonstration
Area of Improvement Server can use the callback facility to periodically update the seats' status to the clients. This can improve the accuracy and efficiency of tickets selling Server can be started on demand. With this improvement the server need not to be running all the time to wait for the request of clients.
End of Presentation Thank you for your coming. Q & A