mina-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bernd Fondermann <bernd.fonderm...@gmail.com>
Subject Re: Running Vysper in a distributed environment.
Date Thu, 11 Oct 2012 15:30:03 GMT
On Thu, Oct 11, 2012 at 7:28 AM, Patrick Twohig <p-twohig@ieee.org> wrote:
> I was curious if there was any "out of the box" support to run Vysper in a
> distributed mode.  From the looks of the code, I didn't think so, but I'm
> not 100% sure.  If I were to hack the internals of the server to support
> this where would be a good place to start?  From looking over the code, I
> see that there's a few different places worth looking (Specifically
> StazaRelayBroker).
> Specifically I noticed that there's StanzaRelayBroker which uses some logic
> to determine whether or not a stanza should be delivered to a local
> session, or to another XMPP server.  Unless, of course, there is some logic
> I'm not understanding properly it appears that out of the box Vysper will
> only operate as a single node.  Is this correct?
> I suspect if it were possible to cluster the server (and it's already not
> supported), we'd need to know the actual IP of the other node to which that
> user is connected as the normal operation just will use the external stanza
> relay to deliver the stanza to the actual node the user is on.  The
> presence of each user could be stored in something like Terracotta and then
> add an intermediate relay which would deliver the stanza to the actual node
> in the cluster.  Has this been tried before?

Interesting question.
No, clustering a single XMPP domain over multiple Vysper instances is
not supported.
And it's a little bit harder to do than webserver clustering.
Propagation of presence info and multi-user chat is hard. You'd need
to put Vysper's ResourceRegistry (the central repository of online
users and their presences) into a Zookeeper cluster (or Terracotta or
whatever is suitable here), so every Vysper instance can determine
where to forward stanzas to. Note that every user can have multiple
concurrent sessions (desktop, smartphone etc.)!

And you are right, stanza relay would not only have to differentiate
between internal (same XMPP domain) and external (other XMPP domain)
delivery, but also between 'local remote' (same XMPP domain, other
Vysper instance) delivery.

Please keep the list updated about your progress!


View raw message