It actually shouldn't be that hard (famous last words).  I hadn't thought
of Zookeeper, but I would assume any distributed storage with some
aggressive caching would do quite well.

I noticed that there's the OfflineStorageProvider.  What exactly is that
used for?  I'm assuming it's for XEP-016, storing messages while the user
is signed off.  Would that be affected at all by attempting this?

On Thu, Oct 11, 2012 at 8:30 AM, Bernd Fondermann <
[email protected]> wrote:

> On Thu, Oct 11, 2012 at 7:28 AM, Patrick Twohig <[email protected]> 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!
>
>    Bernd
>

Reply via email to