anchor.diff:  -spec subscribe(comm:mypid() | [comm:mypid()], cookie()) -> ok.
   subscribe([], _Cookie)         -> ok;
   subscribe(GlobalPids, Cookie) when is_list(GlobalPids) ->
  +    FD = my_fd_pid(),
       _ = [begin
  -             HBPid = get_hbs(Pid),
  -             comm:send_local(HBPid, {add_subscriber, self(), Pid, Cookie})
  +             comm:send_local(FD, {add_subscriber_via_fd, self(), Pid, Cookie})
            end
            || Pid <- GlobalPids],
       ok;
  
positive.code: -spec init([]) -> state().
  init([]) ->
      % local heartbeat processes
      _ = ets:new(fd_hbs, [set, protected, named_table]),
      ok.
  
  %% @private
  -spec on(comm:message(), state()) -> state().
  on({create_hbs, Pid, ReplyTo}, State) ->
      NewHBS = start_and_register_hbs(Pid),
      comm:send_local(ReplyTo, {create_hbs_reply, NewHBS}),
      State;
  
  on({hbs_finished, RemoteWatchedPid}, State) ->
      ets:delete(fd_hbs, comm:get(fd, RemoteWatchedPid)),
      State;
  
  on({subscribe_heartbeats, Subscriber, TargetPid}, State) ->
      %% we establish the back-direction here, so we subscribe to the
      %% subscriber and add the TargetPid to the local monitoring.
      ?TRACE("FD: subscribe_heartbeats~n", []),
      HBPid =
          case ets:lookup(fd_hbs, comm:get(fd, Subscriber)) of
              [] -> % synchronously create new hb process
                  start_and_register_hbs(Subscriber);
              [Res] -> element(2, Res)
          end,
      comm:send_local(HBPid, {add_watching_of, TargetPid}),
      comm:send(Subscriber, {update_remote_hbs_to, comm:make_global(HBPid)}, ?SEND_OPTIONS),
      State;
  
negative.code:         PID -> PID
      end.
  
  %% @doc start a new hbs process inside the fd process context (ets owner)
  %%      precond: FDPid points to the fd process at the target node
  -spec start_and_register_hbs(FDPid::comm:mypid()) -> pid().
  start_and_register_hbs(FDPid) ->
      {ok, NewHBS} = fd_hbs:start_link(pid_groups:my_groupname(), FDPid),
      pdb:set({FDPid, NewHBS}, fd_hbs),
      NewHBS.
  
  -spec forward_to_hbs(comm:mypid(), comm:message()) -> ok.
  forward_to_hbs(Pid, Msg) ->
      FDPid = comm:get(fd, Pid),
      HBSPid = case pdb:get(FDPid, fd_hbs) of
                   undefined -> % synchronously create new hb process
                       start_and_register_hbs(FDPid);
                   Entry -> element(2, Entry)
               end,
      comm:send_local(HBSPid, Msg).
  