[erlang-questions] OTP Cheatsheet

Theepan vasdeveloper@REDACTED
Sat Sep 26 12:10:00 CEST 2015


All the behaviours in high-level have three abstractions:
1. The Erlang process that is core of the behaviour - We don't have to
worry much about it, as the OTP platform is taking care of it.
2. The API to interact with the process mentioned above - The other Erlang
process use these APIs to interact with the behaviour process.
3. The call back module - When the Erlang process (mentioned in 1 above)
gets messages through APIs (mentioned in 2 above), the functions in this
module will be called back by the Erlang process. How the process should
behave is defined by this module.

What you might want to note is that, most of the time you find mapping
between the APIs mentioned in 2 above, and the predefined callback function
headers mentioned in 3 above.

All the behaviours adhere to the above. The easiest way to learn behaviours
is, take gen_server and understand it thoroughly. Others will be easy.

It is important, before going into the implementation,  to know the role of
each behaviour, and where it is appropriate to use them.

Erlang/OTP documentation has enough information. Also, it is good to have a
look at some open source implementations.

Theepan








On Sat, Sep 26, 2015 at 1:51 PM, Vimal Kumar <vimal7370@REDACTED> wrote:

> Hi all,
>
> Erlang newbie here, learning from the book "Learn You Some Erlang For
> Great Good". Things were superfine until I reached OTP section. Currently
> scratching my head seeing all the behaviours and complexities involved, but
> taking everything slowly in.
>
> I was looking for whether there is any quick cheatsheet available on OTP -
> somesort of quick reference that lists the different OTP behaviours, its
> required functions and return types. Googled, but didn't find any such.
>
> Thank you!
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150926/aefd7d3d/attachment.htm>


More information about the erlang-questions mailing list