Hi, On 30 March 2011 16:20, Sonny Piers <[email protected]> wrote: > Hi, > > Is there any particular reason for having no mechanism for discovering if an > XMPP server as a BOSH service available and started? >
Actually there is a way to discover BOSH services for a domain: http://xmpp.org/extensions/xep-0156.html For reasons described below though, this is rarely actually set up by server admins. > As a web client user I would prefer the client to use the BOSH service > available on my XMPP server. > Unfortunately the above XEP is of limited use in a web client (that said, it could be made to work in a smart web client with some server-side code). The Javascript environment in a web browser does not have access to generic DNS lookups, and in most deployed browsers it can't even make a request to any site other than the one the script was downloaded from. > As a web client developer/administrator I would prefer users being able to > use their own BOSH service because I don't want mine being overloaded. > One way to implement this would be with some server-side code that looks in DNS on behalf of the web client for the user's server's BOSH URL. If one exists, it hands that to the web client. The web client then tries to use this URL - it may fail if the user doesn't have a browser with cross-domain support, or if the remote server also doesn't support cross-domain requests. If it fails it could fall back to your BOSH service. > It seems BOSH has been designed to be used as a "middleware" but I would > prefer it to be seen as a new connection method. > I guess it's the way Ejabberd and Prosody see it since they don't allow > external account to connect on their BOSH service. > Sure, though typically even with the built-in server support it's generally the server owner that configures BOSH so a web client on *their* site can use it. Regards, Matthew
