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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
T. Cormen et al., Introduction to Algorithms, The MIT Press, 1994.
S. Deering and R. Hinden, “Internet Protocol, Version 6 (IPv6) Specification,” RFC 2460, 1998.
G.C. Fox and W. Furmanski, “Java for parallel computing and as a general language for scientific and engineering simulation and modeling,” Concurrency: Theory and Practice, Vol 9(6), pp.415–425, 1997.
J. Gosling, B. Joy, and G. Steele, The Java Language Specification, Sun Microsystems, Inc., Palo Alto, CA, 1996.
E.R. Harold, Java Network Programming. O’Reilly & Associates, 1997.
C.A.R. Hoare, “Monitors, An Operating System Structuring Concept,” Communication of the ACM, Vol.17, pp.549–557, Oct. 1974; Erratum in Communication of the ACM, Vol.18, p.95, Feb. 1975.
D. Lea, Concurrent Programming in Java, 2nd ed., Addison-Wesley, 1999.
M. Michael and M. Scott, “Simple, Fast, and Practical Non-Blocking and Blocking Concurrent Queue Algorithms,” In Proc. of the 15th ACM Symposium on Principles of Distributed Computing, Philadelphia, Pennsylvania, pp. 267–276, May 1996.
J. Postel, ed., “Transmission Control Protocol,” RFC 793, 1981.
J. Postel, “Internet Protocol,” RFC760, 1980.
B. Roussev and J. Wu, “Lottery-based scheduling of multithreaded Java applications on NOWs,” Annual Review of Scalable Computing, Vol.3, 2001.
W.R. Stevens, Unix Network Programming, Vol.1, 2nd ed., Prentice Hall, 1998.
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2001 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Roussev, B., Wu, J. (2001). Client–Server Design Alternatives: Back to Pipes but with Threads. In: Networking — ICN 2001. ICN 2001. Lecture Notes in Computer Science, vol 2094. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-47734-9_85
Download citation
DOI: https://doi.org/10.1007/3-540-47734-9_85
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-42303-4
Online ISBN: 978-3-540-47734-1
eBook Packages: Springer Book Archive