Pooler is a generic process pooling OTP application. It was originally designed as a connection pool for Riak and was later repurposed to pool Postgresql connections in Opscode's Hosted Chef web service.
This is the story of the design evolution of pooler and how it helped me understand OTP. The primitives for process linking in Erlang make building an exclusive access pool easy. The task of composing those primitives in a way that follows the OTP design principles is less straight forward for the beginner.
In this talk I'll describe the journey from simple gen_server to
complete OTP application and highlight some lessons learned when running the application under load and integrating it into OTP
releases.