lfe / blog

LFE News/Updates Blog
6 stars 7 forks source link

Create next post in OTP series: `gen_statem` example #21

Open oubiwann opened 4 years ago

oubiwann commented 4 years ago

Find a good, interesting, or fun example to implement in LFE ...

oubiwann commented 4 years ago

There are a couple in the book "Designing for Scalability with Erlang/OTP" ...

oubiwann commented 4 years ago

Some examples here, but nothing really captured my imagination: https://softwareengineering.stackexchange.com/questions/47806/examples-of-finite-state-machines

oubiwann commented 4 years ago

Hrm ... what about agent-based modeling?

oubiwann commented 4 years ago

Some reading materials for brainstorming:

oubiwann commented 4 years ago

Btw, from @rvirding in a private email:

Don't use gen_fsm, there is a new state machine behaviour, gen_statem, which has taken over. It is better and has some nice new features, like setting state timeouts and being able to postpone the handling of events to another state.

Fun! Didn't know about that one; looking forward to learning it and sharing!

oubiwann commented 4 years ago

Also, this topic should be split into two:

oubiwann commented 4 years ago

Thinking maybe some simplification of insect behaviour as a moderately interesting thing to explore with a state machine ... some papers/chapters that explore this: