stateless/stateful clent server ..connectionless/connection oriented pr

stateless/stateful clent server ..connectionless/connection oriented pr

Post by jada » Thu, 24 Apr 1997 04:00:00



Hello

I a little confused as to the defintion of certain terminology.  What
exactly is a stateless or stateful client server?  What is a connection or
connectionless oriented protocol?  If I am thinking correctly, FTP would
be a connection oriented protocol correct?  

If anyone could give me some insight on this it would be greatly
appreciated :)

Thanks,
Sherman Charles

 
 
 

stateless/stateful clent server ..connectionless/connection oriented pr

Post by Alastair Aitke » Wed, 30 Apr 1997 04:00:00



> Hello

> I a little confused as to the defintion of certain terminology.  What
> exactly is a stateless or stateful client server?  What is a connection or
> connectionless oriented protocol?  If I am thinking correctly, FTP would
> be a connection oriented protocol correct?

Correct about ftp.  Stateful connections keep the connection open
between the client and the server.  FTP is a login service and maintains
an open connection between the client and the server - until you type
"wuit" or "bye" or "exit" or whatever.  http is a stateless protocol -
when the client asks for a resource (URL) the server sends the resource
(document, whatever) packet by packet untill all of it is sent and then
hangs up the socket and goes back to a wait state.  The client waits for
the packets to come over the net and then it too closes it's socket
connection at the client machine.  What these mean is that for an ftp
connection the server knows exactly who the client is (as far as it is
meaningful to a machine) for the duration of the session but the http
server forgets about you the moment it has delivered the document.  Your
next request for a document
is treated as brand new and establishes a new socket to socket
connection between the client and server hosts.

The upshot of all this is that http is theoretically lighter on networks
that ftp but there are such additions to the http protocol as keep-alive
connections, client pull and server push that establish longer sessions
than the simple model above.

Alastair.

 
 
 

stateless/stateful clent server ..connectionless/connection oriented pr

Post by Hr.Ladav » Wed, 30 Apr 1997 04:00:00




> > Hello

> > I a little confused as to the defintion of certain terminology.  What
> > exactly is a stateless or stateful client server?  What is a connection or
> > connectionless oriented protocol?  If I am thinking correctly, FTP would
> > be a connection oriented protocol correct?

> Correct about ftp.  Stateful connections keep the connection open
> between the client and the server.  FTP is a login service and maintains
> an open connection between the client and the server - until you type
> "wuit" or "bye" or "exit" or whatever.  http is a stateless protocol -
> when the client asks for a resource (URL) the server sends the resource
> (document, whatever) packet by packet untill all of it is sent and then
> hangs up the socket and goes back to a wait state.  The client waits for
> the packets to come over the net and then it too closes it's socket
> connection at the client machine.  What these mean is that for an ftp
> connection the server knows exactly who the client is (as far as it is
> meaningful to a machine) for the duration of the session but the http
> server forgets about you the moment it has delivered the document.  Your
> next request for a document
> is treated as brand new and establishes a new socket to socket
> connection between the client and server hosts.

Statelessness of a protocol has nothing to do with the transport
implementation.  Whether a socket gets closed or not, or whether there is
a socket at all is irrelevant to the issue.

A protocol in which a response to request n is influenced by the requests
m, where m < n is a stateful protocol, since the server must implement a
state machine.  Potentially, the server has to preserve the state.

FTP protocol is stateful.  An example:

ftp> pwd  #request is print working directory
/pub
ftp> cd junk  #directory change was requested
ftp> pwd  #again the same request from step 1
/pub/junk  #DIFFERENT response.  The server keeps notion of its current
           #working directory.  It is one piece of its state.

HTTP is a difficult example since there is not a defined set of requests
nor actions to them.  Since it is possible to implement state with some
CGI magic, it should be considered stateful.

NFS file serving is stateless, though.  NFS file locking is not.

Quote:

> The upshot of all this is that http is theoretically lighter on networks
> that ftp but there are such additions to the http protocol as keep-alive
> connections, client pull and server push that establish longer sessions
> than the simple model above.

Actually, HTTP is much heavier on networks than FTP because of constant
connection establishment/tear down which requires name resolutions every
time a request is sent unless the client caches the resolved address.  Even
in that case establishment/tear-down are expensive operations which is
exactly the reason why multiple requests per session were introduced.

As far as networking load is concerned, HTTP was(is) a pig.  But it sure
was relatively easy to implement (in comparison with protocols which
would be more friendly to the network).

/Marino

Quote:

> Alastair.

--
As far as the differences between BSD and Systems V, that's
simple.  System V sucks and BSD doesn't. :)

 
 
 

1. connection oriented and connectionless sockets and system-functions

Hi,

I hope not to post an off-topic email here. I have read in
Rich Stevens' Unix network programming to use
recvfrom() and sendto() for connectionless sockets (e.g. UDP
connections).

I wonder if:
recvfrom(), sendto(), recv() and send() can be used for both
connection-oriented and connectionless sockets.

Hmm, let me put this question like that: Which of the 4 named functions
can be used for which of the two connection types.

If this is off-topic here, I appologize and would be grateful to know
where i could post this.

Thanks in advance and best regards
-Richard

2. Shell Script

3. connectionless vs. connection oriented communication

4. Security daemon

5. Stateful and Stateless Intrusion Detection System

6. Fixing terminal id

7. Help: session-oriented client/server connections

8. tty 8-bit output

9. ssh through vista connection sharing not working, delayed acks from clent.

10. apache & stateless connections

11. stateless connections

12. Is it a clent-server app?

13. Clent/Server cannot see network