[erlang-questions] Best practices in gen_fsm usage

Max Lapshin max.lapshin@REDACTED
Wed Dec 7 18:04:00 CET 2011


On Wed, Dec 7, 2011 at 6:50 PM, Adam Lindberg
<adam.lindberg@REDACTED> wrote:

>
> What exactly is the use case for being able to contact a process that implements either gen_server or gen_fsm via a standard API? I've never come across a use case where processes of different "types" needed to be mixed. If you really, really have to have that, you could implement a common interface via the handle_info/2 callbacks.

You haven't met. I have.

>
> - Either your process runs code that is based on gen_fsm, then you use a wrapper API that converts calls to corresponding gen_fsm calls (just as Thomas suggested).
>

What for?

I have never ever seen any _production_ code, which is better with
gen_fsm. Thanks to Fred for study examples, but they are study
examples.

Ulf told something about SDL, but I really don't know what is SDL.

I beleive that there may be situation, when gen_fsm is convenient. But
I ask only to show example of such code.



More information about the erlang-questions mailing list