[erlang-questions] tcp data in a gen_fsm
Sun Nov 29 16:27:02 CET 2015
# Frans Schneider 2015-11-29:
> But what about style? Would you consider a solution as you describe
> good style?
Doesn't look good to me.
Firstly it fails to solve the real problem, which was poor functional
breakdown of your protocol stack (one process ended up doing too much
Moreover, it does so at the cost of having to deal with every incoming
event twice; introducing message passing overhead without any real gain;
risking reordering of incoming events with respect to other internally
originated events and finally subjecting actual handling of incoming
events to arbitrary latency hit (self-posted message goes at the end
of your mailbox -- who knows what's pending there already).
And the more load (= higher event frequency) you're handling the more
serious will all these will get.
More information about the erlang-questions