Question: How are these architectures different if we are not in a distributed environment but on one machine? Can we still use sockets?
One minute response: You can still use Internet-domain sockets to communicate within a single machine, but it's probably the lowest-performing choice among the available inter-process communication mechanisms available. Other, potentially better performing choices include Unix-domain sockets and pipes, messages, and shared memory.
Question: What is UDP? What is the best way to develop a client? Does UDP also have the problems of ordering[?].
One minute response: See Section 6.4 in Computer Networks by Tenenbaum. Read Chapters 3, 6, 7, and 17 in Comer and Stevens (which you'll do eventually). See Tip 8 in Snader.
Question: How are systems with no thread support (some Unix variants) working for the support?
One minute response: It's not too hard to implement a thread facility in user space, but implementing a good one requires operating system support.
Question: Is there any way to recover state when a server goes down? Perhaps by using a database to store information? Or is it socket dependent?
One minute response: Recoverable state has to be moved to a place outside the server; this could be a database, or another server (a shadow or mirror server). But notice how tricky state is: information about the external place and its contents becomes more state for server. The form of inter-process communication used doesn't really enter into it.
Question: What is a non-blocking socket?
One minute response: By default, reading a socket that has no data will block until some data shows up. If a socket is non-blocking, a read when the socket is empty returns immediately with an error (EWOULDBLOCK in most versions of Unix). Similar behavior applies to writes (a write blocks when a socket's outgoing buffer is full and can accept no more data).
Question: What is the standard (common) way to avoid buffer overrun.
One minute response: Don't use C or C++.
Question: Is there an advantage to using C++, Java, Perl, etc for server/client? Meaning which language is preferred?
One minute response: Higher-level languages, such as Perl and Python, are easier to use than lower-level language, such as Java and C++, but are harder to control. For clients and vanilla servers, which don't have severe performance requirements, higher-level languages are good enough. High-performance servers, however, need the fine-grained control over the environment that comes with lower-level languages.
Question: It's hard to understand the difference between bind() and connect().
One minute response: Remember that a TCP-UDP connection is a five tuple. bind() sets the local IP address and port number of the connection; connect() sets the remote IP address and port number.
This page last modified on 16 July 2003.