Question

What are some advantages and drawbacks of stateless applications?

Answer
Why Trust Techopedia

In the fundamental design of user interfaces, engineers can choose from stateless or stateful systems. A stateless system is one that has no resident memory used to store information between sessions. Stateful systems, on the other hand, will put input into resident memory and store it for future operations.

One of the best examples of stateless applications is the HTML applications used to run internet sites and pages. These applications are stateless as they do not keep and store information about users or user activity after a user has left a site.

As a result, webpages rely on small digital files called cookies to store user information. The cookies will be actively used in future sessions to determine who is accessing the system and what they have done in the past.

Some of the biggest benefits of stateless applications is that the maintaining parties don’t have the responsibility of managing the resident memory. Stateless applications can be less costly than a similar stateful application. They can also be less complex, as there’s no requirement to take in data and keep it on hand, to record it for use later. Every session is brand new and the same programming occurs.

The downside of stateless applications is that, as mentioned, they will not keep information about a particular user session. This issue is evident in the design of cookies to handle user session information on the internet. Generally speaking, using cookies is less efficient than any in-memory system would be. Webmasters have the responsibility of manipulating and maintaining the cookies. So stateless systems are inherently less capable. It may be annoying to users to not have certain session information stored. Customers may feel that stateful capability adds value.

In the end, whether to choose stateless or stateful design depends on the specific uses of the software itself. For example, public kiosk systems can benefit a great deal from stateless technologies. There’s often no need to preserve data between sessions, as numbers of public users handle the system in sequence. For more personalized systems, stateful design can add a lot of convenience and desired functionality.

Related Terms

Justin Stoltzfus
Contributor
Justin Stoltzfus
Contributor

Justin Stoltzfus is an independent blogger and business consultant assisting a range of businesses in developing media solutions for new campaigns and ongoing operations. He is a graduate of James Madison University.Stoltzfus spent several years as a staffer at the Intelligencer Journal in Lancaster, Penn., before the merger of the city’s two daily newspapers in 2007. He also reported for the twin weekly newspapers in the area, the Ephrata Review and the Lititz Record.More recently, he has cultivated connections with various companies as an independent consultant, writer and trainer, collecting bylines in print and Web publications, and establishing a reputation…