distributed transaction on corba presented by leung kin wai, andrew student no.: 97080330...

29
Distributed Transaction on CORBA Presented by Leung Kin Wai, Andrew Student No.: 97080330 Supervisor: Professor Michael R. Lyu

Post on 19-Dec-2015

220 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Distributed Transaction on CORBA Presented by Leung Kin Wai, Andrew Student No.: 97080330 Supervisor: Professor Michael R. Lyu

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

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

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

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

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

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

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

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

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

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

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

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

User Interfaces (1)

Page 14: Distributed Transaction on CORBA Presented by Leung Kin Wai, Andrew Student No.: 97080330 Supervisor: Professor Michael R. Lyu

User Interfaces (2)

Page 15: Distributed Transaction on CORBA Presented by Leung Kin Wai, Andrew Student No.: 97080330 Supervisor: Professor Michael R. Lyu

User Interfaces (3)

Page 16: Distributed Transaction on CORBA Presented by Leung Kin Wai, Andrew Student No.: 97080330 Supervisor: Professor Michael R. Lyu

User Interfaces (4)

Page 17: Distributed Transaction on CORBA Presented by Leung Kin Wai, Andrew Student No.: 97080330 Supervisor: Professor Michael R. Lyu

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

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

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

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

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

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

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

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

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

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

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

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

End of Presentation

Thank you for your coming.

Q & A