tarek at mozilla.com
Mon Oct 21 01:13:12 PDT 2013
Here's a braindump of what I did this past week wrt presence
We have 2 existing protocols that solve presence already:
* SIP, with the SIMPLE extension
Most chat apps out there are using an XMPP Server and libs like Strophe.js
Phone-like apps that have their own transport system for voice or video
(like webrtc) are usually SIP based. And they all deal with presence
internally, using what SIP or XMPP provides.
Facebook Chat on its side seemed to have started from XMPP, and then
created a specific service for the Presence, in C++ - There are pieces
of info here ->
at the end the only thing that remains in XMPP as far as I know, is at
the surface: they provide the XMPP protocol but internaly even the
erlang app is not an XMPP server anymore.
Whatsapp on its side implemented a custom erlang XMPP server called
FunXMPP, see https://github.com/koenk/whatspoke/wiki/FunXMPPwhich seems
to be compressing XMPP messages to reduce the network traffic. I have no
idea how they deal with presence - still investigating.
So back to our questions: would it make sense for Mozilla to provide an
unified presence service that apps could consume ? Frankly, the more I
am looking at this, the more I don't see how we're not going there at
some point with the phone.
I don't want to have a FFOS Phone where I cannot use my Persona Account
on a chat app
There's one FFOS web app that seems quite interesting in this field:
They seem pretty active and they seem to plan to move to
Websocket/SimplePUSH at some point. I have send them an e-mail to see
if they want to join this mailing list, and will see if they
have some thought about plugging Persona into loqui and doing some
== Persona & XMPP ==
On my side, the first experiment that came in mind was to create an XMPP
server w/ Persona auth. See my previous mail. What I did was to plug
Mozilla Persona in ejabberd this week-end, and built a web page with
Persona auth and strope.js - I just passed the Persona token as the
password to the ejabberd server, and wrote an external authentication
script that used PyBrowserID and that worked fine.
But overall the biggest issue is that we don't really care about
implementing the whole XMPP and SIP/SIMPLE protocols. We just want to
provide a presence service on the phone for web apps to use, and let
them deal with the real.
That's where WebActivity fits in the picture I guess: If Mozilla is just
a presence bar auth, XMPP is overkill.
If interactions with apps are not at the API/Protocol level anymore, we
can build our own lightweight protocol and work on scaling it. The
biggest issue is to make sure we provide some kind of fallback for
dealing with browser version that don't have web activities.
Then the big question is : will app have an incentive to move from a
pure XMPP or SIP system to something that uses a presence bar logged in
Persona ? I guess working with guys like loqui can be a good lead to
try to answer to that question. If you know other apps ..
== Next steps ==
I'll continue investigating & experimenting with the persona/presence
thing, and see where it goes - if someone is interested I can push that
to an AWS box.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Wg-presence