Hi all,
The Answers to last mail are fine and i get better
results, but now i am trying to create a fult tolerant
porcess set, there is, i create some process (2 at
moment but should be easily extensible to N) and when
a process crash, the other process must recreate it:
Having in mind Popov's sugestions, i use the Browser
resourse by mean of a port (in a stationary way) but i
don't know how to use the Remote resource. An example
is the code bellow:
functor
import Browser Remote
define
F=
functor
import Fault Browser Remote Connection Pickle
export pri:Pri entity:Ent start:Start
define
Pri
S Ent = {NewPort S}
%%
ShowPort={Connection.take {Pickle.load
'/tmp/showticket'}}
proc {Show X}
{Send ShowPort X}
end
%%
proc{Start P}
{Fault.installWatcher P [permFail]
proc{$ _ _}
{Show failure}
{Send Ent rebuild}
{Show rebuildMessageHasBeenSent}
end _}
thread
for X in S do
case X of rebuild then MM in
{Show rebuildArrives}
MM={New Remote.manager init(fork:sh detach:true)}
end
end
end
end
end
try
MM1 P1 MM2 P2
in
MM1= {New Remote.manager init(fork:sh
detach:true)}
P1={MM1 apply(F $)}
P1.pri=F
MM2= {New Remote.manager init(fork:sh
detach:true)}
P2={MM2 apply(F $)}
P2.pri=F
{P1.start P2.entity}
{P2.start P1.entity}
catch X then
{Browser.browse manager#X}
end
end
Supose that {P2.start P1.entity} and MM={New
Remote.manager init(fork:sh detach:true)} (At F
functor) lines are commented, then the program
behavior is:
two process are created and the first one has a
watcher on the second one, when second process crash
all works fine and the browser is displayed.
Now, supose that {P2.start P1.entity} is working, when
some process crash, then the browser is displayed but
in the shell the next error is showed:
%***************** Error: distributed programming
***************
%**
%** dp(conditions:[permFail] entity:_<dist:pxy>
op:wait)
%**--------------------------------------------------------------
I don't know what entity this refers and what is the
attepmted operation because i am not doing this
explicitly.
best regards,
Albert Soletsky.
__________________________________________________
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com
-
Please send submissions to users@mozart-oz.org
and administriva mail to users-request@mozart-oz.org.
The Mozart Oz web site is at http://www.mozart-oz.org/.