10 Questions for Practice Exam - Client-Server Programming | CS 580, Exams of Computer Science

Material Type: Exam; Professor: Whitney; Class: CLIENT-SERVER PROGRAMMING; Subject: Computer Science; University: San Diego State University; Term: Spring 2004;

Typology: Exams

Pre 2010

Uploaded on 03/28/2010

koofers-user-ucq
koofers-user-ucq 🇺🇸

10 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CS 580 Exam Spring 2004
Answer 9 of the following 10 questions. Indicate which problems you want graded.
1. We have a client-server system where the client can make multiple requests on one
connection. That is a client opens a connection, makes a request, receives a response,
makes another request, etc. In such a system the server needs to know when it has received
the entire contents of a single message. What are the different techniques that can be used in
a protocol so the server knows when it has received the entire contents of a single message?
2. Some protocols use key-value pairs to transmit data, others do not. What is the advantage of
using key-value pairs?
3. We have a protocol that sends a series of key-value pairs. The basic format is key1=value1;
key2=value2;…;keyN=valueN;. That is the pairs are separated by the character “;” and the
key and value in a pair are separated by the character “=”. What problem(s) can occur in
reading & parsing this format? How can one solve the problem(s)?
4. Some protocols are text based, others are binary. Give one advantage of a text based
protocol over a binary protocol. Give one advantage of a binary protocol over a text based
protocol.
5. We have a method multiply( int a, int b) ( multiply: anInteger by: integer2 for Smalltalkers)
that returns the result of multiplying two integers . The method is an instance method on the
class Foo. Write a test case for this method.
6. What are the advantages of using a thread pool over creating a new thread for to handle new
connections in a concurrent server?
7. What uniquely defines a connection between two machines using TCP/IP?
8. Why might logging be important in client-server applications? What type of information might
be important to log?
9. When would one use an iterative server over a concurrent server?
10. A student was hired to create a database to hold the grades of students in computer science
courses. The student produced the following table with the columns listed below. Produce a
normalized version of the table.
Student_First_Name, Student_Last_Name, Student_Red_ID
CS107_Assignment1, …, CS107_Assignment25,
CS108_Assignment1, …, CS108_Assignment25,
… (not shown are the other course offered by the department)
CS696_Assignment1, …., CS696_Assignment25
! ! Page 1 of 2
pf2

Partial preview of the text

Download 10 Questions for Practice Exam - Client-Server Programming | CS 580 and more Exams Computer Science in PDF only on Docsity!

CS 580 Exam Spring 2004 Answer 9 of the following 10 questions. Indicate which problems you want graded.

1. We have a client-server system where the client can make multiple requests on one connection. That is a client opens a connection, makes a request, receives a response, makes another request, etc. In such a system the server needs to know when it has received the entire contents of a single message. What are the different techniques that can be used in a protocol so the server knows when it has received the entire contents of a single message? 2. Some protocols use key-value pairs to transmit data, others do not. What is the advantage of using key-value pairs? 3. We have a protocol that sends a series of key-value pairs. The basic format is key1=value1; key2=value2;…;keyN=valueN;. That is the pairs are separated by the character “;” and the key and value in a pair are separated by the character “=”. What problem(s) can occur in reading & parsing this format? How can one solve the problem(s)? 4. Some protocols are text based, others are binary. Give one advantage of a text based protocol over a binary protocol. Give one advantage of a binary protocol over a text based protocol. 5. We have a method multiply( int a, int b) ( multiply: anInteger by: integer2 for Smalltalkers) that returns the result of multiplying two integers. The method is an instance method on the class Foo. Write a test case for this method. 6. What are the advantages of using a thread pool over creating a new thread for to handle new connections in a concurrent server? 7. What uniquely defines a connection between two machines using TCP/IP? 8. Why might logging be important in client-server applications? What type of information might be important to log? 9. When would one use an iterative server over a concurrent server? 10. A student was hired to create a database to hold the grades of students in computer science courses. The student produced the following table with the columns listed below. Produce a normalized version of the table. Student_First_Name, Student_Last_Name, Student_Red_ID CS107_Assignment1, …, CS107_Assignment25, CS108_Assignment1, …, CS108_Assignment25, … (not shown are the other course offered by the department) CS696_Assignment1, …., CS696_Assignment !! Page 1 of 2

CS580 Fall 2002 Exam Answer nine (9) of the following questions. Do not answer more than nine. If you answer more than nine questions the nine answers that give you the lowest score will be used to determine your grade.

  1. What does it mean to marshal a request?
  2. What are the advantages of a Lo-fi prototype over building a prototype in software?
  3. Explain how one can have 15 clients on one machine (say rohan) connect to the same server at the same time on another machine (say rugby) and not have the connections get mixed up.
  4. Explain the terms: Iterative server Concurrent server Stateful server
  5. What are the ways in which we can specify in a protocol so that a server can determine it has read to the end of a message sent from a client, to which is must send a response?
  6. Explain the thread (process) scheduling algorithm [that is priorities & timeslicing] of Java (Smalltalk).
  7. Show how to create a thread (process) in Java (Smalltalk) and give it a different priority than the default priority.
  8. What are the advantages and disadvantages of using UDP over TCP?
  9. Problems that can arise with client and server are on different hardware platforms (say client is on a PC and server in on Unix).
  10. We have a method add( int a, int b) ( add: anInteger to: integer2) that returns the sum of two integers. The method is an instance method on the class Foo. Write a test case for this method.
  11. Why might logging be important in client-server applications? What type of information might be important to log? 12a. What are the benefits of using name/value pairs as opposed to positional parameters? b. What are the benefits of using positional parameters as opposed to name/value pairs? !! Page 2 of 2