Software Development - (Stateless|Stateful)


Stateless or state-full refers to the fact that a unit of program (process, function, procedure) have a state or not (Ie variable that may change).



In a client-side architecture, stateless mechanism means that the state is never saved in the server memory but is on the client side

Parallel aggregate operations over a variety of data sources, including even non-thread-safe collections such as ArrayList. are possible only if we can prevent interference with the data source during the execution. For most data sources, preventing interference means ensuring that the data source is not modified at all during the execution.

Statless pocess are:

The process may be started, stopped, or restarted at any time. See Software Design - Recovery (Restartable)


Execution results may be non-deterministic or incorrect if the behavioral parameters to the operations are stateful.

A stateful parameter is one whose result depends on any state which might change during the execution. The results for the same input could vary from run to run, due to thread scheduling differences, whereas, with a stateless expression the results would always be the same.

The best approach is to avoid stateful behavioral parameters entirely; there is usually a way to restructure the pipeline to avoid statefulness.

Documentation / Reference

Powered by ComboStrap