[jdev] XMPP "APIs"

Waqas Hussain waqas20 at gmail.com
Sat Jan 12 17:07:02 UTC 2013

On Sat, Jan 12, 2013 at 3:01 PM, Justin Karneges <justin at affinix.com> wrote:
> Hi people,
> The web service API world seems to be all about HTTP, but I'm hoping to show
> that XMPP can be useful here too. For Fanout.io, I've made it so that the
> entire functionality is available via HTTP *and* XMPP. This means that for
> every REST endpoint there is an equivalent XMPP ad-hoc command. Additionally,
> there is a chat bot that you can interact with using an IM client, which
> supports much of the functionality as well.
> One nice aspect is that auth is a breeze. You whitelist a JID and you're done.
> No futzing with per-call auth tokens like with the REST API.
> This has actually been in place some months. Can't remember if I mentioned it
> at the summit. But I finally wrote about it now:
>   http://blog.fanout.io/2013/01/12/using-the-api-via-xmpp/
> Is anyone else doing this sort of thing?
> Justin

Hey Justin,

We (the Prosody team) are quite interested in APIs.

Prosody used to expose an experimental XML-RPC based API (both HTTP
and XMPP) some versions back, but we removed it mainly because it
wasn't designed well, and required too much boilerplate for too little

Prosody 0.9 includes a shiny new HTTP stack which makes exposing
functionality over HTTP extremely easy. Exposing ad-hoc commands
(among other things) is something I have planned. It would be a fairly
simple Prosody plugin.

Another thing we have discussed in the past is exposing Prosody APIs
(our internal public APIs, used by plugins) using something like
HTTP+JSON or XML-RPC or even SOAP. The ability to fully orchestrate,
manipulate, script a server using the language of your choice would be
fairly interesting and powerful. SOAP isn't pretty, but it does have
the nice property of being supported by various languages and IDEs. In
some IDEs you can add the HTTP SOAP end-point as a library, and write
code as if it was a local library, including getting code completion,
etc. Such a thing would be a non-trivial amount of work, but
interesting nonetheless.

Anyway, that was just a little brain dump. Thanks for raising the topic.

Waqas Hussain

More information about the JDev mailing list