Note: This discussion was imported from Loomio. Click here to view the original discussion.
I have been busy reading up on event-based server architectures (Node.js, Python Twisted, Eventmachine) and now I am wondering, whether it would make sense to base stuff like live-updating the UI and XMPP chat on Eventmachine (since we already got that gem as dependency for Thin).
SSE (Server-Sent Events) are like Websockets, but they work only in the server->client direction. A big plus is that they’re using the HTTP protocol. We could use that to get back what we had with websockets… live stream updates and notifications.
And XMPP chat has always had the problem of requiring a full-blown Jabber server (like ejabberd) and interfacing that with the user database. If we’d build a rudimentary implementation upon eventmachine and one of the XMPP libs for ruby, I think we could get far better integration while keeping the dependencies to a minimum.
Sounds good but maybe develop as much as possible in a separate library.
I would hate to create another run-time dependency, especially if it required you to pay for a whole extra Dyno on Heroku, that would really be a problem if the cost of hosting an entry-level pod goes from $0 to $35 just to support web chat.
I wonder if we could integrate pods into some kind of shared infrastructure for chat, so that not every pod would have to host their own.
What about providing tutorials on getting an XMPP account, maybe even host our own service for that, and then just use existing servers? Just a good and tight integration of existing XMPP accounts anywhere could be an approach.
Most likely we would either need BOSH with CORS enabled on that servers or provide some kind of proxying for that.
Just an idea.
@Jonne I like that idea, it’s just a matter of finding XMPP services we can use… preferably something that either integrates with Diaspora (so your login is the same, like Facebook or Google chat) or provides some form of authentication that doesn’t require a pod to store username/password in plaintext. Several months ago I saw something that looked promising, someone was alpha testing a possible Heroku addon called Rabble.im that would have provided a hosted ejabberd instance with an API we could integrate with… but sadly, that disappeared before it ever got out of alpha.