CS360
Internet Programming-
Reading Days TA Schedule
Posted on April 16th, 2013 No commentsThis schedule subject to change. Feel free to ask us questions on things you don’t understand to prepare for
the final.
Time Wed Thu 9:00 10:00 Javid Javid 11:00 Javid Javid 12:00 Javid Javid 1:00 Javid Javid 2:00 Javid Javid 3:00 Aaron 4:00 Aaron 5:00 Aaron 6:00 7:00 8:00 9:00 -
Welcome to CS360
Posted on December 13th, 2012 1 commentThis is going to be a busy, but hopefully exciting semester. During this course, we will develop a web server to help you understand what is going on under the covers when you write a web application. We will become familiar with low level operating system functionality that is necessary in any multithreaded networking application. We will also develop web applications with increasing degrees of
sophistication. Our emphasis will be in giving you experience with real technologies that you will be using in the future in whatever career path you choose.
-
Midterm Exam Review
Posted on May 23rd, 2010 No commentsThe midterm exam will be in the testing center. You may bring one hand written page of notes of your own making to the exam.
The following questions should provide a good review for the exam:
- What does the listen() command
do and how is it related to the connection oriented nature of TCP?
- Is IP connection oriented?
- Is Ethernet connection oriented?
- Is TCP connection oriented?
- Is HTTP connection oriented?
- Is UDP connection oriented?
- What are the 7 layers in the OSI model?
- What does the bind() procedure in the socket library do? How does it interact with the TCP and IP layers of the protocol stack.
- What is the port used in binding to a socket?
- What is a socket? How does a web server use sockets to distinguish between different clients that connect to it?
- What are the steps a web server must take in processing an HTTP request?
- What are the differences between the way a web server deals with a GET or POST cgi request.
- Is HTTP a stateless protocol?
- What are the differences between a PUT and GET?
- What separates the HTTP header from the message body?
- What are the 3 ways for a web application to maintain session state?
- Compare the pros and cons of each method of maintaining state?
- Explain how an HTTP cookie works. How does a perl application use cookies to create persistant state.
- What are the advantages and disadvantages of CGI?
- What does the SECURE keyword indicate for a cookie?
- What is the size limitation on cookies?
- What are 3 types of data that a Unix file descriptor can access?
- What does the execve system call do?
- What is a race condition?
- What are the differences between threads and processes?
- What does the fork() system call return?
- What system call would you use to determine file information?
- What system call would you use to change the stdout of a process?
- Why would you want to use a thread pool instead of a single thread for serving requests from browsers?
- Why would you want to use a thread pool instead of spawning a new thread for each request from a browser?
- How does a proxy work and how does a web browser maintain a cache?
- How does PHP compare to Perl as a web application language?
- Given a network connection of 1000 Mbit/sec., sending overhead of 80 µsec & receiving overhead of 100 µsec. a 10000 byte message (including the header), with a network layer that allows 10000 bytes in a single message. What is the total time for the transaction to complete over a 1000 km distance assuming that the Speed of light ~ .3 km/µsec?
- Explain how the web could be the Operating System of the future. In your answer, discuss features traditionally offered by an OS and explain how these could be provided over the web.
- What does this php code do?
<?php session_start(); $access_count = $_SESSION['access_count']; $access_count++;
$_SESSION['access_count'] = $access_count;
if ($access_count==1) { echo "the first time!"; } else { $message="accessed this page $access_count times."; } ?> <html> <head> <title>Access Count</title> </head> <body> <?php echo "$message"; ?> </body> </html>
- What does the listen() command
-
Final Exam Review
Posted on December 11th, 2009 No commentsThe final exam will be in the testing center during finals. You may bring one hand-written page of notes of your own making to the exam. The exam will be comprehensive.
The following should provide a good start to review for the exam:
- Review the questions from the midterm review
- Which HTTP request sends the CONTENT_LENGTH header?
- What are the performance advantages and disadvantages of CGI and PHP?
- Why is the information associated with Cookies stored in the browser?
- What are some reasons for using the Model View Controller architecture?
- What are some reasons for using PHP ?
- What are some reasons for using CGI ?
- Why would you use a Model-View-Controller architecture for Internet applications?
- Why is regular expression syntax included in PHP, PERL and RUBY?
- You had the opportunity to include semaphores in your web server lab to control access to the thread pool. What symptoms would you expect if the semaphore code was not working?
- What separates headers from the http message body?
- In a semaphore, what does the integer value represent?
- What does AJAX stand for?
- Review AJAX. How does AJAX work? What are the necessary pieces? How do AJAX requests differ from other requests?
- What is Cross-site scripting (XSS) ?
- How do you preserve state in HTTP?
- Why would you want to use a public key system instead of a symmetric key?
- Why would you want to use a symmetric key system instead of a public key?
- Given p=5, q=11, e=23, d=7, encrypt the message=”6″.
- What is the base Javascript object used for AJAX?
- How could you prevent duplicate form submission?
- What statistical distribution is memoryless?
- You know that the user tolerance for delay in displaying a web page is 8.3 seconds. You are launching a new product and expect to have 1000requests/minute during the peak of your offering. You have a cluster of web servers using DNS round robin load balancing. The service time for each request averages .9 seconds with a standard deviation of .85 seconds. You currently have a cluster of 18 web servers dedicated to your service.
- What is the utilization of each server?
- What is the mean response time for a request?
- What is the standard deviation of the response time?
- How much time does each request spend waiting in the queue?
- How many requests are waiting in the queue at any time?
- What is the 90th percentile of the response time (90% of the requests will be satisfied in less than what time)?
- How many servers would you need to have 90% of the requests satisfied in less than 8.3 seconds?
- You are serving MP3 files to the web from your office in Los Angeles. You have a customer in New York City that is complaining about
his response time. He claims that the average time for him to download a 1.5MByte MP3 file is 50 seconds. His connection to the Internet is a 256Kbps DSL line. Your connection to the Internet is a 50Mbps T3(DS3) line. The speed of light is approximately 2*10^8m/sec and LA-NY = 2800 miles=4480km). The latency through the protocol stack on each end is 100usec. The peak utilization of your web server is 84% and your average service time is .4 seconds.
- What is the total latency for this connection?
- How long does it take for the file to be sent through the bottleneck bandwidth?
- What is the response time of the server?
- Why is the customer experiencing this long response time?
- What one thing could you change that would cause the greatest improvement in download time?
- What would the download time be with this improvement?


