150 likes | 244 Views
Stanford University EH&S. A Service Oriented Architecture For Rich Internet Applications Sheldon M. Heitz. Design Goals. Extend U.I. feature set, make robust across multiple platforms Reduce dependence on HTML and JavaScript Improve development productivity
E N D
Stanford University EH&S A Service Oriented Architecture For Rich Internet Applications Sheldon M. Heitz
Design Goals • Extend U.I. feature set, make robust across multiple platforms • Reduce dependence on HTML and JavaScript • Improve development productivity • Implement an object oriented design • Increase code reusability • Maintain database compatibility with existing version • Create a platform for exploring XML technologies • Provide built-in support for multiple client organizations
Proof of Concept Demo … Before we start: • Application is running live on this platform • 2.4 gigahertz Pentium 4 • 1024 megabytes ram • Windows XP - Running Concurrently - • Oracle 9i with Stanford dataset (200k+ inventory, etc.) • IIS 5.1 web server • Altio Developer Suite / Tomcat servlet engine • Jrun 4 servlet engine for service servlet • Oracle Jdeveloper 10g • Microsoft PowerPoint
Components and Integration • Using familiar technologies • Simple servlet-based web service • Returns database data as XML • Implements user authentication and session handling • As generic as possible • Generic single-transaction method • Specific batch-transaction method
Runtime Environment Web Server Isapi filter to forward servlet requests to Jrun Client Browser Web pages Altio “Smart Client” Jrun Model / Controller servlet Tomcat Connector servlet, Altio Presentation Server Database
Process Flow: initial access Web Server Loads “access.html” as designated in web virtual directory Client Browser “server.stanford.edu /stanford”
Process Flow: forward to Jrun Web Server Loads “access.html” designated in IIS virtual directory … onLoad send request to controller servlet, ct_action = wurl_login, ct_client = stanford (parsed from URL) Client Browser “server.stanford.edu /stanford Jrun Model / Controller servlet
Process Flow: Jrun session, I Web Server Sends login page to client Client Browser “server.stanford.edu /stanford” Jrun Model / Controller servlet Loads configuration from database based on ct_client, forwards request to login page: wurl_login = stanford/login.html Database
Process Flow: Jrun session, II Web Server Forwards to Jrun Client Browser …/servlet/ct2_controller LOGIN, client, username, password Jrun Model / Controller servlet Authenticates, loads user properties from database, stores info as hash table to ServletContext, keyed by timestamp Database
Process Flow: to Tomcat Web Server Forwards to Jrun Client Browser …/servlet/ct2_controller LOGIN, client, username, password Tomcat Creates Tomcat session, stores: ct_ reference = [key] to session object Jrun Forwards to Tomcat ct2Altio servlet, ct_reference = [key] Database
Process Flow: Load Altio Applet Web Server Client Browser Tomcat Forwards Altio applet holder page back to browser Jrun Database
Process Flow: Link Jrun sessions Client Browser Altio UI applet – application requests initial data = LINK, includes ct_reference [key] as parameter from Tomcat session Web Server Jrun Creates Jrun session for new access from Tomcat, gets info hash table from ServletContext by [key] loads properties to new session. Tomcat Altio presentation engine requests LINK from jrun, passing ct_reference [key] Database
Process Flow: Future Requests Client Browser Altio UI applet – application requests data from service Web Server Tomcat Altio presentation engine requests data from servlet, as client with specific Jrun session. Jrun Servlet responds to request from APS using properties in session Database
Process Flow: Servlet Detail • Servlet: • Receives from UI Application applet: • SQL query • Values of bind variables from UI app / user input • Values of “order by” variables from UI app / user input • Values of minimum and maximum fetch row numbers • Element and Item strings for formulating XML • Builds JDBC query statement, binding values to “where clause”, adds “order-by clause”, wraps in “partial fetch” query, and executes statement. • Retrieves result set, parses column names from result set metadata, builds XML, returns XML to UI applet via “typical” output stream printwriter. UI Applet Database
Wrap Up … Architecture provides high degree of component re-use: • RIA client components eliminate need for UI coding. • “Generic” servlet methods can be re-used for common database functions with little or no additional coding. • Exposing data via XML web service allows access from other client software if properly authenticated. • UI layer only loosely bound to server application – service components may be replaced without requiring UI changes. Additional benefits: • Generic HTML components easily reconfigured for other applications. • Configurations stored in database ease application setup.