[erlang-questions] Difference between gen_server and gen_fsm

Jack Orenstein jao@REDACTED
Thu Oct 11 04:00:02 CEST 2007


I'm going through the OTP design principles book and think that I am  
missing the point of gen_fsm. The difference between gen_fsm and  
gen_server seems to be a small syntactic one. Instead of handle_call  
handling each kind of request, there is a function per FSM state. Not  
having used gen_fsm yet, it seems that gen_fsm would lead to cleaner  
code. But the two behaviors are so similar, I feel that I am either  
missing the point of gen_fsm, or completely missing some aspect of  
its behavior. Can someone please explain the distinction?

Jack Orenstein




More information about the erlang-questions mailing list