Distributed and Concurrent Systems 18.4.2008 Exercise 6 No X-exercise this week. Remaining exercises (with X) at 26.4. and 6.5 (10.30 - 12). Course exam 6.5. 08.00-10.00. In the following exercises we estimate the performance of a situation where a single server and multiple clients are connected by the Internet. In all cases, compute the performance 1) with SSL handshake, 2) without SSL handshake. In addition to the throughput computation, state also the possible bottleneck of the transaction. A SSL handshake includes 6 messages of total length 1000 bytes. The key generation and checking of the SSL handshake takes 500 million operations for both participants (client and server). After SSL handshake, the communication proceeds using symmetric encryption (which also takes time). If there is not SSL handshake (e.g., continuing an earlier session), the participants directly start with encrypted request and reply. The following table presents these and other values needed to calculate the performances. Those values that are in italics have several values in the following exercises. B is byte, b is bit. The values marked by *, there are options at text. CPU speed (Moper/s) 3000 Average reply length (B) 20000 Server number of CPUs. 1* Symmetric (session) decrypting speed (oper/B) 100 Client network bandwidth (kb/s) 100* Network delay (ms) 20 Server network bandwidth (Mb/s) 625 SSL handshake total length (B) 1000 Average request length (B) 100 # of SSL handshake messages 6 Symmetric (session) encryption speed (oper/B) 200 SSL handshake oper/participant 5*10^8 31) How long (real, wall-clock time) it takes for a client to make and complete a request (from start to finishing the decrypting of the reply) if the client network connection speed is a) 100 kbit/s (EDGE), b) 2 Mbit/s (ADSL). 1) with SSL handshake, 2) without SSL handshake. You need to compute also the time used by the server. 32) How many new requests/second the server can handle a) with one processor, b) with 1000 processors. 1) with SSL handshake, 2) without SSL handshake. The "new" stands for the fact that even if each request takes more than 1 second, it does not require 1 second of server resources, and thus the server can time-share its resources for several concurrent clients. In other words, compute the throughput. 33) Familiarize yourself with Java API class URL (http://java.sun.com/j2se/1.5.0/docs/api/java/net/ URL.html, http://java.sun.com/docs/books/tutorial/networking/urls/readingURL.html) and modify exercise 29 (week 5) to compute the hash from the document retrieved from the URL given at command line. 34) Modify the program MD5Client (at www-page) to support computing of several hashes during the same TCP connection. Before sending the actual file, the client sends the length of the file in bytes (an integer of 4 bytes, network byte order). Helper methods at www-page. 35) Correspondingly, modify the MD5Server (at www-page) to support computing several hashes during the same TCP connection. Before each document, the server receives the length of the document (an integer of 4 bytes, network byte order), receives the document, computes the hash, sends the answer, and waits for new documents until the client closes the connection. 36) Modify the previous MD5Server to multi-threaded one so that a new thread is started for each new connection. Thus, the server can serve several clients concurrently.