(offline component/server support) Re: [JDEV] Using jabber as a central server for an Intranet

Jeremie jeremie at jabber.org
Mon Jan 7 06:47:57 CST 2002

Your lucky day :)

I've been wanting to support this for quite some time, and got a little
ambitions in the wee hours of the morning.  I just checked it into cvs and
it'll be in 1.4.2 as well.  

It's pretty simple at this point, any <accept>...</accept> block (allowing
remote components/servers to link up to a parent) now supports an
<offline/> flag.  This means that when there is nothing connected, and the
packets go through their normal short timeout (configured with
<timeout>seconds</timeout>) waiting for a connection, they are then sent
through an offline filter which stores all message and presence
subscriptions in xdb.  When the socket is reestablished, any waiting
offline packets are flushed to it first.  

This should work fine for the situation described.  It would also enable
someone to run a server on a dialup or transient connection if they had
the offline-ip map to a suitable permanent host willing to store the
offline data (it might not be to hard to even build a service that does
this automatically, such as *.public.jabber.org or such).

Of course, the next logical problem is that you don't want to allow full
internal-server component access (to logging, xdb, route packets, etc)
just to store offline messages for another server.  So I also added a
<restrict/> flag to the accept block.  This does two things, requires that
every packet be only valid message/presence/iq's, and second it enforces
that the sending from="" jid is valid for that service.  Essentialy, it
makes the accept act like a hard-wired s2s connection.

Enjoy :)


PS: sorry about the hiatus on finishing up 1.4.2, it's just a few more
misc little things to clean up and then another quick test build,
hopefully this week.

On Fri, 4 Jan 2002, Ritu Khetan wrote:

> Thanks for all the info friends.
> Regards,
> Ritu
> Quoting DJ Adams <dj.adams at pobox.com>:
> > On Thu, Jan 03, 2002 at 11:06:51AM +0530, Ritu Khetan wrote:
> > > Hi Dj,
> > >
> > >   You are certainly missing the point here.Let me explain it again:
> > >
> > >   I want to have a central jabber server[exposed to the Internet] which
> > would take care of
> > > offline messages,etc for other locations which are offline, as I had
> > mentioned earlier,
> > > these servers do not have dedicated connections, so they might be
> > available online off
> > > and on.THis central server would therefore forward messages to a
> > particular location
> > > whenever it is online.
> > > So, in short, I dont want any of the locations to interact directly, but
> > to send messages via
> >
> > Ah, ok, I get you now. I thought you meant that all the
> > servers were on the same physical internal network. If
> > they\'re on different transient connections, there\'s nothing
> > out of the box on the open source server (there may be
> > something in the Jabber Inc version, I dunno) that will
> > enable you to use a Jabber server as an intermediate
> > \'hop\' and have it retry (like email). (It\'s a different story
> > if the different locations are just client connections, of
> > course). Then again, there\'s nothing stopping you writing
> > a component to do this, sort of a \'delivery\' component...
> >
> > dj
> > _______________________________________________
> > jdev mailing list
> > jdev at jabber.org
> > http://mailman.jabber.org/listinfo/jdev
> > 
> _______________________________________________
> jdev mailing list
> jdev at jabber.org
> http://mailman.jabber.org/listinfo/jdev

More information about the JDev mailing list