[squeak-dev] Environment(s) serving web pages

Wolfgang Eder edw at generalmagic.at
Wed Jun 27 22:40:40 UTC 2012


On 27.06.2012 22:58, Colin Putney wrote:
> Nice! This might also be useful for live updates to a web application.
> Instead of loading code updates abruptly, as we do now, we could load
> the new version of the app into a separate environment. New sessions
> would be directed to the new environment, and existing sessions would
> continue to use the old environment. Once all the sessions expire, the
> old environment gets removed.
>
> Colin

that reminds me,
Erlang has a similar mechanism for handling
code updates, by specifying "switch points"
(I can't remember the correct name) where
a process moves from one version of the code
to the next at controlled execution points
(in the above example, when a new session
is created).

In Erlang, the scheme is more rigid, i.e.
when all processes use the new code,
the old code gets unloaded. IIRC you can only have
2 versions (old and new) and you have to wait
for all processes to switch over before
being able to introduce yet another, newer version
of the code.

I find it interesting that the new version of
the code is able to "see" the old version
if I understand environments correctly
(the old version could export an alias that
the new version can refer to).

Nice possibilities :)
thanks,
Wolfgang


More information about the Squeak-dev mailing list