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
Distributed Web-Based SystemsDepartment of Engineering – Information Technology Reza Ghanbari2010<br />
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 />
World Wide Web<br /><ul><li>It is a wide distributed system with millions of clients and servers for accessing linked documents.
Servers maintain collections of documents while clients provide users an easy-to-use interface for presenting and accessing those documents.
A document is fetched from a server, transferred to a client, and presented on the screen.
There is conceptually no difference between a document stored locally or in another part of the world for any user.
Now, Web has become more than just a simple document based system.
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.
The DNS name of its associated server along with a file name is specified.
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.
In many cases special helper applications (interpreters) are needed, and they are integrated into the browser.
The main part of Web documents are written in a markup language, such as
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.
An embedded document can be a complete program executed on-the-fly as part of displaying information.
Multipurpose Internet Mail Exchange (MIME) is used to specify the type of an embedded document.
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 />
HTTP<br /><ul><li>All communication between the clients and servers is based on the HTTP. Servers listen on port 80.
HTTP is a simple protocol; a client sends a request to a server and waits for a response.
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.
One of the problems with the first versions of HTTP was its inefficient use of TCP connections.
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.
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.
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.
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 />
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 />
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 />
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 />
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 />
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 />
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 />
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 />
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 />
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 />
Content Distribution Networks<br />Replicate content on many servers<br />The general organization of a CDN as a feedback-control system<br />25<br />
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 />
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 />
The request is forwarded to an application system where the resulting reply is generated dynamically. (server-side program execution)
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 />
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 />
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.
Server-side scripting technologies are used to generate dynamic content:
Complicated to configure correctly and difficult to build without security flaws
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 />
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 />
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 />