[jdev] XMPP questions

14 views
Skip to first unread message

Ruff, Rob

unread,
Feb 8, 2012, 5:09:29 PM2/8/12
to jd...@jabber.org

Hi,

 

I am new to XMPP and have a few questions.  I have read the book and a number of different websites and am still not sure about a few things. 

 

We are considering using XMPP for chat, conferencing, etc between a number of systems that will not be connected via a reliable network.  The systems may lose connectivity at any time, especially if one is moving.  Since any of the systems can lose connectivity, an XMPP server will run at each one so the systems that are still connected can communicate.

 

I am using Openfire and Spark as well as a bot I created using the gloox c++ library to do some prototyping/testing.

 

-          Is a DNS required to use XMPP, in particular for the server to server connections?  I have played around with using the hosts file and I can’t seem to get that to work. 

-          I have seen references to BOSH for unreliable connections but it usually referred to client-server connections.  Could that be used for server-server connections as well or is there something else you would recommend?

-          Is multicast required?

-          I understand that conferences are hosted at a particular server.  That would mean if that particular server lost connectivity then the conference would be unavailable for the others that are still connected.  Is there any way around this?

 

Thanks in advance!

Rob



CONFIDENTIALITY NOTICE: This email constitutes an electronic communication within the meaning of the Electronic Communications Privacy Act, 18 U.S.C. 2510, and its disclosure is strictly limited to the named recipient(s) intended by the sender of this message. This email, and any attachments, may contain confidential and/or proprietary information of Scientific Research Corporation. If you are not a named recipient, any copying, using, disclosing or distributing to others the information in this email and attachments is STRICTLY PROHIBITED. If you have received this email in error, please notify the sender immediately and permanently delete the email, any attachments, and all copies thereof from any drives or storage media and destroy any printouts or hard copies of the email and attachments.

EXPORT COMPLIANCE NOTICE: This email and any attachments may contain technical data subject to U.S export restrictions under the International Traffic in Arms Regulations (ITAR) or the Export Administration Regulations (EAR). Export or transfer of this technical data and/or related information to any foreign person(s) or entity(ies), either within the U.S. or outside of the U.S., may require advance export authorization by the appropriate U.S. Government agency prior to export or transfer. In addition, technical data may not be exported or transferred to certain countries or specified designated nationals identified by U.S. embargo controls without prior export authorization. By accepting this email and any attachments, all recipients confirm that they understand and will comply with all applicable ITAR, EAR and embargo compliance requirements.

Daniel Dormont

unread,
Feb 9, 2012, 2:47:51 PM2/9/12
to Jabber/XMPP software development list
Well, I'm not the most experienced one here, but I'll tell you what I know.

On Wed, Feb 8, 2012 at 5:09 PM, Ruff, Rob <rr...@scires.com> wrote:

Hi,

 

I am new to XMPP and have a few questions.  I have read the book and a number of different websites and am still not sure about a few things. 

 

We are considering using XMPP for chat, conferencing, etc between a number of systems that will not be connected via a reliable network.  The systems may lose connectivity at any time, especially if one is moving.  Since any of the systems can lose connectivity, an XMPP server will run at each one so the systems that are still connected can communicate.

 

I am using Openfire and Spark as well as a bot I created using the gloox c++ library to do some prototyping/testing.

 

-          Is a DNS required to use XMPP, in particular for the server to server connections?  I have played around with using the hosts file and I can’t seem to get that to work. 

Formally, yes. If you want to interface with outside XMPP providers such as jabber.org or Google, also yes. In practice, no, but there are some conditions you have to meet. Specifically, in order for server A and B to communicate by S2S, both servers must have host entries for themselves and each other, which exactly match the XMPP domain name each is serving.

-          I have seen references to BOSH for unreliable connections but it usually referred to client-server connections.  Could that be used for server-server connections as well or is there something else you would recommend?


To the best of my knowledge there is no BOSH equivalent for S2S.

-          Is multicast required?

No, unless you're using a specific XMPP service that relies on it. 

-          I understand that conferences are hosted at a particular server.  That would mean if that particular server lost connectivity then the conference would be unavailable for the others that are still connected.  Is there any way around this?


To my knowledge, no. The only two servers I've worked with here are Openfire and Ejabberd, so it's possible that some other server like M-Link explicitly supports hot failover and clustering of individual multi-user chats. Ejabberd supports clustering of MUC _domains_, but each individual conference lives on a particular node. If it dies it can be restarted on another node, but in the mean time it's still dead. 
 
dan

Thanks in advance!

Rob



Peter Saint-Andre

unread,
Feb 10, 2012, 12:05:38 AM2/10/12
to Jabber/XMPP software development list
On 2/9/12 12:47 PM, Daniel Dormont wrote:
> Well, I'm not the most experienced one here, but I'll tell you what I know.

And that's much appreciated!

A few additional bits of information inline...

> On Wed, Feb 8, 2012 at 5:09 PM, Ruff, Rob <rr...@scires.com

> <mailto:rr...@scires.com>> wrote:
>
> Hi, ____
>
> __ __


>
> I am new to XMPP and have a few questions. I have read the book and
> a number of different websites and am still not sure about a few

> things. ____
>
> __ __


>
> We are considering using XMPP for chat, conferencing, etc between a
> number of systems that will not be connected via a reliable
> network. The systems may lose connectivity at any time, especially
> if one is moving. Since any of the systems can lose connectivity,
> an XMPP server will run at each one so the systems that are still

> connected can communicate.____
>
> __ __


>
> I am using Openfire and Spark as well as a bot I created using the

> gloox c++ library to do some prototyping/testing.____
>
> __ __
>
> __- __Is a DNS required to use XMPP, in particular for the


> server to server connections? I have played around with using the
> hosts file and I can’t seem to get that to work.
>
> Formally, yes. If you want to interface with outside XMPP providers such

> as jabber.org <http://jabber.org> or Google, also yes. In practice, no,


> but there are some conditions you have to meet. Specifically, in order
> for server A and B to communicate by S2S, both servers must have host
> entries for themselves and each other, which exactly match the XMPP
> domain name each is serving.

The original poster could also run his servers at IP addresses rather
than fully qualified domain names. In that sense, DNS is not required.

>
> ____
>
> __- __I have seen references to BOSH for unreliable


> connections but it usually referred to client-server connections.
> Could that be used for server-server connections as well or is there
> something else you would recommend?
>
>
> To the best of my knowledge there is no BOSH equivalent for S2S.

Actually, BOSH could be used for s2s, but no one does so.

> ____
>
> __- __Is multicast required?


>
> No, unless you're using a specific XMPP service that relies on it.

I'm not sure what the original poster meant by multicast.

> ____
>
> __- __I understand that conferences are hosted at a


> particular server. That would mean if that particular server lost
> connectivity then the conference would be unavailable for the others
> that are still connected. Is there any way around this?
>
>
> To my knowledge, no. The only two servers I've worked with here are
> Openfire and Ejabberd, so it's possible that some other server like
> M-Link explicitly supports hot failover and clustering of individual
> multi-user chats. Ejabberd supports clustering of MUC _domains_, but
> each individual conference lives on a particular node. If it dies it can
> be restarted on another node, but in the mean time it's still dead.

Some folks in the XMPP developer community have been working on
approaches to solving that problem. There are several proposals, but
none of them is solid yet, or implemented (although there is an
experimental implementation of XEP-0289). Expect further progress on
this problem in 2012.

Peter

--
Peter Saint-Andre
https://stpeter.im/


_______________________________________________
JDev mailing list
Info: http://mail.jabber.org/mailman/listinfo/jdev
Unsubscribe: JDev-uns...@jabber.org
_______________________________________________

Waqas Hussain

unread,
Feb 10, 2012, 1:11:53 AM2/10/12
to Jabber/XMPP software development list

From what little you've said, I think what you want is:

1. A distributed set of nodes
2. No central server(s)
3. Nodes can lose connectivity, and possibly change IPs
4. Reliable chat and conferencing between nodes (as reliable as the
network allows at least)

Is that correct? Is a central server completely out of the question?

Regarding your questions..

a) No XMPP spec requires, and no implementation I'm aware of makes use
of IP multicast. Conferencing is based on normal XMPP over TCP.

b) BOSH can be used for S2S, but no one does that. Have a look at
XEP-0198: Stream management, which also supports session resumption.

c) You can get away with not using DNS. Hosts files are not good
enough. They override A records, while XMPP servers try SRV records
first. The Prosody server has a plugin to allow custom SRV records
(http://code.google.com/p/prosody-modules/wiki/mod_srvinjection), and
IIRC ejabberd allowed the same in its config.

d) Conferences distributed across servers.. there are no
implementations yet, though as Peter said, work is being done towards
that. There are servers which support clustering conferences, but I
suspect none of them would handle your unreliable network use-case too
well.

You should take a good look at XEP-0198 session resumption. If your
nodes only temporarily go off the network (e.g., for a few minutes),
XEP-0198 can transparently handle that. You may be able to crank up
server timeouts to allow XEP-0198 based session resumption hours or
days after network failure. This has obvious consequences, like all
XMPP data having to be cached for resending, and servers/clients
having to deal with the flood of data on reconnect after a long delay,
but it gets pretty close to satisfying your requirements.

--
Waqas Hussain

Ruff, Rob

unread,
Feb 10, 2012, 12:33:51 PM2/10/12
to Jabber/XMPP software development list
Thanks for the replies!!

I wanted to respond to the questions:


Waqas Hussain wrote:
>From what little you've said, I think what you want is:
>
>1. A distributed set of nodes

correct

>2. No central server(s)

correct

>3. Nodes can lose connectivity, and possibly change IPs

Yes and no, nodes can lose connectivity but the IPs will not change

>4. Reliable chat and conferencing between nodes (as reliable as the
>network allows at least)

correct

>
>Is that correct? Is a central server completely out of the question?

Yes, a central server is out of the question because there is no one system that will always be accessible by the other systems.

I have another question. If I have two Spark clients, each connected to their own Openfire servers, and I break the network connection between the two servers, there is no indication on either client that they are no longer connected. If I type a text message in one client, it behaves the same as if the servers were still connected and gives no indication of an error. Is this the norm for XMPP clients?

Thanks again,
Rob

CONFIDENTIALITY NOTICE: This email constitutes an electronic communication within the meaning of the Electronic Communications Privacy Act, 18 U.S.C. 2510, and its disclosure is strictly limited to the named recipient(s) intended by the sender of this message. This email, and any attachments, may contain confidential and/or proprietary information of Scientific Research Corporation. If you are not a named recipient, any copying, using, disclosing or distributing to others the information in this email and attachments is STRICTLY PROHIBITED. If you have received this email in error, please notify the sender immediately and permanently delete the email, any attachments, and all copies thereof from any drives or storage media and destroy any printouts or hard copies of the email and attachments.

EXPORT COMPLIANCE NOTICE: This email and any attachments may contain technical data subject to U.S export restrictions under the International Traffic in Arms Regulations (ITAR) or the Export Administration Regulations (EAR). Export or transfer of this technical data and/or related information to any foreign person(s) or entity(ies), either within the U.S. or outside of the U.S., may require advance export authorization by the appropriate U.S. Government agency prior to export or transfer. In addition, technical data may not be exported or transferred to certain countries or specified designated nationals identified by U.S. embargo controls without prior export authorization. By accepting this email and any attachments, all recipients confirm that they understand and will comply with all applicable ITAR, EAR and embargo compliance requirements.

_______________________________________________

Dave Cridland

unread,
Feb 10, 2012, 12:36:36 PM2/10/12
to Jabber/XMPP software development list
On Fri Feb 10 17:33:51 2012, Ruff, Rob wrote:
> I have another question. If I have two Spark clients, each
> connected to their own Openfire servers, and I break the network
> connection between the two servers, there is no indication on
> either client that they are no longer connected. If I type a text
> message in one client, it behaves the same as if the servers were
> still connected and gives no indication of an error. Is this the
> norm for XMPP clients?

Yes, which is why XEP-0310 has been proposed - we need it for the
XEP-0289 case where half the participants in a split chatroom aren't
*quite* there anymore.

Of course, you do need clients which are aware of the annotations.

Dave.
--
Dave Cridland - mailto:da...@cridland.net - xmpp:d...@dave.cridland.net
- acap://acap.dave.cridland.net/byowner/user/dwd/bookmarks/
- http://dave.cridland.net/
Infotrope Polymer - ACAP, IMAP, ESMTP, and Lemonade

Kevin Smith

unread,
Feb 10, 2012, 12:37:00 PM2/10/12
to Jabber/XMPP software development list
On Fri, Feb 10, 2012 at 5:33 PM, Ruff, Rob <rr...@scires.com> wrote:
>>4. Reliable chat and conferencing between nodes (as reliable as the
>>network allows at least)
> Yes, a central server is out of the question because there is no one system that will always be accessible by the other systems.

For this you want FMUC (XEP-0289), I think.

> I have another question.  If I have two Spark clients, each connected to their own Openfire servers, and I break the network connection between the two servers, there is no indication on either client that they are no longer connected.  If I type a text message in one client, it behaves the same as if the servers were still connected and gives no indication of an error.  Is this the norm for XMPP clients?

For this you want Presence State Annotations (XEP-0310), I think - I
wrote it to address exactly your situation. It's brand new, so
as-of-yet unsupported.

/K

Matthew Wild

unread,
Feb 10, 2012, 12:40:39 PM2/10/12
to Jabber/XMPP software development list
On 10 February 2012 18:33, Ruff, Rob <rr...@scires.com> wrote:
> Thanks for the replies!!

> I have another question.  If I have two Spark clients, each connected to their own Openfire servers, and I break the network connection between the two servers, there is no indication on either client that they are no longer connected.  If I type a text message in one client, it behaves the same as if the servers were still connected and gives no indication of an error.  Is this the norm for XMPP clients?

There should be no error on simply disconnecting the link between the
two servers. If you send a message though, the sending server should
try to re-establish the connection to the other server. If this fails
it should bounce your message with an error, and ideally your client
displays this. I don't use Spark or Openfire so can't comment on their
behaviour in particular though.

Regards,
Matthew

Ruff, Rob

unread,
Feb 14, 2012, 4:11:56 PM2/14/12
to Jabber/XMPP software development list
Peter Saint-Andre wrote:
>>
>> __- __Is a DNS required to use XMPP, in particular for the
>> server to server connections? I have played around with using the
>> hosts file and I can’t seem to get that to work.
>>
>> Formally, yes. If you want to interface with outside XMPP providers such
>> as jabber.org <http://jabber.org> or Google, also yes. In practice, no,
>> but there are some conditions you have to meet. Specifically, in order
>> for server A and B to communicate by S2S, both servers must have host
>> entries for themselves and each other, which exactly match the XMPP
>> domain name each is serving.
>
>The original poster could also run his servers at IP addresses rather
>than fully qualified domain names. In that sense, DNS is not required.


How would I go about doing this? Is this part of the server configuration?


Thanks,
Rob

CONFIDENTIALITY NOTICE: This email constitutes an electronic communication within the meaning of the Electronic Communications Privacy Act, 18 U.S.C. 2510, and its disclosure is strictly limited to the named recipient(s) intended by the sender of this message. This email, and any attachments, may contain confidential and/or proprietary information of Scientific Research Corporation. If you are not a named recipient, any copying, using, disclosing or distributing to others the information in this email and attachments is STRICTLY PROHIBITED. If you have received this email in error, please notify the sender immediately and permanently delete the email, any attachments, and all copies thereof from any drives or storage media and destroy any printouts or hard copies of the email and attachments.

EXPORT COMPLIANCE NOTICE: This email and any attachments may contain technical data subject to U.S export restrictions under the International Traffic in Arms Regulations (ITAR) or the Export Administration Regulations (EAR). Export or transfer of this technical data and/or related information to any foreign person(s) or entity(ies), either within the U.S. or outside of the U.S., may require advance export authorization by the appropriate U.S. Government agency prior to export or transfer. In addition, technical data may not be exported or transferred to certain countries or specified designated nationals identified by U.S. embargo controls without prior export authorization. By accepting this email and any attachments, all recipients confirm that they understand and will comply with all applicable ITAR, EAR and embargo compliance requirements.

Peter Saint-Andre

unread,
Feb 14, 2012, 4:16:19 PM2/14/12
to Jabber/XMPP software development list
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 2/14/12 2:11 PM, Ruff, Rob wrote:
> Peter Saint-Andre wrote:
>>>
>>> __- __Is a DNS required to use XMPP, in particular
>>> for the server to server connections? I have played around
>>> with using the hosts file and I can’t seem to get that to
>>> work.
>>>
>>> Formally, yes. If you want to interface with outside XMPP
>>> providers such as jabber.org <http://jabber.org> or Google,
>>> also yes. In practice, no, but there are some conditions you
>>> have to meet. Specifically, in order for server A and B to
>>> communicate by S2S, both servers must have host entries for
>>> themselves and each other, which exactly match the XMPP domain
>>> name each is serving.
>>
>> The original poster could also run his servers at IP addresses
>> rather than fully qualified domain names. In that sense, DNS is
>> not required.
>
>
> How would I go about doing this? Is this part of the server
> configuration?

Just configure your server so that its hostname is an IP address, not
a fully qualified domain name. Most implementations probably let you
do that.

> CONFIDENTIALITY NOTICE:

Please do realize that this list is publicly archived, so notices of
that kind are inappropriate. :)

Peter

- --
Peter Saint-Andre
https://stpeter.im/

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk86zyIACgkQNL8k5A2w/vzhzQCg1Kdn9gdh4lJHZvExr0bQTK7u
xUcAn3MXz1jpO50zznBNr6oOUQB6Q3rt
=ohX8
-----END PGP SIGNATURE-----

Reply all
Reply to author
Forward
0 new messages