[erlang-questions] Why not standard OTP behavior

Roger Lipscombe <>
Thu Apr 30 00:08:39 CEST 2015


I found this slide deck useful for explaining the pros and cons of
using OTP behaviours vs. roll-your-own. Loïc might find it familiar
;-)

http://ninenines.eu/talks/beyond-otp/beyond-otp.html

On 29 April 2015 at 12:50, Loïc Hoguin <> wrote:
> In the case of ranch_conns_sup, that's an optimization.
>
> Before it was a supervisor + gen_server, but the work was kind of duplicated
> (one was using links and the other monitors for the same processes). Now we
> have one process that do both tasks (supervise and limit the number of
> concurrent connections).
>
> On 04/29/2015 02:38 PM, linbo liao wrote:
>>
>> Hi All,
>>
>> When go through some open source code, I find sometimes processes are
>> not standard OTP behavior like gen_server, gen_fsm, gen_event, but
>> designed by internal OTP API.
>>
>> For example, ranch_conns_sup
>> <https://github.com/ninenines/ranch/blob/master/src/ranch_conns_sup.erl>
>> from ranch, riak_core_vnode_proxy
>>
>> <https://github.com/basho/riak_core/blob/develop/src/riak_core_vnode_proxy.erl>
>> from riak_core.
>>
>> May anyone help to point the reason, why they don't use OTP behavior but
>> build by internal API, any drawback for OTP behavior in a certain
>> situation?
>>
>> Thanks,
>> Linbo
>>
>>
>> _______________________________________________
>> erlang-questions mailing list
>> 
>> http://erlang.org/mailman/listinfo/erlang-questions
>>
>
> --
> Loïc Hoguin
> http://ninenines.eu
> _______________________________________________
> erlang-questions mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-questions


More information about the erlang-questions mailing list