Internetworking with TCP/IP: Client-Server Programming and Applications,Linux/Posix Version, Vol 3 Be the First to Write a Review and tell the world about this title!Books on similar topics, in best-seller order: Books from the same publisher, in best-seller order:
Internetworking with TCP/IP, Volume III describes the fundamental concepts of client-server computing used to build all distributed computing systems, and presents an in-depth guide to the Posix sockets standard utilized by Linux and other operating systems. Dr. Douglas E. Comer compares leading server designs, and describes the key tools and techniques used to build clients and servers, including Remote Procedure Call (RPC). The book contains examples of running programs that illustrate each approach. KEY TOPICS: Comer introduces the client-server model and its software design implications; the role of concurrent processing and threads; the Socket API, and differences that impact Linux programmers. Understand the key algorithms and issues associated with client and server software design; then review three leading approaches: iterative, connectionless servers (UPD); and both iterative and concurrent connection-oriented servers (TCP). The book contains extensive coverage of threading, including a new chapter on using threads for concurrency; as well as coverage of single-threaded and multi-threaded concurrent servers. Comer introduces multi-protocol and multi-service services; reviews client concurrency; tunneling at the transport and application levels; and external data representation (XDR). He reviews RPC, distributed program generation, NFS concepts and protocol; Telnet; streaming media transport; and finally, techniques for avoiding deadlock and starvation in client-server systems. MARKET: For everyone who wants to master TCP/IP and understand how the Internet works.
Features
Douglas Comer's long-awaited, authoritative guide to Posix sockets, as implemented in Linux! - Leading approaches to client-server design: iterative and concurrent; connectionless and connection-oriented.
- Extensive coverage of threading and concurrency, including detailed techniques for avoiding deadlocks and starvation.
- Includes extensive program examples illustrating each key concept and technique.
Table of Contents
(NOTE: Each chapter begins with an Introduction and concludes with a Summary.) 1. Introduction and Overview.
Internet Applications Using TCP/IP. Designing Applications for a Distributed Environment. Standard and Nonstandard Application Protocols. An Example of Standard Application Protocol Use. AN Example TELNET Connection. Using TELNET to Access an Alternative Service. Application Protocols and Software Flexibility. Viewing Services from the Provider's Perspective. The Remainder of This Text.
2. The Client Server Model and Software Design.
Motivation. Terminology and Concepts.
3. Concurrent Processing in Client-Server Software.
Concurrency in Networks. Concurrency in Servers. Terminology and Concepts. An Example of Concurrent Process Creation. Executing New Code. Context Switching and Protocol Software Design. Concurrency and Asynchronous.
4. Application Interface to Protocols.
Loosely Specified Protocol Software Interface. Interface Functionality. Conceptual Interface Specification. System Calls. Two Basic Approaches to Network Communication. The Basic I/O Functions Available in Lunix. Using Linus I/O with TCP/IP.
5. The Socket API.
Berkeley Sockets. Specifying a Protocol Interface. The Socket Abstraction. Specifying an Endpoint Address. A Generic Address Structure. Major System Calls in the Socket API. Utility Routines for Integer Conversion. Using Socket Calls in a Program. Symbolic Constant for Socket Call Parameters.
6. Algorithms and Issues in Client Software Design.
Learning Algorithms Instead of Details. Client Architecture. Identifying the Location of a Server. Parsing an Address Argument. Looking Up a Domain Name. Looking Up a Well-Known Port by Name. Port Numbers and Network Byte Order. Looking Up a Protocol by Name. The TCP Client Algorithm. Allocating a Socket. Choosing a Local Protocol Port Number. A Fundamental Problem in Choosing a Local IP Address. Connecting a TCP Socket to a Server. Communication with the Server Using TCP. Receiving a Response from a TCP Connection. Closing a TCP Connection. Programming a UDP Client. Connected and Unconnected UDP Sockets. Using Connect with UDP. Communicating with a Server Using UDP. Closing a Socket That Uses UDP. Partial Close for UDP. A Warning about UDP Unreliability.
7. Example Client Software.
The Importance of Small Examples. Hiding Details. An Example Procedure Library for Client Programs. Implementation of ConnectTCP. Implementation of ConnectUDP. A Procedure That Forms Connections. Using the Example Library. The DAYTIME Service. Implementation of a TCP Client for DAYTIME. Reading from a TCP Connection. The TIME Service. Accessing the TIME Service. Accurate Time and Network Delays. A UDP Client for the TIME Service. The ECHO Service. A TCP Client for the ECHO Service. A UDP Client for the ECHO Service.
8. Algorithms and Issues in Server Software Design.
The Conceptual Server Algorithm. Concurrent vs. Iterative Servers. Connection-Oriented vs. Connectionless Access. Transport Protocol Semantics. Choice of Transport. Connection-Oriented Servers. Connectionless Servers. Failure, Reliability, and Statelessness. Optimizing Stateless Servers. Four Basic Types of Servers. Request Processing Time. Iterative Server Algorithms. An Iterative, Connection-Oriented Server Algorithm. Binding to a Well-Known Address Using INADDR_ANY. Placing the Socket in Passive Mode. Accepting Connections and Using Them. An Iterative, Connectionless Server Algorithm. Forming a Reply Address in a Connectionless Server. Concurrent Server Algorithms. Master and Slaves. A Concurrent, Connectionless Server Algorithm. A Concurrent, Connection-Oriented Server Algorithm. Implementations of Server Concurrency. Using Separate Programs as Slaves. Apparent Concurrency Using a Single Thread. When to Use Each Server Type. A Summery of Server Types. The Important Problem of Server Deadlock. Alternative Implementations.
9. Iterative, Connectionless Servers (UDP).
Creating a Passive Socket. Process Structure. An Example TIME Server.
10. Iterative, Connection-Oriented Servers (TCP).
Allocating a Passive TCP Socket. A Server for the DAYTIME Service. Process Structure. An Example DAYTIME Server. Closing Connections. Connection Termination and Server Vulnerability.
11. Concurrent, Connection-Oriented Servers (TCP).
ECHO Service. Iterative vs. Concurrent Implementations. Process Structure. An Example Concurrent ECHO Server. Cleaning Up Errant Processes.
12. Using Threads for Concurrency (TCP).
Overview of Linux Threads. Advantages of Threads. Disadvantages of Threads. Descriptors, Delay, and Exit. Thread Exit. Thread Coordination and Synchronization. An Example Server Using Threads. Monitor and Control.
13. Single-Thread, Concurrent Servers (TCP).
Data-Driven Processing in a Server. Data-Driven Processing with a Single Thread. Process Structure of a Single-Thread Server. An Example Single-Thread ECHO Server.
14. Multiprotocol Servers (TCP, UDP).
The Motivation for Reducing the Number of Servers. Multiprotocol Server Design. Process Structure. An Example Multiprotocol DAYTIME Server. The Concept of Shared Code. Concurrent Multiprotocol Servers.
15. Multiservice Servers (TCP, UDP).
Consolidating Servers. A Connectionless, Multiservice Server Design. A Connection-Oriented, Multiservice Server Design. A Concurrent, Connection-Oriented, Multiservice Server. A Single-Thread, Multiservice Server Implementation. Invoking Separate Programs from a Multiservice Server. Multiservice, Multiprotocol Designs. An Example Multiservice Server. Static and Dynamic Server Configuration. The Super Server, Inetd. An Example Inetd Server. A List of Server Variations.
16. Uniform, Efficient Management of Server Concurrency. 17. Concurrency in Clients. 18. Tunneling at the Transport and Application Levels. 19. Application Level Gateways. 20. External Data Representation (XDR). 21. Remote Procedure Call Concept (RPC). 22. Distributed Program Generation (Rpcgen Concept). 23. Distributed Program Generation (Rpcgen Example). 24. Network File System Concepts (NFS). 25. Network File System Protocol (NFS, Mount). 26. A TELNET Client (Program Structure). 27. A TELNET Client (Implementation Details). 28. Streaming Audio and Video Transport (RTP Concept and Design). 29. Streaming Audio and Video Transport (Example RTP Implementation). 30. Practical Hints and Techniques For Linux Servers. 31. Deadlock and Starvation in Client-Server Systems. Appendix 1: System Calls and Library Routines Used with Sockets. Appendix 2: Manipulation of Linux File and Socket Descriptors. Bibliography. Index.
|