anchor.diff:      start(?DEFAULT_N).
   
   start(N) ->
  -    gen_server:start(?STARTSPEC, ?MODULE, #jsrv{n=N}, []).
  +    gen_server:start(?STARTSPEC, ?MODULE, #ej{n=N}, []).
   
   start(N,Bindir) ->
  -    gen_server:start(?STARTSPEC, ?MODULE, #jsrv{n=N,bindir=Bindir}, []).
  +    gen_server:start(?STARTSPEC, ?MODULE, #ej{n=N,bindir=Bindir}, []).
   
   start_link() ->
       start_link(?DEFAULT_N). 
       
   start_link(N) ->
  -    gen_server:start_link(?STARTSPEC, ?MODULE, #jsrv{n=N}, []).
  +    gen_server:start_link(?STARTSPEC, ?MODULE, #ej{n=N}, []).
   
   start_link(N,Bindir) ->
  -    gen_server:start_link(?STARTSPEC, ?MODULE, #jsrv{n=N,bindir=Bindir}, []).
  +    gen_server:start_link(?STARTSPEC, ?MODULE, #ej{n=N,bindir=Bindir}, []).
   
   stop() ->
       gen_server:cast(?SRVNAME, {'STOP'}).
  
positive.code:     Cmd  = Bindir ++ "/" ++ ?JNODEBIN ++ " " ++ Args ++ " &",
      log:info(self(), "open port to org.ister.ej.Node: ~p", [Cmd]),
      Port = erlang:open_port({spawn, Cmd},[]),
      log:info(self(), "port: ~p", [Port]).
  
  run_handshake(Peer) ->
      send_peer(Peer, Ref=get_ref(), ?TAG_NODE, [?EJMSGPART(call,handshake)]),
      receive
          {From,Ref,{?TAG_OK,[?EJMSGPART(call,handshake)]}} -> 
              log:info(self(), "got handshake from: ~p", [From]),
              erlang:link(From),
              {ok,From}
      after
  
negative.code:     {ok, S}.
  
  
  %% ------ PRIVATE -----
  
  send_peer(Peer,Ref,Tag,Msg) ->
      log:debug(self(), "send_peer ~w: ~w", [Peer,?EJMSG(Ref,Tag,Msg)]),
      Peer ! ?EJMSG(Ref,Tag,Msg).
  
  start_worker(S) ->
      gen_server:start(?MODULE, S#ej{worker=yes}, []).
  
  initialize(S) ->
      process_flag(trap_exit, true),
      {ok,Cwd} = file:get_cwd(),
      timer:start(),
      Bindir = 
          if 
              S#ej.bindir =:= ?BINDIR -> Cwd;
              true                      -> S#ej.bindir
          end,
      S2 = S#ej{peer=handshake(Bindir)},
      Workers =
          lists:foldl(fun(_I,Acc) -> 
                              case start_worker(S2) of
                                  {ok,Pid} -> [Pid|Acc];
                                  _Any     -> Acc
                              end
                      end, [], lists:seq(1,S#ej.n)),
      S2#ej{workers=Workers,bindir=Bindir}.
  
  handshake(Bindir) ->
      {ok, Hostname} = inet:gethostname(),
  