Lifecycle management in dynamic systems
Cliff Brake December 18, 2024 #lifecycleOne of the hard parts of dynamic systems is the lifecycle management of various bits of running code.
It is easy to create stuff, but are you cleaning up properly when things disappear or change?
We can order these in difficulty:
- Create something: (easy)
- Delete something: (hard)
- Change something already running: (very hard)
On the surface, this looks easy -- what is the big deal, right?
But we soon realize differently. Have you ever heard of memory/resource leaks and race conditions? Even worse, code that we don't know is still running.
Implementations usually start simple -- no problem.
But the scope grows, the system becomes more dynamic, and we start to scale. Scaling requires concurrency. Concurrency is hard, but when the system changes while running, concurrency gets really hard.
This is the nature of IoT systems -- because they reflect the real world, and the real world is always changing.