Stateless vs. Stateful server
- Stateless server. Server sends off file or block, forgets all about it.
- Stateful server. Server keeps track of processes on machines that have this file open and of their position in the file.
A stateless server has the advantages that:
- Client processes are OK if server crashes and recovers (fault tolerant).
- Server and other clients are OK if one client crashes.
- No OPEN/CLOSE calls are needed.
- Simplifies server
- No tables at server; hence no limits on number of open files.
A stateful server have the advantages that:
- Request messages are shorter.
- Performance is better.
- Readahead is possible.
- File locking is possible (for writing).
- Server-initiated notification is possible.