01 Oct 2013, 09:03
Generic-user-small

Barcaioni Bastien (1 post)

Hi,

I’m intending to make 16.1 example working with supervision, and make it able to respond to multiple call.

If I understood well, to make it able to respond to multiple call, I’d simply have not to register the new pid as an atom, store it somewhere, like a stash, and create a unique identifier for each call.

Note, i havent tried any of this yet. Just asking for guidance :

  • How will supervisor react upon end of call?

Ideally I’d want the Listener to “vanish”. But if it’s supervised, it might get back up ? I still want it able to recover from crashes while the Listener hasn’t finished it’s job.

  • Is it good practice to use Timeout in FSM as “cache” ?

Let’s say I don’t want the Listener to stay aware for more than a few minutes Lets say for example,that a FSM is somewhere behind a webserver, an user begin to use a feature that require multiple steps of work on his part. If for some reason, user leave the page without completing every steps, or stay away for too long, I just want to drop the FSM, user didn’t complete the process.
In other word, so long the FSM is up, the user can interract with it, and when the user doesn’t interract with it anymore(or cleanly finish the process), drop it. Even more simply, is the use of Timeout costly ?

  You must be logged in to comment