A little confused with the notion of stateful/stateless architectures. Forgive me if I'm unclear.
Questions: Can we consider a clients interaction with a web server to be stateful if the web server maintains state via session variables or cookies? What if we assume that any change to this information comes from the client side any way and doesn't depend on other users?
What about amazon's web store? Although state may change and not be reflected automatically to the client... if the client attempts to operate on stale data, the system recognizes this and acts appropriately. Is this purely stateless still? Or somewhere in between?
What if we added a layer of java script that constantly polled the server every second to keep the client side updated? At an abstract level wouldn't this be considered stateful because the client will continuously have an updated state?
Definitions/Models I'm trying to work with:
Stateless architecture of websites: HTTP is a stateless protocol. The client makes an HTTP web request. The server calculates/processes the request and returns back to the client the appropriate information which the current state of the website. While the client has that information, the website can change state and these changes won't be reflected back to the client side until the client makes another web request.
Stateful architecture: The client can simply operate assuming that any data that is seen represents the actual state of the server.