Presentation is loading. Please wait.

Presentation is loading. Please wait.

Distributed systems: an architectural view. Once upon a time… The Mainframe Dumb Terminal Dumb Terminal Dumb Terminal Dumb Terminal Dumb Terminal Dumb.

Similar presentations


Presentation on theme: "Distributed systems: an architectural view. Once upon a time… The Mainframe Dumb Terminal Dumb Terminal Dumb Terminal Dumb Terminal Dumb Terminal Dumb."— Presentation transcript:

1 Distributed systems: an architectural view

2 Once upon a time… The Mainframe Dumb Terminal Dumb Terminal Dumb Terminal Dumb Terminal Dumb Terminal Dumb Terminal All of the work is done at the center Fixed local connections Or modems

3 Mainframe Terminal logic/data presentation User input/output

4 Once upon a time… The Mainframe Intelligent Terminal Intelligent Terminal Intelligent Terminal Intelligent Terminal Intelligent Terminal Intelligent Terminal Some work os done on the periphery: the client-server paradigm

5 Client server ServerClient Most logic/data Some logic/data + presentation Enabled by: the Personal Computer / Workstation the Internet (TCP/IP)

6 Client server - evolution Three tier architecture Data Storage Business Logic Presentation Logic The Model The Controller The View

7 Client server - problems Part of the BUSINESS LOGIC is performed on the periphery: The new version nightmare…

8 The Web – Back to the old model! Web Server 2 Thin client General purpose Web Server 3 Web Server 1

9 The Web: an architectural view

10 Needed Conceps: TCP-IP protocol suite Port

11 HTTP Overview HTTP Requests An HTTP request consists of a request method, (“subprotocol” specification) a request URL, (location) header fields, (metadata) a body. (data) HTTP 1.1 defines the following request methods: GET: Retrieves the resource identified by the request URL HEAD: Returns the headers identified by the request URL POST: Sends data of unlimited length to the Web server PUT: Stores a resource under the request URL DELETE: Removes the resource identified by the request URL OPTIONS: Returns the HTTP methods the server supports TRACE: Returns the header fields sent with the TRACE request HTTP 1.0 includes only the GET, HEAD, and POST methods. Although J2EE servers are required to support only HTTP 1.0, in practice many servers support HTTP 1.1.

12 HTTP Overview HTTP Responses An HTTP response contains a result code, header fields, and a body. The HTTP protocol expects the result code and all header fields to be returned before any body content. Some commonly used status codes include: 100: Continue 200: OK 404: the requested resource is not available 401: the request requires HTTP authentication 500: an error occurred inside the HTTP server that prevented it from fulfilling the request 503: the HTTP server is temporarily overloaded and unable to handle the request For detailed information on this protocol, see the Internet RFCs: HTTP/1.0 (RFC 1945), HTTP/1.1 (RFC 2616). (http://www.rfc-editor.org/rfc.html)http://www.rfc-editor.org/rfc.html See also http://en.wikipedia.org/wiki/Httphttp://en.wikipedia.org/wiki/Http

13 HTTPS Overview https is a URI scheme which is syntactically identical to the http: scheme normally used for accessing resources using HTTP. Using an https: URL indicates that HTTP is to be used, but with a different default port (443) and an additional encryption/authentication layer between HTTP and TCP. This system was developed by Netscape Communications Corporation to provide authentication and encrypted communication and is widely used on the World Wide Web for security-sensitive communication, such as payment transactions.

14 S-HTTP Overview Secure hypertext transfer protocol' (S-HTTP) is an alternative mechanism to the https URI scheme for encrypting web communications carried over HTTP. S-HTTP is defined in RFC 2660. Web browsers typically use HTTP to communicate with web servers, sending and receiving information without encrypting it. For sensitive transactions, such as Internet e-commerce or online access to financial accounts, the browser and server must encrypt this information. The https: URI scheme and S-HTTP were both defined in the mid 1990s to address this need. Netscape and Microsoft supported HTTPS rather than S-HTTP, leading to HTTPS becoming the de facto standard mechanism for securing web communications. S- HTTP is an alternative mechanism that is not widely used.

15 Browser Render HTML Get URL Send HTML Get HTML file HTTPD File System The primitive Web model

16 httpd The primitive Web model Internet HTTP Get Client Browser Server File System

17 Browser Render HTML Get URL with Params Send HTML Execute CGI(params) Build HTML on the fly HTTPD CGI Process A simple interactive Web model

18 httpd A simple interactive Web model Internet HTTP Get Cgi-bin process Client Browser Server File System

19 Browser Render HTML Get URL with Params Send HTML Execute CGI(params) Build HTML on the fly HTTPD CGI Process DB Run Sql query Send query results An evolved interactive Web model

20 httpd An evolved interactive Web model Internet HTTP Get Cgi-binQuery SQL process DB Data Client Browser Server File System

21 httpd The Bottlenecks Internet HTTP Get Cgi-binQuery SQL process DB Data Client Browser SLOW! Server File System

22 httpd The Bottleneck – part I Internet HTTP Get Cgi-binQuery SQL process DB Data Client Browser SLOW! Server File System

23 httpd The solution: Internet HTTP Get Cgi-binQuery SQL process DB Data Client Smart browser How? Including code in HTML Server File System reduce net traffic by having a smarter client!

24 Programming languages Java Java Enabling technologies Client Smart browser Scripting languages Javascript Javascript Vbscript Vbscript Perlscript Perlscript Python Python … … Interpreted: Source code travels Compiled: Executable travels (must be HW-OS-Browser independent!)

25 httpd The Bottleneck – part II Internet HTTP Get Cgi-binQuery SQL process DB Data Client Browser SLOW! Server File System

26 httpd The solution: Internet HTTP Get Query SQL Function DB Data Client Browser Server File System integrate the service into the httpd process

27 Enabling technologies Multithreading Multithreading DLL DLL Servlets Servlets Using… Scripting languagesScripting languages Programming languagesProgramming languages Function httpd Server How? Including code in HTML File System (depending on server implementation)

28 mixed client- and server-side scripting<HTML>… …VBScript Commands… </SCRIPT>… … …JavaScript Commands… </SCRIPT>…</HTML> Code executed by the Server BEFORE the page is transferred over the Net Code transferred to the client and interpreted by the Browser ASP Syntax

29 The state problem Internet Client 1 Server +CGI httpd Data User 1 Data User 2 Data User 3 Client 3 Client 2 ?

30 A typical solution Internet Client 1 Server +CGI httpd Data User 1 Data User 2 Data User 3 Client 3 Client 2 Cookie Cookie Cookie Supported by Java & JavaScript

31 httpd A more radical solution Internet HTTP Get Cgi-bin process Client Browser Server Java applet process Startup Socket connection Supported by Java

32 httpd An even more radical solution Internet HTTP Get Cgi-bin process Client Browser Server Java applet process Startup CORBA Middle Tier Supported by Java

33 WAP - CenniClient (cellular phone) MicroBrowser Gateway WAP Request WDP + WTSL (Wireless Datagram Protocol) Wireless Transport Security Layer Server HTTP Page description: Wml (Wireless Markup Language, in XML) Hdml (HandhelD Markup Language, variante di HTML 9600 baud (*) (*) GPRS up to 56 Kbit/sec, UMTS up to 2 Mbit/sec (Universal Mobile Telecommunication System) More info: www.wapforum.org

34 XML Enabled HTTP ServerClient DocumentServerHTTPServer XSLTProcessor HTTP request StylesheetServer Get document XML document Get SS XSL stylesheet XML + XSL HTML document HTML document

35 httpd The Proxy Internet Client Browser Server Proxy


Download ppt "Distributed systems: an architectural view. Once upon a time… The Mainframe Dumb Terminal Dumb Terminal Dumb Terminal Dumb Terminal Dumb Terminal Dumb."

Similar presentations


Ads by Google