CS433/533 Homework Assignment Three: Network Servers and Server Performance Evaluation (Part 2)

This assignment gives you a chance (Part 1) to better understand HTTP design, including its protocol and the processing at the server (Part 1). Another key goal of this assignment is give you a chance (Part 2) to become more familiar with concurrent network programming, covering topics including threads, synchronization, wait/notify (monitor), asynchronous I/O, and benchmarking.


Part 2a: Concurrent HTTP Servers using Threads

As we covered in class, a key approach to controlling the overhead of threads is to use a thread pool. We covered two designs: (1) shared welcome socket; and (2) a shared queue with wait and notitify. Please implement the following three threadpool servers:

For each design, your server needs to read from the configuration file the pool size:
ThreadPoolSize <number of threads>

Part 2b: Async Server: Multiplexed, Nonblocking Server (Reactive Server)

Part 2c: Async Server: Proactive Server

In this part, instead of using the select structure, you use AsynchornousServerSocketChannel and AsynchornousSocketChannel design, based on Future/Listener to implement the same functionality as in 2b.

Part 2d: Comparison of Designs

A great way to learn about your design is to compare with other designs. You need to read the docuemnts or code of two related frameworks: xsocket and netty.

Part 2d(1): Comparison with xsocket

Although xsocket is no longer under active development, it provides a design alternative. Please read the source code and document of x-Socket, a high performance software library for reusable, asynchronous I/O servers. Please discuss in your report the following questions (please refer to the specific location when you refer to its document or source code:

Part 2d(2): Comparison with Netty

Netty is another Java async IO framework used by many; see for example use cases. Please read Netty user's guide and answer the following questions:

Part 2e: Performance Benchmarking

One important computer systems skill is to evaluate the performance of design alternatives. In this assignment, we conduct performance evaluation of the alternatives:

Part 2f: Report

Server performance



During your async i/o design based on select, think how you implement a finite state machine to handle each request (e.g., initial state after accepting a connection, what other states). Java async i/o does not allow you to select events on a file channel. There are can be multiple design options to handle file i/o: