[ejabberd] Communicate with other modules

郎咸武 langxianzhe at gmail.com
Tue Jan 31 12:28:52 MSK 2012


hi, why not using riak  in ejabberd. I want using. who can give some idea
to me. thanks

2012/1/30 Michael Weibel <michael.weibel+xmpp at gmail.com>

> Hi Steve,
>
> I managed to get it working by registering the shared resource as a
> globally registered gen_server.
> But I'll take a look on the gen_fsm which I don't know yet (as I'm still
> learning erlang).
>
> Thanks.
> Michael
>
> Am 30.01.2012 um 10:11 schrieb Stefan Strigler:
>
> > I'm not sure whether gen_server is the right choice here. Typically your
> scenario is what's called keeping guard of a shared resource (the link to
> the DB). You'd naively implement this by spawning a process which waits for
> messages of the other modules to fulfill queries on their behalf and
> synchronously or asynchronously send back replies to those other "modules"
> (which are running processes itself in fact). This whole thing can be
> formalized by using the gen_fsm pattern which is the general approach
> ejabberd uses for all of its architecture. By using a supervisor for this
> FSM you can make sure to keep such a process up and running in case of
> failures (which would otherwise be fatal to the overall system).
> >
> > Greets, Steve
> >
> > ejabberd mailing list
> > ejabberd at jabber.ru
> > http://lists.jabber.ru/mailman/listinfo/ejabberd
>
>
>
> _______________________________________________
> ejabberd mailing list
> ejabberd at jabber.ru
> http://lists.jabber.ru/mailman/listinfo/ejabberd
>
>


-- 
只为成功找方法,不为失败找理由
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.jabber.ru/pipermail/ejabberd/attachments/20120131/d1aa1148/attachment.html>


More information about the ejabberd mailing list