Thursday, October 9, 2008

Deterministish

Often times we want a bit of code to run in a very reilable way. There are some things that simply must happen on a regular interval, like a watchdog timer or critical control loops or data logging. It is at these times when the word determinism comes up. We like to make our things deterministic. We want to make sure that the whole thing can happen in a certain known period of time, every time.

A lot of these times, deterministish is enough. When I say that, I mean that many of these processes don't have to necessarily run on a perfectly predictable interval. Deterministic might just be too strong of a word sometimes. Most of the time, it's perfectly acceptable to run "regularly". It is just important that the processes not get starved and ignored for a long time by the program. As long as they run again "soon", everything will be fine.

Fortunately, deterministish is a lot more achievable than deterministic. Make sure you know what your customer really needs before you drive yourself crazy making something deterministic that could be accomplished perfectly with deterministish behavoir.

No comments: