Technologies evolve and new patterns replace the old way of doing things. In the early days of the internet, there was no concept of state, every request to a web server responded with a resource like HTML and other resources. The user experience of the website was improved by designing persistence mechanisms such as sessions via cookies, disk, or memory. The web has evolved a lot since then. We have modernized web apps and we have open standards and a big ecosystem to create applications. Newer applications make use of the Representational State Transfer architectural style to create Restful web applications that use the HTTP protocol to transfer requests for web resources. In the following sections, we will understand the difference between stateful and stateless with several implementation reference architectures.
In this chapter, we...