Simple REST HTTP-Proxy for xmpp

We're currently working on a xmpp server which used by an Android App and we want to use xmpp-ftw and node.js to contact the Web Server through HTTP Request.

Now our question: How to handle specific requests to react on the request?

https://github.com/xmpp-ftw/xmpp-ftw

e.g.

127.0.0.1:3000/login

{ "jid": "test@evilprofessor.co.uk", "password": "password", "resource": "xmpp-ftw", "host": "127.0.0.1" }

to login to the server. It should be a simple wrapper.

Thank you

The problem with doing XMPP over HTTP/REST is that you need to hold a session open on the server with each request, or re-authenticate with each request the later being very slow.

We created something on the buddycloud project which allowed you to do the former (https://githib.com/buddycloud/buddycloud-http-api) which allowed easy creation of apps using XMPP + HTTP/REST. What you do lose is the realtime aspect.

You won't get REST from a wrapper around XMPP-FTW but you could get something HTTP like. On authentication return a cookie to the user, keep the XMPP session open and use the cookie to get their session out of storage each reload.

How would you plan to deal with realtime aspects? e.g. incoming chat? Or is this outside of your plans.

I'll happily put something together for you but am quite busy at present so its not going to be high on the priority list I'm afraid. Please raise an issue against https://github.com/xmpp-ftw/xmpp-ftw.

Cheers, Lloyd.