Distributed web based systems


Published on

Published in: Technology
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • This is done by ‘wrapping’ some computational capability with a Web Service interface, and allowing other organizations to locate it (via UDDI) and interact with it (via WSDL). Hence, Web Service technology allows the description of an interface in a standard way,
  • Distributed web based systems

    1. 1. Distributed Web-Based SystemsDepartment of Engineering – Information Technology Reza Ghanbari2010<br />
    2. 2. Outline<br />WWW<br />URL<br />WebDocuments<br />HTTP<br />Connections<br />Methods<br />Messages<br />Caching<br />Content Distribution Network<br />Web Service<br />Terminology<br />Architecture<br />Traditional Web Based Systems<br />Multi-tiered Web Based Systems<br />Web Server Clusters<br />Web Security<br />SSL<br />References<br />
    3. 3. World Wide Web<br /><ul><li>It is a wide distributed system with millions of clients and servers for accessing linked documents.
    4. 4. Servers maintain collections of documents while clients provide users an easy-to-use interface for presenting and accessing those documents.
    5. 5. A document is fetched from a server, transferred to a client, and presented on the screen.
    6. 6. There is conceptually no difference between a document stored locally or in another part of the world for any user.
    7. 7. Now, Web has become more than just a simple document based system.
    8. 8. With the emergence of Web Services, it is becoming a system of distributed services rather than just documents offered to any user or machine.</li></li></ul><li>Uniform Resource Locator<br /><ul><li>A reference called Uniform Resource Locator (URL) is used to refer a document.
    9. 9. The DNS name of its associated server along with a file name is specified.
    10. 10. Example:
    11. 11. http://www.example.sharif.edu/notes/WebBasedDistributedSystem.ppt</li></li></ul><li>WEB DOCUMENTS<br /><ul><li>A Web document does not only contain text, but it can include all kinds of dynamic features such as audio, video, animations, etc.
    12. 12. In many cases special helper applications (interpreters) are needed, and they are integrated into the browser.
    13. 13. The main part of Web documents are written in a markup language, such as
    14. 14. HyperText Markup Language (HTML) and
    15. 15. eXtensible Markup Language (XML)</li></li></ul><li>WEB DOCUMENTS<br /><ul><li>HTML and XML can include tags that refer to embedded documents, which are references to other files.
    16. 16. An embedded document can be a complete program executed on-the-fly as part of displaying information.
    17. 17. Multipurpose Internet Mail Exchange (MIME) is used to specify the type of an embedded document.
    18. 18. MIME was originally developed to provide information on the content of e-mail messages.</li></li></ul><li>WEB DOCUMENTS<br />Six top-level Multipurpose Internet Mail Exchange types and some common subtypes.<br />
    19. 19. HTTP<br /><ul><li>All communication between the clients and servers is based on the HTTP. Servers listen on port 80.
    20. 20. HTTP is a simple protocol; a client sends a request to a server and waits for a response.
    21. 21. HTTP is based on TCP; whenever a client issues a request to a server, it first sets up a TCP connection and sends the message on that connection. The same connection is used for receiving the response.
    22. 22. One of the problems with the first versions of HTTP was its inefficient use of TCP connections.
    23. 23. HTTP 1.0 vs. HTTP 1.1</li></li></ul><li>HTTP CONNECTIONS<br /><ul><li>A Web document is constructed from a collection of different files from the same server.
    24. 24. In HTTP version 1.0 and older, each request to a server required setting up a separate connection. When server had responded the connection was broken down. These connections are referred as non-persistent.
    25. 25. In HTTP version 1.1, several requests and their responses can be issued without the need for a separate connection. These connections are referred as persistent.
    26. 26. Furthermore, a client can issue several requests in a row without waiting for the response to the first request which is referred as pipelining.</li></li></ul><li>HTTP CONNECTIONS<br />(a) Using non-persistent connections. <br />(b) Using persistent connections. <br />
    27. 27. HTTP Operations<br />
    28. 28. HTTP MESSAGES (Request)<br />
    29. 29. HTTP MESSAGES (Response)<br />Status code (Phrase): 200 (OK), 400 (Bad Request), 403 (Forbidden), and 404 (Not Found).<br />
    30. 30. HTTP MESSAGES (Response)<br /><ul><li>There are also various message headers that the client can send to the server explaining what it is able to accept as a response</li></li></ul><li>HTTP MESSAGES (Response)<br />
    31. 31. HTTP Caching<br />Clients often cache documents<br />Challenge: update of documents<br />If-Modified-Since requests to check<br />HTTP 0.9/1.0 used just date<br />HTTP 1.1 has an opaque “entity tag” (could be a file signature, etc.) as well<br />When/how often should the original be checked for changes?<br />Check every time?<br />Check each session? Day? Etc?<br />Use “Expires” header<br />If no Expires, often use Last-Modified as estimate<br />16<br />
    32. 32. Example Cache Check Request<br />GET / HTTP/1.1<br />Accept: */*<br />Accept-Language: en-us<br />Accept-Encoding: gzip, deflate<br />If-Modified-Since: Mon, 29 Jan 2001 17:54:18 GMT<br />If-None-Match: "7a11f-10ed-3a75ae4a"<br />User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)<br />Host: www.intel-iris.net<br />Connection: Keep-Alive<br />17<br />
    33. 33. Example Cache Check Response<br />HTTP/1.1 304 Not Modified<br />Date: Tue, 27 Mar 2001 03:50:51 GMT<br />Server: Apache/1.3.14 (Unix) (Red-Hat/Linux) mod_ssl/2.7.1 OpenSSL/0.9.5a DAV/1.0.2 PHP/4.0.1pl2 mod_perl/1.24<br />Connection: Keep-Alive<br />Keep-Alive: timeout=15, max=100<br />ETag: "7a11f-10ed-3a75ae4a"<br />18<br />
    34. 34. Problems<br />Over 50% of all HTTP objects are un-cacheable .<br />Not easily solvable<br />Dynamic data : stock prices, scores, web cams<br />CGI scripts : results based on passed parameters<br />SSL : encrypted data is not cacheable<br />Most web clients don’t handle mixed pages well : many generic objects transferred with SSL<br />Cookies : results may be based on passed data<br />Hit metering : owner wants to measure # of hits for revenue, etc.<br />19<br />
    35. 35. Server Selection<br />Lowest load : <br />to balance load on servers<br />Best performance : <br />to improve client performance<br />Any alive node : <br />to provide fault tolerance<br />How to direct clients to a specific server?<br />Cluster load balancing : TCP hand-off<br />As part of application : HTTP redirect<br />As part of naming : DNS<br />20<br />
    36. 36. Application-Based Redirection<br />HTTP supports simple way to indicate that Web page has moved (30X responses)<br />Server receives Get request from client<br />Decides which server is best suited for particular client and object<br />Returns HTTP redirect to that server<br />May introduce additional overhead :<br />multiple connection setup, name lookups, etc.<br />21<br />
    37. 37. Naming Based<br />Client does name lookup for service<br />Name server chooses appropriate server address<br />A record returned is “best” one for the client<br />Name server could base decision on<br />Server load/location must be collected<br />Information in the name lookup request<br />Name service client :<br /> typically the local name server for client<br />22<br />
    38. 38. Web Proxy Caches<br />23<br />origin <br />server<br />Proxy<br />server<br />HTTP request<br />HTTP request<br />client<br />HTTP response<br />HTTP response<br />HTTP request<br />HTTP response<br />origin <br />server<br />client<br />User configures browser: Web accesses via cache<br />Browser sends all HTTP requests to cache<br />Object in cache: cache returns object <br />Else cache requests object from origin server, then returns object to client<br />
    39. 39. 24<br />Content Distribution Networks (CDNs)<br />origin server <br />in North America<br />The content providers are the CDN customers.<br />Content replication<br />CDN company installs hundreds of CDN servers throughout Internet<br />Close to users<br />CDN replicates its customers’ content in CDN servers. When provider updates content, CDN updates servers<br />CDN distribution node<br />CDN server<br />In U.S.A<br />CDN server<br />in Asia<br />CDN server<br />in Europe<br />
    40. 40. Content Distribution Networks<br />Replicate content on many servers<br />The general organization of a CDN as a feedback-control system<br />25<br />
    41. 41. Web Service<br /><ul><li>Web Service: </li></ul>“software that makes services available on a network using technologies such as XML and HTTP”<br /><ul><li>Service-Oriented Architecture (SOA): </li></ul>“development of applications from distributed collections of smaller loosely coupled service providers”<br />26<br />
    42. 42. Web Services Terminology<br />SOAP<br />Simple Object Access Protocol <br />exchanging XML messages on a network<br />WSDL<br />Web Service Description Language <br />describing interfaces of Web services<br />UDDI <br />Universal Description, Discovery and Integration<br />managing registries of Web services<br />27<br />
    43. 43. Web Services Framework<br />28<br />
    44. 44. Why a New Framework?<br />CORBA, DCOM, Java/RMI, ... already exist<br />XML+HTTP: platform/language neutral, widely accepted and utilized <br />  Web service interoperability <br />29<br />
    45. 45. Servlets/CGI vs. Web Services<br />Browser<br />Browser<br />GUI<br />Client<br />Web<br />Server<br />HTTP GET/POST<br />WSDL<br />SOAP<br />Web<br />Server<br />WSDL<br />Web<br />Server<br />WSDL<br />WSDL<br />SOAP<br />JDBC<br />JDBC<br />DB <br />DB<br />30<br />
    46. 46. TRADITIONAL WEB-BASED SYSTEMS<br /><ul><li>Many Web-based systems are still organized as simple client-server architectures.
    47. 47. The core of a Web site: a process that has access to a local file system storing documents.
    48. 48. A client interacts with Web servers through a special application known as browser.
    49. 49. What’s the key function of a browser?
    50. 50. Responsible for displaying documents. </li></ul>31<br />
    51. 51. TRADITIONAL WEB-BASED SYSTEMS<br />32<br />
    52. 52. MULTITIERED ARCHITECTURES<br /><ul><li>Web documents can be built in two ways:
    53. 53. Static
    54. 54. locates and returns the object identified in the request.
    55. 55. includes predefined HTML pages and JPEG or GIF files.
    56. 56. Web servers do not require communication with any server-side application.
    57. 57. Dynamic
    58. 58. The request is forwarded to an application system where the resulting reply is generated dynamically. (server-side program execution)
    59. 59. Although Web started as simple two-tiered client-server architecture for static Web documents, this architecture has been extended to support advanced type of documents.</li></ul>33<br />
    60. 60. MULTITIERED ARCHITECTURES<br /><ul><li>One of the first enhancements is Common Gateway Interface (CGI): user data comes from an HTML form, specifying the program and parameters.</li></ul>34<br />
    61. 61. MULTITIERED ARCHITECTURES<br /><ul><li>Because of the server-side processing many Web sites are now organized as three-tiered architectures consisting of a Web server, an application server, and a database server.
    62. 62. Server-side scripting technologies are used to generate dynamic content:
    63. 63. Microsoft: Active Server Pages (ASP.NET)
    64. 64. Sun: Java Server Pages (JSP)
    65. 65. Netscape: JavaScript
    66. 66. Free Software Foundation: PHP
    67. 67. Most popular Web server software</li></ul>Apache. As of March 2007, 58% of all websites are using it.<br />35<br />
    68. 68. WEB SERVER CLUSTERS<br /><ul><li>Web servers are replicated and combined with a front endtoimprove performance.</li></ul>36<br />
    69. 69. WEB SERVER CLUSTERS<br /><ul><li>The front end can be designed in two ways:
    70. 70. Transport-layer switch
    71. 71. simply passes data sent along the TCP connection to one of the server’s, depending on some measurement of the server’s load.
    72. 72. Content-aware request distribution
    73. 73. it first inspects the HTTP request and decides which server it should forward that request to.
    74. 74. For example, if the front end always forwards requests for the same document to the same server, the server may cache the document resulting in better response times.</li></ul>37<br />
    75. 75. WEB SERVER CLUSTERS<br />A scalable content-aware cluster of Web servers.<br />38<br />
    76. 76. WEB SERVER CLUSTERS<br /><ul><li>Another alternative to set up a Web Server Cluster is to use round-robin DNS
    77. 77. a single domain name is associated with multiple IP addresses.
    78. 78. When resolving a host name, a browser would receive a list of multiple addresses, each address corresponding a server.
    79. 79. Normally, browsers choose the first address on the list, but most DNS servers circulate the entries.
    80. 80. As a result, simple distribution of requests over the servers in the cluster is achieved.</li></ul>39<br />
    81. 81. Web Security Issues<br /><ul><li> The Web has become the visible interface of the Internet
    82. 82. Many corporations now use the Web for advertising, marketing and sales
    83. 83. Web servers might be easy to use but
    84. 84. Complicated to configure correctly and difficult to build without security flaws
    85. 85. They can serve as a security hole by which an adversary might be able to access other data and computer systems</li></li></ul><li>Secure the Web<br />There are many strategies to securing the web<br />We may attempt to secure the IP Layer of the TCP/IP Stack: This may be accomplished using IPSec, for example.<br />We may leave IP alone and secure on top of TCP: This may be accomplished using the Secure Sockets Layer (SSL) or Transport Layer Security (TLS)<br />We may seek to secure specific applications by using application-specific security solutions: For example, we may use Secure Electronic Transaction (SET)<br />The first two provide generic solutions, while the third provides for more specialized services<br />41<br />
    86. 86. Securing the TCP/IP Stack<br />HTTP<br />FTP<br />SMTP<br />HTTP<br />FTP<br />SMTP<br />SSL/TLS<br />TCP<br />TCP<br />IP/IPSEC<br />IP<br />At the Network Level<br />At the Transport Level<br />S/MIME<br />PGP<br />SET<br />Kerberos<br />SMTP<br />HTTP<br />TCP<br />UDP<br />IP<br />At the Application Level<br />42<br />
    87. 87. Secure Sockets Layer (SSL)<br />Originally developed (1994) by Netscape in order to secure http communications<br />Slight variation became Transport Layer Security (TLS)<br />backward compatible with SSL<br />TCP provides a reliable end-to-end service<br />Consists of two sublayers:<br />SSL Record Protocol (where all the action takes place)<br />SSL Management (Handshake/Cipher Change/ Alert Protocols) <br />43<br />
    88. 88. Protocol Structure<br />44<br />
    89. 89. References<br /><ul><li>Distributed Systems Principles and Paradigms, by Maarten van Steen, VU Amsterdam, steen@cs.vu.nl
    90. 90. Web Service Composition - Current Solutions and Open Problems, by BiplavSrivastava-IBM India Research Laboratory and Jana Koehler-IBM Zurich Research Laboratory
    91. 91. A Reference Architecture for Web Servers, by Ahmed E. Hassan and Richard C. Holt , Software Architecture Group (SWAG), University of Waterloo
    92. 92. An Introduction to Web-based Support Systems, by JingTao Yao, University of Regina
    93. 93. Semantic Annotation for Web Services and their elevance to Environmental Models, by DumitruRoman University of Innsbruck / STI Innsbruck </li></ul>45<br />