Integrated web application

Hello everyone,

i have a dream... lol, no, forget it. I have an idea. I want to integrate a jabber Messenger into a website. Wow, how special. But in a different way than JWChat or Muckl does it. The Messenger should be integrated in a way, that a user can open several pages of the website and on every website he is connected as the same jabber user.

Example: the user has http://www.example.com/forum in one tab open and http://www.example.com/news in another. And on both pages he is logged in (probably with JsJac) to a special "web integration" connection of the jabber server. So if he receives a new message, he will see it on both pages.

Ok, first problem: How should such a "web integration" connection act like?
I'll only concentrate on text and presence messages as a start. If a message is sent for a webappuser, the special connection will send it to every connected webappclient. Example: user@example.com/home sends a message to webappuser@example.com/web1 (where resource web1 and web2 are the both resources of the webappclient, but this doesn't matter). Now the special webapp connection on the server sends the message to both resources in this example, generally to every resource which is connected through this special port. i'd call that a msg/presence web forward. Same with presence.

second problem: the web client should recognize somehow, what incoming messages are new for the user, even if he switches between the tabs.
ok, to signal the other web clients that an incoming message is no more new to the user, we need some communication between them. my first idea was a bit complicated, we could use adobe flash's localconnection with pure communication flash movies and javascript to communicate between different browser windows (and even different browser software). but why unsure client-to-client communication when we have a server connection to the jabber server with all web clients. so if the user clicks in an incoming message div-"window", a special jabber-msg will be sent to all other web clients, telling them, that this message has been noticed by the user. maybe those web clients simply will close their user msg "windows", keeping the msg in the history. i don't want to use an additional browser window for each query, javascript-driven-div-"windows" are fine, not important in this moment anyway. this special communication over the jabber server will be not XMPP-compatible. the customization should only work for these special clients.

now i started planning to code a gateway in java for this special communication. but why not directly in ejabberd as a module? so, finally and firstly, what do you think about this idea? and is there any yet implented way to forward msges and presence to other resources of the same user?

thanks!

cheers,flip

PEP or PubSub maybe?

ok, maybe i wrote too much ;)

i need a customized message from one ressource to all others of an user. i don't know all the xmpp rfcs but i searched a bit. i think some of you have a lot more expierence with the jabber protocol than me. what would be the best to do such a customized message transfer? (presence would be enough, its just a short flag i want to transmit). PEP or PubSub maybe?

thanks for your answer,
flip

Syndicate content