distributed transaction on corba presented by leung kin wai, andrew student no.: 97080330...
Post on 19-Dec-2015
218 views
TRANSCRIPT
![Page 1: Distributed Transaction on CORBA Presented by Leung Kin Wai, Andrew Student No.: 97080330 Supervisor: Professor Michael R. Lyu](https://reader031.vdocument.in/reader031/viewer/2022033106/56649d385503460f94a122f3/html5/thumbnails/1.jpg)
Distributed Transaction on CORBA
Presented by Leung Kin Wai, Andrew
Student No.: 97080330
Supervisor: Professor Michael R. Lyu
![Page 2: Distributed Transaction on CORBA Presented by Leung Kin Wai, Andrew Student No.: 97080330 Supervisor: Professor Michael R. Lyu](https://reader031.vdocument.in/reader031/viewer/2022033106/56649d385503460f94a122f3/html5/thumbnails/2.jpg)
Content
• Introduction
• System Overview
• Client Overview
• Server Overview
• Discussion
• Conclusion
• Q & A
![Page 3: Distributed Transaction on CORBA Presented by Leung Kin Wai, Andrew Student No.: 97080330 Supervisor: Professor Michael R. Lyu](https://reader031.vdocument.in/reader031/viewer/2022033106/56649d385503460f94a122f3/html5/thumbnails/3.jpg)
Introduction
• World Wide Web
• Components are autonomous
• Object‑oriented component model
• CORBA (Common Object Request Broker Architecture)
• IDL, the OMG Interface Definition Language
![Page 4: Distributed Transaction on CORBA Presented by Leung Kin Wai, Andrew Student No.: 97080330 Supervisor: Professor Michael R. Lyu](https://reader031.vdocument.in/reader031/viewer/2022033106/56649d385503460f94a122f3/html5/thumbnails/4.jpg)
Introduction (2)
• Language bindings
• Object request broker
![Page 5: Distributed Transaction on CORBA Presented by Leung Kin Wai, Andrew Student No.: 97080330 Supervisor: Professor Michael R. Lyu](https://reader031.vdocument.in/reader031/viewer/2022033106/56649d385503460f94a122f3/html5/thumbnails/5.jpg)
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
![Page 6: Distributed Transaction on CORBA Presented by Leung Kin Wai, Andrew Student No.: 97080330 Supervisor: Professor Michael R. Lyu](https://reader031.vdocument.in/reader031/viewer/2022033106/56649d385503460f94a122f3/html5/thumbnails/6.jpg)
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
![Page 7: Distributed Transaction on CORBA Presented by Leung Kin Wai, Andrew Student No.: 97080330 Supervisor: Professor Michael R. Lyu](https://reader031.vdocument.in/reader031/viewer/2022033106/56649d385503460f94a122f3/html5/thumbnails/7.jpg)
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
![Page 8: Distributed Transaction on CORBA Presented by Leung Kin Wai, Andrew Student No.: 97080330 Supervisor: Professor Michael R. Lyu](https://reader031.vdocument.in/reader031/viewer/2022033106/56649d385503460f94a122f3/html5/thumbnails/8.jpg)
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
![Page 9: Distributed Transaction on CORBA Presented by Leung Kin Wai, Andrew Student No.: 97080330 Supervisor: Professor Michael R. Lyu](https://reader031.vdocument.in/reader031/viewer/2022033106/56649d385503460f94a122f3/html5/thumbnails/9.jpg)
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
![Page 10: Distributed Transaction on CORBA Presented by Leung Kin Wai, Andrew Student No.: 97080330 Supervisor: Professor Michael R. Lyu](https://reader031.vdocument.in/reader031/viewer/2022033106/56649d385503460f94a122f3/html5/thumbnails/10.jpg)
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
![Page 11: Distributed Transaction on CORBA Presented by Leung Kin Wai, Andrew Student No.: 97080330 Supervisor: Professor Michael R. Lyu](https://reader031.vdocument.in/reader031/viewer/2022033106/56649d385503460f94a122f3/html5/thumbnails/11.jpg)
Client & Server Interactions
Web client Application server
Database
ORB
ORB
Web Pages&
ORB Classes
Object Implementation
Internet
(2) Get Applet
(1) Get HTML Page
HTTPServer
CORBAServer
(4) Invoke method
(3)
(5) Return values
Data Manager
IIOP
HTTP
Quote Source
![Page 12: Distributed Transaction on CORBA Presented by Leung Kin Wai, Andrew Student No.: 97080330 Supervisor: Professor Michael R. Lyu](https://reader031.vdocument.in/reader031/viewer/2022033106/56649d385503460f94a122f3/html5/thumbnails/12.jpg)
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
![Page 13: Distributed Transaction on CORBA Presented by Leung Kin Wai, Andrew Student No.: 97080330 Supervisor: Professor Michael R. Lyu](https://reader031.vdocument.in/reader031/viewer/2022033106/56649d385503460f94a122f3/html5/thumbnails/13.jpg)
User Interfaces (1)
![Page 14: Distributed Transaction on CORBA Presented by Leung Kin Wai, Andrew Student No.: 97080330 Supervisor: Professor Michael R. Lyu](https://reader031.vdocument.in/reader031/viewer/2022033106/56649d385503460f94a122f3/html5/thumbnails/14.jpg)
User Interfaces (2)
![Page 15: Distributed Transaction on CORBA Presented by Leung Kin Wai, Andrew Student No.: 97080330 Supervisor: Professor Michael R. Lyu](https://reader031.vdocument.in/reader031/viewer/2022033106/56649d385503460f94a122f3/html5/thumbnails/15.jpg)
User Interfaces (3)
![Page 16: Distributed Transaction on CORBA Presented by Leung Kin Wai, Andrew Student No.: 97080330 Supervisor: Professor Michael R. Lyu](https://reader031.vdocument.in/reader031/viewer/2022033106/56649d385503460f94a122f3/html5/thumbnails/16.jpg)
User Interfaces (4)
![Page 17: Distributed Transaction on CORBA Presented by Leung Kin Wai, Andrew Student No.: 97080330 Supervisor: Professor Michael R. Lyu](https://reader031.vdocument.in/reader031/viewer/2022033106/56649d385503460f94a122f3/html5/thumbnails/17.jpg)
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
![Page 18: Distributed Transaction on CORBA Presented by Leung Kin Wai, Andrew Student No.: 97080330 Supervisor: Professor Michael R. Lyu](https://reader031.vdocument.in/reader031/viewer/2022033106/56649d385503460f94a122f3/html5/thumbnails/18.jpg)
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.
![Page 19: Distributed Transaction on CORBA Presented by Leung Kin Wai, Andrew Student No.: 97080330 Supervisor: Professor Michael R. Lyu](https://reader031.vdocument.in/reader031/viewer/2022033106/56649d385503460f94a122f3/html5/thumbnails/19.jpg)
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
![Page 20: Distributed Transaction on CORBA Presented by Leung Kin Wai, Andrew Student No.: 97080330 Supervisor: Professor Michael R. Lyu](https://reader031.vdocument.in/reader031/viewer/2022033106/56649d385503460f94a122f3/html5/thumbnails/20.jpg)
Methods of Server Object (4)
• logout - for customers to logout
• logoutMan - for managers to logout
![Page 21: Distributed Transaction on CORBA Presented by Leung Kin Wai, Andrew Student No.: 97080330 Supervisor: Professor Michael R. Lyu](https://reader031.vdocument.in/reader031/viewer/2022033106/56649d385503460f94a122f3/html5/thumbnails/21.jpg)
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.
![Page 22: Distributed Transaction on CORBA Presented by Leung Kin Wai, Andrew Student No.: 97080330 Supervisor: Professor Michael R. Lyu](https://reader031.vdocument.in/reader031/viewer/2022033106/56649d385503460f94a122f3/html5/thumbnails/22.jpg)
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.
![Page 23: Distributed Transaction on CORBA Presented by Leung Kin Wai, Andrew Student No.: 97080330 Supervisor: Professor Michael R. Lyu](https://reader031.vdocument.in/reader031/viewer/2022033106/56649d385503460f94a122f3/html5/thumbnails/23.jpg)
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.
![Page 24: Distributed Transaction on CORBA Presented by Leung Kin Wai, Andrew Student No.: 97080330 Supervisor: Professor Michael R. Lyu](https://reader031.vdocument.in/reader031/viewer/2022033106/56649d385503460f94a122f3/html5/thumbnails/24.jpg)
Implementation of Server
• BookingCenterMain
– initializes the ORB
– obtains a reference to the BOA– invokes obj_is_ready, register the BookingCenterImpl
– invokes impl_is_ready
![Page 25: Distributed Transaction on CORBA Presented by Leung Kin Wai, Andrew Student No.: 97080330 Supervisor: Professor Michael R. Lyu](https://reader031.vdocument.in/reader031/viewer/2022033106/56649d385503460f94a122f3/html5/thumbnails/25.jpg)
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
![Page 26: Distributed Transaction on CORBA Presented by Leung Kin Wai, Andrew Student No.: 97080330 Supervisor: Professor Michael R. Lyu](https://reader031.vdocument.in/reader031/viewer/2022033106/56649d385503460f94a122f3/html5/thumbnails/26.jpg)
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
![Page 27: Distributed Transaction on CORBA Presented by Leung Kin Wai, Andrew Student No.: 97080330 Supervisor: Professor Michael R. Lyu](https://reader031.vdocument.in/reader031/viewer/2022033106/56649d385503460f94a122f3/html5/thumbnails/27.jpg)
Conclusion
• Study CORBA– powerful for distributed system construction
• Developed a cinema tickets reservation 3-tier system for demonstration
![Page 28: Distributed Transaction on CORBA Presented by Leung Kin Wai, Andrew Student No.: 97080330 Supervisor: Professor Michael R. Lyu](https://reader031.vdocument.in/reader031/viewer/2022033106/56649d385503460f94a122f3/html5/thumbnails/28.jpg)
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.
![Page 29: Distributed Transaction on CORBA Presented by Leung Kin Wai, Andrew Student No.: 97080330 Supervisor: Professor Michael R. Lyu](https://reader031.vdocument.in/reader031/viewer/2022033106/56649d385503460f94a122f3/html5/thumbnails/29.jpg)
End of Presentation
Thank you for your coming.
Q & A