Sunday, July 21, 2019

State File Sets

It is common for an application to have state that persists between invocations. It is limiting to think of an application or its state in the singular. It is confusing for an application’s state to be hidden or unreadable. Instead, go with the Unix concepts of text files and processes, such that the processes state is completely determined by the content of text files given to it at invocation. At any one time, there can be multiple instances of an application, running in parallel. As a process’ state changes, the changes are captured by one or another of the text files given to it at invocation. Two processes with the same given text files would be in the same state.

No comments: