Goal of Architecture Design Web Architectures Performance application must sustain expected workload (max no of concurrent users, no page requests per unit of time, max time for delivering web page to client) Scalability Architecture Design Supporting Multi-Channel Access VoiceXML architecture must be extensible to support workload increases Availability effects of failures should be minimised State Maintenance user interaction state preserved even if appln distributed and failure occurs Security info hosted in data tier and transmitted to users must be protected; users granted access to only that data and services they are entitled to 05.04.2012 3 Architecture Design Single Server Configuration Choice of hardware, network and software components to find a mix that All basic components installed on same machine best meets application requirements respects technical and economic project constraints Web applications rely on many different technical ingredients protocols, languages, software systems, which do not always fit well together and hence this can be a complex task that requires mastery of a large spectrum of problems and solutions Technical objectives include performance, scalability, availability, state preservation, security client (browser) router/firewall Host 1 web server program execution engine database We will examine increasingly sophisticated architectures Intranet 05.04.2012 2 05.04.2012 4 4 1
Single Server Configuration Separate Database Server Configuration... Performance limited by fact that script engine and DBMS both memory and CPU-intensive and hence conflict in terms of use of machine resources Scaling requires adding power to server maximum scalability bound by hardware architecture Security major concern as access to web server also means direct access to database Low cost and simple Only suitable for small, non-critical web applications Provided by many low-end web hosting services May also be used for intranet Physical separation of database and web server permits more adequate choice and configuration of server machines Security significantly improved second firewall can be added to insulate data tier from web tier inner firewall may disallow requests, only allowing database requests to pass Replication and parallelism can be exploited to improve scalability and availability vertical cloning multiple processors/processes dedicated to applns on single server horizontal cloning entire servers replicated 05.04.2012 5 05.04.2012 7 Separate Database Server Configuration Replicated Web Server Configuration web server + engine 1 Host 1 Host 2 client (browser) router/firewall web server program execution engine firewall database server client (browser) S router/ firewall/ load balancer S web server + engine 2 firewall database server Demilitarized Zone (DMZ) Intranet web server + engine 3 (secure) Demilitarized Zone (DMZ) Intranet 05.04.2012 6 05.04.2012 8 2
Replicated Web Server Configuration... Separation of Web Server & Scripting Engine... Router/firewall acts as network dispatcher distributing incoming requests to different web servers to balance workload May further improve security of data transmission by introducing a server for secure which can handle encrypted data having separate S server doesn t slow down normal requests Note that in a replicated web server architecture, it can no longer be assumed that a single server manages user interaction state information load balancer ensures all requests associated with a session are dispatched to same server (sticky sessions) also providing failure-proof session management 05.04.2012 9 To further improve scalability and fault-tolerance, we can separate web server and scripting engines web server receives requests, delivers static HTML documents and routes requests for dynamically generated documents to script engine script engine executes server side programs which may in turn generate requests to database Cloning can be applied separately to web servers and scripting engines normally processing on script engines heavier than server so may require more scripting engines Introduces two levels of load balancing one across servers and one across script engines As ever, increase in communication overheads introduced by separation should be compensated by performance gains 05.04.2012 11 Separation of Web Server and Scripting Engine Application Servers Large-scale web applications for e-business must ensure high levels of availability, security and scalability S web server 1 engine 1 Application servers are software platforms, distinct from the web server, dedicated to the efficient execution of business components Advantages client (browser) router/ firewall/ load balancer S web server 2 engine 2 firewall database server separates business logic into dedicated sub-tier fosters development of re-usable business objects web server 3 (secure) engine 3 objects hosted in application server can be called by page templates in middle tier or by non-web applications distributed across enterprise (enterprise application integration) Demilitarized Zone (DMZ) Intranet 05.04.2012 10 05.04.2012 12 3
Configuration with Application Server Web Interfaces to Databases Intranet/ Extranet (non-) requests After the introduction of the web, it was considered to be useful to provide access to databases through the web client (browser) S router/ firewall/ load balancer S web server 1 web server 2 web server 3 (secure) DMZ1 engine 1 engine 2 engine 3 firewall application server application server application server DMZ2 firewall Intranet database server This could take several forms depending on purpose and technologies Developing web sites where the content was based on database content recognition that many web sites were data intensive and involved publishing database content use of a database to manage content and ensure consistency of not only content but also presentation Database designers and developers being able to access databases through the web using web infrastructure as a way to provide a relatively quick and easy way to develop application interfaces 05.04.2012 13 05.04.2012 15 Review of Technologies through a history of GlobIS Research OMS Contacts Database OMS Web OMS OMS personal web assistant Web-based OMS database developer Client-side databases XIMA 05.04.2012 14 05.04.2012 16 4
OMS Web and OMS OMS Web These were both systems developed to provide generic web browsers for OMS databases required general means of mapping OMS objects to web browser representations objects / HTML associations (links/relationships between objects) Web Browser collections of objects navigation based on selection from collections CGI gateway Web Server associations between objects developed general markup language to represent database objects values metadata general classes for generating HTML from OMS results Java Appln OMS queries/results OMS Database Stored HTML (OMS images/ OMS Web images) difference in terms of architecture 05.04.2012 17 05.04.2012 19 OMS Web OMS General object browser for OMS databases on-line demonstrations generic HTML browser for OMS databases student exercises browsing & querying databases Improved performance established connections rather than server-side caching client-side caching 05.04.2012 18 05.04.2012 20 5
OMS Personal Assistant Improved performance for regular users Installed local personal assistant User access profiles Persistent client cache Prefetching of objects Disconnected access to objects 05.04.2012 21 05.04.2012 23 Client-Side Processing Personal Assistant Cache Structure Java Applet Application Logic Personal Assistant Cache Persistent Client Cache Web Browser Socket Streams / Session Cache query results images Short-Term Cache Standardised Protocols Web Server Personal Cache query results images Explicit User Specified Objects JDBC Driver Customised Protocols Database Logic Database Prefetching Cache query results images User Profile & Predictive Cache 05.04.2012 22 05.04.2012 24 6
Prefetching Cache Statistics OMS Web Browser LRUB-Cache (fixed size)...... query 1 query 2 query n 1 Front End Agent Memory Cache statistic next query 1 statistic next query 1 statistic next query 1 2 Personal Assistant 3 Client Cache next query 2 next query 2 next query 2 next query 3.... next query 3.... next query 3.... LRUB-Cache (fixed size) Server Database Agent Global Cache next query n next query n next query n OMS Database 05.04.2012 25 05.04.2012 27 Personal Assistant Administration Tools From Personal Assistant to Web Proxy Server The basic prefetching cache mechanisms could also be applied to general web caching and a proxy server was developed based on these mechanisms cache statistic records information about page accesses given one request proxy can predict the next most likely requests proxy already sends requests for these objects thereby prefetching pages fully dynamic requires no analysis of HTML pages fetch size of 3 works reasonably well 05.04.2012 26 05.04.2012 28 7
OMS Developer Tool Web Database Components Support the design & prototyping of databases on the web extend protocols for all OMS languages AQL, DDL, DML, OPL, API re-implementation of graphical editors in Java Swing web-based presentation editor Development process initially use default presentation provided by generic browser then refine it by graphically changing Web Browser Java Applet Database Components Web Server Client Technical challenges browser interaction security restrictions browser incompatibilities dynamic, temporary nature of client-server relationship view on objects (remove certain labels/attributes) layout of objects presentation of objects (colours/fonts) Database Server 05.04.2012 29 05.04.2012 31 Web Scientific Information Systems Data collection, analysis & processing support application experts rather than computer experts data validation tools investigative querying integration of analysis tools Applications medical quality management regional avalanche forecasting analysis of land-mine data 05.04.2012 30 05.04.2012 32 8
Intelligent Querying Interfaces Initial Version Query formulation without Information States Blackboard knowledge of database technologies knowledge of database structures knowledge of data encodings Client-Side Processing Very High Communication Costs Metadata driven querying metadatabase of application and database concepts Server-Side Processing Server query construction driven by interaction with metadatabase MDDQL Interpreter and Transformer Metadata Application Data 05.04.2012 33 05.04.2012 35 Later Version Information States Blackboard Client-Side Processing MDDQL Interpreter and Transformer Metadata OMS Java Lightweight Mobile Database Server-Side Processing Server Application Data 05.04.2012 34 05.04.2012 36 9
XIMA Framework for Multi-Channel Access Why Voice Interfaces? Trend for ubiquitous information services, but small screens, keyboards etc are clumsy to use HTML Browser WML Browser VoiceXML Browser Necessity of hand-free interfaces e.g. driving, machine operation Main Entry Servlet Delegation HTML Servlet WML Servlet VoiceXML Servlet XML + XSLT Response Interfaces for visually impaired users Access by normal phones requires no new devices or installation effort XML Server Builds XML based on JDOM Improvements in speech recognition and text-to-speech synthesis make voice interfaces feasible OMS Java API OMS Java Workspace 05.04.2012 37 05.04.2012 39 Adding voice interfaces to XIMA VoiceXML Application of XML (Standard VoiceXML 2.0) HTML Browser WML Browser VoiceXML Browser generating VoiceXML from XML using XSLT Designed for creating audio dialogs Facilitates the development of interactive voice response applications Main Entry Servlet Based on web technologies Delegation HTML Servlet WML Servlet VoiceXML Servlet XML + XSLT Response Can share information infrastructure of visual interfaces Can develop more flexible and user friendly call services XML Server Builds XML based on JDOM Various VoiceXML outsourcers (voice portals) will host the speech processing system and telephony equipment OMS Java API OMS Java Workspace 05.04.2012 38 05.04.2012 40 10
Scope of VoiceXML Basic Concepts Output synthesised speech (TTS) audio files Input Recognition & recording of spoken input recognition of Dual Tone Multifrequency (DTMF) input Telephony features (e.g. call transfer, disconnect) dialog conversational state each dialog is either a form or a menu form interaction that collects values for field item variables menu presents user with a choice of options transition to next dialog based on choice 05.04.2012 41 05.04.2012 43 Voice Components Example dialogue 1 Voice Infrastructure is often provided by Voice Portals. If only voice output is needed, servers can used that only provide Text-to-Speech Welcome to the weather information service. What state? Help Please say the state for which you want the weather. California Voice Input Speech Speech Recogniser Converts voice input into text Text Language Analyser Extracts meaning from text Meaning VoiceXML Scope Application Server Gets data (text) from database Text Speech Synthesiser Generates speech output Voice Output Speech What city? Globis I did not understand what you said. What city? Los Angeles Speech model Grammar Application database Pronounciation rules The conditions in Los Angeles California are sunny and clear. 05.04.2012 42 05.04.2012 44 11
Forms Prompt counts <form id="weather_info"> <block> Welcome to the weather information service </block> <field name="state"> <prompt> What state? </prompt> <grammar src="state.gram" /> <catch event="help"> Please say the state for which you want the weather. </catch> </field> <field name="city"> <prompt> What city? </prompt> <grammar src="city.gram" /> </field> <block> <submit next="/servlet/weather" namelist="city state" /> </block> </form> <form id="get_card_info"> <block> We now need your credit card type. </block> <field name="card_type"> <prompt count="1"> What kind of credit card do you have? </prompt> <prompt count="2"> Type of card? </prompt> <grammar> visa {visa} master [card] {mastercard} amex {amex} american [express] {amex} </grammar> <help> Please say Visa, Mastercard or American Express. </help> </field> </form> 05.04.2012 45 05.04.2012 47 Example dialogue 2 We now need your credit card type. What kind of credit card do you have? blabla I did not understand what you said. Type of card? Help Please say Visa, Master card or American Express. Eh, Amex What is your card number? collections The database contains the following # collections Choose a collection Collection 'name' contains #M Would you like to list the members or go back? Collection 'name' contains the following # members Choose one of the members The database contains #Collections #Associations Would you like to go to the collections, to the associations, directly to an object or back to the main menu? associations The database contains the following # associations Choose an association Association 'name' contains #A Would you like to list the members or go back? Association 'name' contains the following # associations Choose a 'domaintype' or a 'rangetype' or say back objects Object 'oid' is dressed with type 'type' and currently viewed as type 'type'. It contains #Attr, #Links, #Methods The object contains the following # attributes Would you like to hear the attributes, the links or the methods, change the type or go back? You can choose among the following links Choose a link or say back You can choose among the following methods Choose a method or say back The result of the method is Result The database contains #Objects Choose an object or say back You can view the object as the following types Choose one of the types or say back 05.04.2012 46 05.04.2012 48 12
Design Phase Liberal yes/no grammar Define the required functionality User analysis motivation, expertise High level decisions full-duplex (barge-in) simple grammars (dynamic) synthesised speech (TTS) and pre-recorded speech a yes/no response may allow for yes/yeah/sure/ok/correct/right yes, that's right/ yes it is/ yes I do /... no/nope/incorrect/wrong no way/ no it isn't/ no it's not/ no I don't... Information flow Dialog design 05.04.2012 49 05.04.2012 51 Comments to Design Recognition problems elimination of similar sounding words from the grammar Next Lecture addition of optional words to the grammar (e.g. "please") Sufficient help functionality consider introduction of prompt-specific help instead of always active command list Web 2.0 Immediate feedback after input has been processed ("OK" prompt) 05.04.2012 50 13