4 ms·
The thing is, you have to test and debug that. Even if I'm working with Common Lisp, I don't necessarily want to go there. Say there are five versions of your
by kazinator 4y ago
The thing is, you have to test and debug that. Even if I'm working with Common Lisp, I don't necessarily want to go there.
Say there are five versions of your image out there, versioned 1 to 5. Users might be doing any of these upgrades:
to
from 1 2 3 4 5
1 X X X X
2 X X X
3 X X
4 X
Assuming nobody does downgrades, we have ten combinations to test.
Anything you do to reduce the testing comes at the cost of inconvenience to the user. You can support only upgrades by one; so someone going from 1 to 5 has to upgrade to 2, 3 and 4. You can cut off upgrade support for old versions; if a 1 user wants 6, they will have to suffer a stop and restart. That all just seems half-assed; you're not doing a perfect job of "no restarts ever", so why bother.
No restart upgrades handle the volatile objects in RAM. Regardless of that, applications have to handle the persistent data formats: like objects written to storage by version 1, 2, 3 or 4, which now have to be processed by 5.
People who understand and deal with with upgrades to persistent data, and protocols, and whatnot, are not going to react kindly if you tell them, "hey, you can add to the complexity and amount of work by hot-loading code, and dealing with upgrading across multiple versions of in-RAM volatile objects, too!".
Threads throw a monkey wrench into the blender also. If the application is multi-threaded, you will have some existing threads executing old versions of functions, after they have been redefined, with threads also calling new versions of functions. An old version of a method might not play nice with the new version of an object and vice versa. You may need a partial stop and restart: the application image as such may be running, but you put some threads into a quiescent state during the upgrade. Someone has to test all that.