Module fd_hbs

Heartbeat server (HBS) for fd.erl.

Copyright © 2010-2015 Zuse Institute Berlin

Version: $Id$

Behaviours: gen_component.

Authors: Florian Schintke (schintke@zib.de).

Description

Heartbeat server (HBS) for fd.erl. Instatiated per pair of Erlang nodes/VMs. Sends heartbeats (symmetrically), and is proxy for local / remote subscriptions on Pid granularity. Uses erlang:monitor/2 to watch local Pids and forwards crash notification, when a watched Pid finishes.

Data Types

erlang_timestamp()

erlang_timestamp() = 
    {MegaSecs :: non_neg_integer(),
     Secs :: 0..999999,
     MicroSecs :: 0..999999}

rempid()

rempid() = 
    {comm:mypid(),
     non_neg_integer(),
     erlang_timestamp(),
     boolean()}

state()

state() = 
    {comm:mypid(),
     [rempid()],
     erlang_timestamp(),
     erlang_timestamp(),
     LocalSubscriberTab :: pdb:tableid(),
     MonitorTab :: pdb:tableid()}

Function Index

check_config/0Checks existence and validity of config parameters for this module.
init/1
on/2
start_gen_component/5
start_link/2spawns a fd_hbs instance.

Function Details

start_gen_component/5

start_gen_component(Module :: module(),
                    Handler :: gen_component:handler(),
                    Args :: term(),
                    Options :: [gen_component:option()],
                    Self :: pid()) ->
                       no_return() | ok

start_link/2

start_link(ServiceGroup :: pid_groups:groupname(),
           RemotePid :: comm:mypid()) ->
              {ok, pid()}

spawns a fd_hbs instance

init/1

init(RemotePid :: comm:mypid()) -> state()

on/2

on(Msg :: comm:message(), State :: state()) -> state() | kill

check_config/0

check_config() -> boolean()

Checks existence and validity of config parameters for this module.


Generated by EDoc, Feb 29 2016, 16:12:19.