UNVEIL STAYING ALIVE liveness via a file lock
stops cleanly,
or crashes
yes
no
no
yes
noticed on the next check
start an agent
running
takes one turn per messageholds a file lock the whole time
the operating system releases the lock
— a dead agent can't hold one,so being alive can't be faked
the reaper
checks each agent's lock, on a timer
is the lock still held?
alive — leave it running
it's gone — any messages still waiting in its queue?
clean the agent up
restart it, so nothing is stranded
UNVEIL STAYING ALIVE liveness via a file lock
stops cleanly,
or crashes
yes
no
no
yes
noticed on the next check
start an agent
running
takes one turn per messageholds a file lock the whole time
the operating system releases the lock
— a dead agent can't hold one,so being alive can't be faked
the reaper
checks each agent's lock, on a timer
is the lock still held?
alive — leave it running
it's gone — any messages still waiting in its queue?
clean the agent up
restart it, so nothing is stranded