Changing Code

Gerd Flaig gerd@REDACTED
Tue Aug 13 13:25:28 CEST 2002

Richard Carlsson <richardc@REDACTED> writes:

> 	- Is it necessary to be able to exchange any single module?
> 	  (E.g., if your application consists of a number of modules,
> 	   do you always replace all these modules anyway?)

I use this feature frequently while in development mode. Sometimes
even on production nodes to hot-fix bugs.

> 	- Could code migration be limited to specific functions, or
> 	  is it necessary to be able to switch to a new version at all
> 	  "remote" calls. (E.g., one could imagine a new declaration
> 	  for specifying only certain functions as code update points.)

As I use generic behaviours almost exclusively, this has not been an
issue anyway.

> 	- Do you always use the OTP release handler or similar to
> 	  do code updates, or do you do it by hand, or with your own
> 	  in-house tools, etc? Do you find it simple as it is today,
> 	  or is code update so difficult that you try to avoid it?

We wrap our releases in Debian packages. I would like to have tight
integration between the OTP release handler and the Debian package
system. Most of the time, though, we just shut down the node while

> 	- How much of a problem are circular module dependencies in
> 	  practice?

Not much of a problem for me, yet.

> 	- Is the flexibility of being able to change any module at any
> 	  time (even in production code) worth more to you than the
> 	  speed of the code?

The speed of the code has not been an issue until now.

> 	- When you make a (remote) call that is expected to switch
> 	  to new code whenever it has been loaded, could you guarantee
> 	  that the call stack is empty at that point, i.e., you will
> 	  not return to the old code, nor to the code that called it?
> 	  (If so, the code purging stage would not have to scan the
> 	  stacks of processes to find out if they must be killed.)
> 	  This pretty much equals saying that code change always starts
> 	  a fresh process, but keeps the old Pid.

I'm not sure. Would it be enough to only make qualified
intra-module-calls when they're tail-calls?

      Goodbyte, Gerd.
Gerd Flaig                     Technik                gerd@REDACTED
Bei Schlund + Partner AG       Erbprinzenstr. 4-12  D-76133 Karlsruhe
 Physics is like sex: sure, it may give some practical results,
 but that's not why we do it. -- Richard Feynman

More information about the erlang-questions mailing list