LYU9901-Travel NetLYU9901-Travel Net
Supervisor: Prof. Michael R. Lyu
Students: Ho Chi Ho Malcolm
Lau Chi Ho Arthur
(Presentation on 29-02-2000)
Work Done in 1st TermWork Done in 1st Term
• Set up an online web application - TravelNet on a NT web server
• Implement different functions of TravelNet using Java Servlet and HTML
Flight SearchFlight Search
• Search Flights on preferences of users
• Type of Search: One-way
• Principle: Call Airline Manager of each airline to query and access its own database for information on flights
Travel ShopTravel Shop
• Selling of travel related accessories such as luggage, map, guide book, etc
• Principle: A shop basket system which records items bought and initiates the payment system when checkout.
Travel GuidesTravel Guides
• Providing textual information on Cities covered by TravelNet
• Principle: pure HTML pages
MembershipMembership
• Require users to register first before using our services for better management and promotion
• Allow the change of personal information after login
• Principle: Maintain an user account database and login verification system
SecuritySecurity
• Necessary for user login and payment
• Consideration: Convenience and compatibility in browser environment
• Use of SSL between browser and web server
Work done in this term
• Payment Gateway
• Enhancement of Online shop
• Enhancement of Flight Search
Payment Gateway for TravelNetPayment Gateway for TravelNet
• To be a more realistic system
• Simulate payment in a secure way
• In this part:– Description of communication between
merchant and Payment Gateway (PG)– Performance measure of a payment transaction
Communication methodCommunication method
• Asymmetric key encryption on a TCP connection.
• Receiver use it’s own private key to decrypt message.
• Sender use receiver’s public key to encrypt message.
• Keys with 512 bit-length
• Hard to decrypt for hackers even with public key
• Merchant fill in client object and issue a start operation
Merchant (TravelNet)
Payment Gateway (PG)
Performance: Threaded ModelPerformance: Threaded Model
0250050007500
1000012500150001750020000
1 2 3 4 5 6 7 8 9 10
Number of concurrent users
Pro
ces
s T
ime
(m
s)
Average Total CheckOut Time Average Time spent on PG
Performance: Non-Threaded ModelPerformance: Non-Threaded Model
0
2500
5000
7500
10000
12500
15000
17500
20000
1 2 3 4 5 6 7 8 9 10
Number of concurrent users
Pro
ces
s T
ime
(m
s)
Average Total CheckOut Time Average Time Spent on PG
Enhancement of Online ShopEnhancement of Online Shop
• Dynamic generation of shopping item pages
• Allow easy maintenance
Enhancement of Flight SearchEnhancement of Flight Search
• Implementation of Round-Trip Search
• Display of search result– shown more complete information– sort result by time
Current ProgressCurrent Progress
• Implementing Itinerary Management System
• Investigating CORBA Integration
• Investigating JSP
Itinerary ManagementItinerary Management
• Maintain Users’ Flight Itinerary• Allow users to reserve flights eventually• Basic Functions:
– View items– Add items– Delete items– Reserve items to Airline
Itinerary Management(2)Itinerary Management(2)
• Will be finished soon so as to finalize the system for CORBA integration
CORBA IntegrationCORBA Integration
• CORBA - general standard on developing distributed programs
• Refer to CSC5110 for details!
CORBA Integration(2)CORBA Integration(2)
• Why CORBA in TravelNet?
• Existence of distributed component:– e.g. Airlines’ Databases on Flights
• Current Approach: Airline Manager resides on TravelNet to be called, which lacks parallelism & increase the load
CORBA Integration(3)CORBA Integration(3)
• CORBA Approach: Airline Manager resides on each airline server, to increase parallelism and decrease TravelNet’s server load
• More benefits: the use of Object Activation Daemon(OAD) for better resources allocation
CORBA Integration(4)CORBA Integration(4)
• Challenge:– the integration of CORBA is not simple– CORBA is commonly used in Applets and
Application but not Servlet
• Tools:– Visibroker for Java
• Today’s Web sites want to display dynamic content based on user and session.
• Mixing the "static" content of HTML files with "directives" for accessing or generating dynamic content.
• Java Server Pages provide server-side scripting support for generating web pages with combined static and dynamic content.
Introduction to JSPIntroduction to JSP
Displaying dynamic contentDisplaying dynamic content
• Common Gateway Interface (CGI)
• Active Server Pages (ASP)
• Java Servlets & Java Server Page (JSP)
JSP featuresJSP features
• Combines the worlds of HTML and Java Servlet programming
• Similar to HTML pages with new tags to control the generation of dynamic content
• Pre-compilation of JSP to Servlet which is responsible for generating dynamic pages
• Reside in application server memory (pre-load OR 1st access)
Why use JSP?Why use JSP?
• Platform independent
• Fast Response
• Reusability nature with Java classes or Java Beans
JSP JSP ContentContent
• Standard HTML + Tags for scripting in the Java language. • Tags like:
– <jsp:useBean> :Locates or instantiates a Beam with a specific name and scope
– <% code fragment %>: Contains a code fragment valid in page scripting language
– <%= expression %>: return expression value to output stream (client browser).
• JSP will finally be compiled to Servlets to access Beans
Compilation of JSPCompilation of JSP
• .jsp file will be compiled to be a Servlet
• Auto compile on – the first request of a .jsp file– the first request after changes on a .jsp file
• No compilation is needed if there is no update– Generate output (HTML) by Servlet in memory– Can be pre-loaded
•Request from browser to JSP of HTTP server
•Servlet request the Bean
•Bean request information from back-ends
•JSP response requested information to browser
TIME JSP18:35:20
Request = http://host/Time.jsp
Output on Client Browser
<HTML><H1>TIME JSP</H1><%java.util.Date dt = new java.util.Date(System.currentTimeMillis() );%>
<%=dt.getHours()%> : <%=dt.getMinutes()%>: <%=dt.getSeconds()%></HTML>
Time.jsp
Simple ExampleSimple Example
Future PlansFuture Plans
• Finalize the existing system
• Integration of CORBA
• Enhancement to the system, e.g JSP
• Other possible features depends on time