Client-Server Design Alternatives: Back to Pipes but with Threads

  • Authors:
  • Boris Roussev;Jie Wu

  • Affiliations:
  • -;-

  • Venue:
  • ICN '01 Proceedings of the First International Conference on Networking-Part 2
  • Year:
  • 2001

Quantified Score

Hi-index 0.00

Visualization

Abstract

In this paper we set out to theoretically explore and experimentally compare different client-server design alternatives implemented in Java. We introduce a new concurrent data structure, called concurrent hash table, for solving the synchronization problem in the classical producer/consumer model. The structure allows multiple reads and a single write to proceed concurrently. We look at the following TCP server designs: concurrent server-new thread per client; pre-threaded servers: locking around accept; socket passing through a shared buffer; socket passing through a concurrent queue; socket passing through a concurrent hash table; socket passing through pipes. The servers have been tested on a network of 35 workstations. The experimental results have shown that the server using pipes to pass tasks to the workers outperforms every other one. For all servers, better performance is achieved by using a number of worker threads in the range of one hundred rather than fifteen as commonly recommended.