Software Development - (Stateless|Stateful)

> Code - (Programming|Computer) Language > ( Information System | Software ) Design - Art of Programming

1 - About

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).

Advertising

3 - Type

3.1 - Stateless

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)

3.2 - Stateful

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.

4 - Documentation / Reference

code/design/stateless.txt · Last modified: 2017/10/27 15:54 by gerardnico