[DGD] Heart beat and alternatives?
Par Winzell
zell at skotos.net
Thu Oct 4 17:48:04 CEST 2001
> In a nutshell, a heart beat is just a call_out() which is
> automatically repeated. DGD does not support heart beats because
> it's trivial to simulate the functionality with the call_out()
> kfun.
I've been trying to figure out recently what a modern mudlib should
support in terms of heartbeat-like functionality. Our system exports
sandboxed LPC to developers; they hook code snippets to events that
take place in the (virtual) physical world -- objects moving around,
doors opening, etc. The sandboxed LPC is very restricted: it can't
perform call_others, or call_outs, so any timing support has to come
from the support code.
My initial thought was that you need
1) do X in Y seconds
2) do X at time Y
3) do X recurringly every Y seconds/hours/days, at time Z
1) of course is just callout, 2) is just a mutated callout, 3) is
general enough to be both 'cron' and heartbeats. I'm worried about
the syntax of 3, though. I'd like an intuitive call structure.
Has anybody else thought about this? Is 3) too general? It would
be nice if one could say "This needs to run every hour, 17 minutes
after the hour". "This needs to run once a year". "This needs to
run every nine seconds."
I think it's not too general. So then what would be a sane API?
Zell
_________________________________________________________________
List config page: http://list.imaginary.com/mailman/listinfo/dgd
More information about the DGD
mailing list