[erlang-questions] Avoiding a bottleneck (nitrogen+yaws, app logic, couchbeam+couchdb)

Vasilij Savin <>
Mon Dec 14 01:24:38 CET 2009


Greetings,

I can tell you about the solution we used in similar situation. It does not
mean it is optimal, but it was the best we came up with.

Each gen_server call to db interface will generate a separate handler thread
that will work with couchDB directly. You will need to pass both PID and
NodeID though. Then your client will have to wait for message from that
server thread using standard messaging or if it is gen_server itself - using
handle_info.

This way interface between DB and frontend hopefully will not be bottleneck,
or at least should scale as each request will be handled by separate thread.

I would like to ask others to give opinion on this solution.

Regards,
Vasilij Savin


More information about the erlang-questions mailing list