[erlang-questions] appup: How to handle processes that need no immediate upgrade?

Oliver Korpilla <>
Wed Dec 28 16:52:45 CET 2016


Hello.
 
This may seem a very specific and weird question, but it would help me understand OTP code upgrades so much better!
 
I have two kinds of processes in my system:
* Permanent workers and supervisors that live on and on.
* Dynamic/transient workers that are created per initial request, handle a limited messaging scenario covering a few exchanges, and "die."
 
I would be perfectly happy if the dynamic workers did not participate in the hot code upgrade since they could simply run to completion and die. I would however want to have new ones be started with the new version of their respective function or callback modules.
 
Is that possible or even desirable?
 
I can see how this would not work if I have to transform my DB. In that case I would need the new version of the module to call only into the new version of the DB. (But as long as I only add fields, neither rename nor delete any, even the old code could work to satisfaction, I guess?)
 
What happens if I supply a new version of a module for transient workers without a "load_module" in the appup file?
 
Thank you and regards,
Oliver


More information about the erlang-questions mailing list