[erlang-questions] Large-scale Erlang in practice
Mihai Balea
mihai@REDACTED
Tue Feb 7 12:27:22 CET 2012
On Feb 6, 2012, at 2:38 PM, Tim Watson wrote:
> On 6 February 2012 19:24, Jon Watte <jwatte@REDACTED> wrote:
> That is interesting -- it might make it worth it to upgrade to R14.
>
> Also, we found a module called "gen_server2" that works around this
> problem by draining the message queue before calling any callback, and
> then dispatching messages based on this list of drained messages. Does
> anyone have experience with this module?
>
>
> It is part of rabbitmq, which I'm guessing it's reasonable to call *fairly stable and production worthy* lol. I keep a copy as a standalone OTP library application on github, which I update/synchronise periodically with updates from the rabbit hg/git repository. I haven't refreshed it in a while, as we're largely >= R14 now, but I find this approach (of bundling it as a standalone library app) works nicely for making it available across projects, though I'm less reliant on it now as I'm not using the extra features it provides in addition to message queue draining.
I wish there was an "official" standalone version of gen_server2. Rabbitmq includes it, the Erlang rabbitmq client includes it as well, riak_core too plus a variety of individuals like Tim have created standalone versions based on one of the above. If one attempts to combine, say, riak_core with the rabbitmq erlang client, frustration ensues.
Mihai
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20120207/79d15f49/attachment.htm>
More information about the erlang-questions
mailing list