[erlang-questions] API design and pgapp
David Welton
davidnwelton@REDACTED
Thu Sep 7 22:40:33 CEST 2017
Hi,
> I don't think it's a productive addition to that epgsql conversation, but I would write only update_stats/1. A Postgres connection is not a trivial thing like an Erlang process. On a default installation you only get a couple hundred of them and you can see some unpleasant surprises if you go over. Therefore, I think it's a mistake to not explicitly track your connections in the code.
You could say the same thing about other resources, like, say, memory.
Or write a system that helps the programmer work at a higher level by
setting up some 'good defaults' and managing the underlying resources.
pgapp is the latter kind of system.
--
David N. Welton
http://www.welton.it/davidw/
http://www.dedasys.com/
More information about the erlang-questions
mailing list