It's technically so easy it's hard to even make it take long to describe. Define XMPP pubsub nodes that correspond to the events of interest. Create a client that subscribes to these nodes and translates them into web events. This is probably a good time to consider a non-SQL based backend.
Personally, I'd do it all in the context of ejabberd + yaws using Mnesia. If I'm feeling particularly saucy, I would use comet-connections to make all the events live, not just "chat". (That's an advantage you would get from the web server and XMPP server being in one (OS) process; the same event can very, very easily trigger both XMPP handling and some JS shipped down to a user with one handler.) I would actually not bother scaling to umpty-bajillion users, the entire idea for people to actually own their implementation and for there to be bajillions of implementations out there.
I could pretty much spec this in my sleep and implementation wouldn't be that much harder. The thing is... that's not the hard part. The hard part is getting people to use it, and "I provide a hosting service for the first few thousand people and create a de facto point of centralization" rather defeats the point. I have no idea how to address that step.
Personally, I'd do it all in the context of ejabberd + yaws using Mnesia. If I'm feeling particularly saucy, I would use comet-connections to make all the events live, not just "chat". (That's an advantage you would get from the web server and XMPP server being in one (OS) process; the same event can very, very easily trigger both XMPP handling and some JS shipped down to a user with one handler.) I would actually not bother scaling to umpty-bajillion users, the entire idea for people to actually own their implementation and for there to be bajillions of implementations out there.
I could pretty much spec this in my sleep and implementation wouldn't be that much harder. The thing is... that's not the hard part. The hard part is getting people to use it, and "I provide a hosting service for the first few thousand people and create a de facto point of centralization" rather defeats the point. I have no idea how to address that step.