erlang code update, possible in C/C++?
Wed Nov 6 00:51:23 CET 2002
On tisdag, nov 5, 2002, at 20:49 Europe/Stockholm, Enric Jaen wrote:
> I am very interested in the Erlang code update
> capability. AFAIK from documents, Erlang uses dynamic
> linking to point processes to the new version of the
> module when they do a global call. The old and new
> versions can run concurrently.
> I am wondering if this same mechanism can be used with
> C/C++ programs, using dynamic libraries. If not, why?
Probably (loading of dynamic libs. is OS dependent) but you'll lose all
the nice OTP support to handle code change properly and consistently -
i.e. when a update is applied on a existing consumer system.
OTP is mostly useful to supply callbacks to different applications and
databases in a well defined order, so simplifying the code change code
needed to be written.
> and therefore, what is the added value than Erlang
> provides and that C/C++ don't have to update code?
The major difference is that each erlang module can be loaded (and
unloaded), not just dynamic libs, this allows you to patch a test
environment (real or simulated) while you are debugging a module
without restarting the environment (which would be needed if the
module/file was compiled statically).
In the case of the AXD301 I used to work on it took about 15 minutes to
restart the simulated environment add to this that there might be need
to recreate certain test parameters and debug traces.
A "l(module_name)." in the erl shell was usually enough to apply such a
> I would appreciate any clue in this issue.
> -Enric Jaen
> Yahoo! Messenger
> Nueva versión: Webcam, voz, y mucho más ¡Gratis!
> Descárgalo ya desde http://messenger.yahoo.es
More information about the erlang-questions