|
|
|
|
|
by wefarrell
1243 days ago
|
|
Yeah they mention that in 2 of the 6 points arguing in favor of behaviors: 2. The application programmer writes sequential code, all concurrency is hidden away in the behaviour; 4. Easier for new team members to get started: business logic is sequential, similar structure that they might have seen before elsewhere; |
|
gen_server is useful, but it's not much more than receive in a tail recursive loop and conventions around messages, most specifically about if the sender expects to receive a reply or not. It's not magic, and it's written in clear Erlang that anyone with a week of Erlang fiddling can understand (which kind of is magic; almost everything in OTP is clearly readable)
Concurrency comes from running many processes each with their own message queue.