[erlang-questions] implementing a heartbeat

Jason Dusek jsnx@REDACTED
Sat May 26 08:28:51 CEST 2007


I'm working on a system that updates a value at set intervals, so I
set up a server (can be queried for data), an 'evolve' function
(advances the state of the system) and a heartbeat. The heartbeat
kicks off the evolve function, waits for a reply and then forwards the
reply to the server at the right time. However, my heartbeat never
lets go of control! Here is the source:

    http://rafb.net/p/OZpMZ113.html

Ideally, I should be able to go into erl and type

  1> c(foo).
  2> S = foo:start(7, 100).
  3> foo:client(S).

which should spit out a few tuples. I appreciate any help the list can
offer on this matter -- I'm just trying Erlang out, doing something
deliberately useless and obtuse to wrap my head around the different
architectural possibilities.

-- 
_jsn



More information about the erlang-questions mailing list