Examples of statefull and stateless protocols
Examples of stateless protocols include the Internet Protocol (IP) which is the foundation for the Internet, and the Hypertext Transfer Protocol (HTTP). The application servers add sessions to add statefull functionality to the web applications.
Examples of stateful protocols are FTP (there is an user identification of the remote user), SSH (also it has user identification/authentication).
Converting an stateful protocol to a stateless
If we have to make a stateless version of FTP protocol, we have to change the LS (list folder) operation in these was:
- There has to be operand for user name and user credentials;
- It has to be operand for the directory, which will be listed (using current-directory functionality is a state, so we have to drop it)
Mixing stateless and stateful protocol layers
There can be complex interactions between stateful and stateless protocols among different protocol layers. For example, HTTP is an example of a stateless protocol layered on top of TCP, a stateful protocol, which is layered on top of IP, another stateless protocol, which is routed on a network that employs BGP, another stateful protocol, to direct the IP packets riding on the network.
This question is not directly connected to java, but could be asked in relation of webservices.
No comments:
Post a Comment