210 likes | 307 Views
The Web: a n architectural view. The primitive Web model. HTTPD. Browser. Get URL. Get HTML file. File System. Send HTML. Render HTML. Browser. Internet. The primitive Web model. HTTP Get. File System. httpd. Client. Server. A simple interactive Web model. HTTPD. Browser.
E N D
The primitive Web model • HTTPD • Browser • Get URL • Get HTML file File System • Send HTML • Render HTML
Browser Internet The primitive Web model HTTP Get File System httpd Client Server
A simple interactive Web model • HTTPD • Browser • CGI Process • Get URL with Params • Execute CGI(params) • Build HTML on the fly • Send HTML • Render HTML
Browser Internet httpd process A simple interactive Web model HTTP Get File System Cgi-bin Client Server
An evolved interactive Web model • HTTPD • Browser • CGI Process • DB • Get URL with Params • Execute CGI(params) • Run Sql query • Send query results • Build HTML on the fly • Send HTML • Render HTML
Browser Internet httpd process DB An evolved interactive Web model HTTP Get File System Cgi-bin Query SQL Data Client Server
SLOW! SLOW! Browser Internet httpd process DB The Bottlenecks HTTP Get File System Cgi-bin Query SQL Data Client Server
SLOW! Browser Internet httpd process DB The Bottleneck – part I HTTP Get File System Cgi-bin Query SQL Data Client Server
Smart browser Internet httpd process DB The solution: reduce net traffic by having a smarter client! HTTP Get File System Cgi-bin Query SQL Data Client Server How? Including code in HTML
Smart browser Enabling technologies • Scripting languages • Javascript • Vbscript • Perlscript • Python • … (must be HW-OS-Browser independent!) Interpreted: Source code travels • Programming languages • Java Compiled: Executable travels Client
SLOW! Browser Internet httpd process DB The Bottleneck – part II HTTP Get File System Cgi-bin Query SQL Data Client Server
Browser Internet DB Function The solution: integrate the service into the httpd process HTTP Get File System Query SQL httpd Data Client Server
Function Enabling technologies (depending on server implementation) • Multithreading • DLL • Servlets File System • Using… • Scripting languages • Programming languages httpd Server How? Including code in HTML
mixed client- and server-sidescripting <HTML> … <SCRIPT LANGUAGE=VBScript RUNAT=SERVER> …VBScript Commands… </SCRIPT> … <%VBScript Commands%> … <SCRIPT LANGUAGE=JavaScript> …JavaScript Commands… </SCRIPT> … </HTML> Code executed by the Server BEFORE the page is transferred over the Net ASP Syntax Code transferred to the client and interpreted by the Browser
httpd Internet +CGI Client 1 Client 3 Client 2 The state problem Data User 1 ? Data User 2 Data User 3 Server
httpd Internet +CGI Client 1 Client 3 Client 2 A typical solution Supported by Java & JavaScript Cookie Data User 1 Data User 2 Cookie Data User 3 Server Cookie
httpd Browser Internet process process Java applet A more radical solution Supported by Java HTTP Get Client Cgi-bin Startup Startup Socket connection Server
httpd Browser CORBA Internet process process Java applet Middle Tier An even more radical solution Supported by Java HTTP Get Client Cgi-bin Startup Startup Server
WAP - Cenni 9600 baud (*) Client (cellular phone) MicroBrowser Gateway WAP Richiesta WDP + WTSL (Wireless Datagram Protocol) Wireless Transport Security Layer Descrizione delle pagine: Wml (Wireless Markup Language, in XML) Hdml (HandhelD Markup Language, variante di HTML Server HTTP More info: www.wapforum.org (*) con GPRS fino a 56 Kbit/sec, conUMTS fino a 2 Mbit/sec (Universal Mobile Telecommunication System)
XML Enabled HTTP Server Stylesheet Server HTTP Server Document Server Client Get document XSLT Processor HTTP request XML document Get SS XSL stylesheet XML + XSL HTML document HTML document