Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save patrickbucher/a399022ccde43eba1f8003560f492759 to your computer and use it in GitHub Desktop.
Save patrickbucher/a399022ccde43eba1f8003560f492759 to your computer and use it in GitHub Desktop.
Workflow Engines: Draft
- Software consists of algorithms and data structures. (Niklaus Wirth published
a book called _Algorithms = Data Structures = Programs_.)
- Algorithms work on data structures by manipulating them in place or by
transforming them into other data structures.
- Data structures are usually the starting and end point of a program.
Exceptions are programs that make up their own data (e.g. by generating
random data or by gathering measurements of sensors), but even then the
definition of the data structures predates the algorithm.
- The data structure an algorithm works on shall be called an _input data
structure_, and a data structure an algorithm is producing shall be called an
_output data structure_. If the algorithm manipulates the input data
structure in place, the output data structure is the same as the input data
structure (with only different values), but input and output data structures
remain two distinct concepts for that matter.
- Changes to an input or output data structure affect the algorithm. Changes to
an algorithm can be made without changing either input or output data
structure. Therefore, changing a data structure has a wider impact on the
software than changing an algorithm, different runtime properties
notwhithstanding. And therefore, design decisions affecting the data
structures are more consequential than design decisions affecting the
algorithms.
- Workflow engines make the algorithm transparent, but hide the data
structures. The foremost design decisions made by their users affect the
algorithms of the software, with data structures only being an afterthought.
Even if the analysis and design starts with the data structure, the resulting
program is foremost a visualization of the algorithm, not of the data
structures.
- Any developer analyzing a program created using a workflow engine first and
foremost gets acquainted with its algorithms, not with its data structures.
The program is perceived as an algorithm, not as a combination of data
structures and algorithms.
- In such an environment, the data structures become an implementation detail
to be dealt with in the individual steps of a workflow (its sub-algorithms).
However, changing such an alleged implementation detail has consequences for
the entire program, which usually cannot be foreseen.
- Even though workflow engines are helpful when creating a first version of a
program, the way in which such software are designed leads to fragile
programs that hardly can be modified and improved.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment