Pervasive Web Application Architecture Narendran Thangarajan, IV year, CSE, SSN College of Engg, Chennai.
Why are we studying this? You got a Phone And a Laptop. Task : Order Meals from KFC
Why are we studying this? Why? So the traditional web applications need to be tweaked! And thats why we are here. :)
The first personwho thought about this is Mark Weiser.
Why the name ”Pervasive” Web Applications? Pervade = diffuse or spread through Supports multiple devices PCs WAP phones PDAs Voice only phones Before Pervasive Computing – there were only PC based web applications After Pervasive Computing – HP just closed its PC market! :D → Devices are in various other forms.
Challenges faced Different Devices have different standards WML for WAP - Monochrome VoiceXML for voice interaction HTML for PCs Not just the looks, even the capabilities!! Say, a PC and WAP phone (Sounds like Silk, doesnt it?) Major Challenges Scalability – due to increased number of mobile phones Availability – due to the type of application used – look up a meaning or order something
Scalability and Availability Ever-growing number of pervasive computing devices (scalability) ”Server Currently Down for Maintenance” (availability)
Development Team Traditional Web Applications Business Logic Designers User Interface Designers Application Programmers Database experts Pervasive computing Web applications Traditional + Pervasive Computing Specialists
Pervasive Application Architecture MVC Architecture M – Model – EJB V – View – JSPs C – Controller – Servlets Challenge is to make the controller identify the type of device and serve accordingly.
Security!! Encryption – Using Algorithms for confidentiality Authentication – Username and Password Authorization – Security Policies for accessing Application functions Client to Web Application → Convert device-specific requests to canonical form (HTTP requests with device type, desired language, desired reply content- type) When the secure access component receives a request, it checks if the session in authenticated. What happens in either cases.
Ways of Authentication Authentication Proxy Diagram Advantage – Only authenticated and authorized requests can reach protected web applications. Framework Attaches an authentication object to the session. Secure Servlet – inherits HttpServlet – Securitypolicy check done before calling super class function ”service” SecureJSP – Extends SecureServlet and implements HttpJspPage AuthenticationServlets – Can be implemented in many ways but SecurityState Object must be created and added to the user session.
SecurityState Object – holds the security state of a session UserID Authenticated Method Potential Error Codes SecurityPolicy class – accesses the policy database and decides whether to allow further processing.
Example Application How Java applications can be extended to support different kinds of device. Scenario – Uncle Enzos Shop Specializes in Italian Food Wants to improve ordering process for the customers. First Step – Make an e-business Next Step – Support for Smart Cards
User Interface Overview Registration Login Screen Menu Ordering Review Former Purchases Self Care Log Off
Architecture (Demo) Database Schema Store Persistent Data (UserData) Servlets Identify the Device type and call the appropriate controller (DeviceMapper and Registration Servlet) Controllers Process requests by invoking application logic via command (Registration controller) Commands Excapsulate access to models and act as result containters Views Display the output of the controllers.
Thus.. Understand how to make a single web application handle requests from variety of devices Understand the MVC Understand the Design Pattern used.