Hacker News new | past | comments | ask | show | jobs | submit login

Stronger: If you are using Erlang for anything real and you aren't using OTP you are almost certainly doing it wrong.



Good 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.


From 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


> 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.


You can use Poolboy [https://github.com/devinus/poolboy] for pooling gen_server's.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: