4 ms·
I'm very happy to see more OTP tutorials as of lately. I believe OTP can be one of the most powerful tools in an Erlanger's arsenal.
by plainOldText 14y ago
I'm very happy to see more OTP tutorials as of lately. I believe OTP can be one of the most powerful tools in an Erlanger's arsenal.
- jerf 14y agoStronger: If you are using Erlang for anything real and you aren't using OTP you are almost certainly doing it wrong.
- spfoos 14y agoGood point. About the only thing I've found is the lack of pooling gen_server's built-in and limitations of using atoms for process registration as things I have design a solution for in OTP. Otherwise, architecturally, I'm amazed at how much ground is already designed in OTP.
- omarkj_ 14y agoFrom R15B01 you can actually use "plugins" for process registering using the {via, Mod, Key} syntax. Gproc supports this and using it you can do stuff like: gen_server:start_link({via, gproc, {Your, "very", <<"complex">>, key}, [...]) you can also roll your own. Docs: http://www.erlang.org/doc/man/gen_server.html#start_link-3 http://www.erlang.org/doc/man/gen_server.html#start_link-3
- devinus 14y agoYou can use Poolboy [https://github.com/devinus/poolboy https://github.com/devinus/poolboy] for pooling gen_server's.
- rdtsc 14y ago> I'm amazed at how much ground is already designed in OTP. It is really like finding hidden treasure. And it used to actually be pretty hidden. There was no official book out there. Just had to dig through docs. There is OTP in Action now and I am glad to see others. For example I had know idea about the existence of the distributed application controller, found out about it from a Learn You Some Erlang book.
- rudiger 14y agoOTP isn't just powerful, it's essential. You need to think in terms of what OTP provides you to program in Erlang effectively.
- martinjlogan 14y agoOTP is more than just a framework it is really an important part of the language itself. Parts of OTP like proc_lib are built right into the VM among other close ties. This is why we focus our ErlangCamps 70% on OTP constructs and we wrote the book "Erlang and OTP in Action" and not just an Erlang book. We believe that an Erlang book would really only be describing half the language. When I say Erlang what I really mean is Erlang/OTP.