Friday, June 1, 2007

Design thoughts

There seems to be a few ways to get a browser app to talk to gtalk.

1. Ajax ------ punjab/tomcat/java servlet ------- Gtalk

The intermediary is because Ajax / Html is stateless and gtalk/jabber requires a statefull system. One success is by using java2script library which Hazrat has shown can connect to gtalk. One issue will be the latency introduced by the middle servlet module in java2script system.

(note the java2script client is on the left)

We will also need to build a conference bot to simulate chat in gtalk and the hops will be:

Ajax ------ tomcat -------- gtalk --------- conference bot

which will add additional latency.


2. Flash ----- Gtalk

Not sure if this needs an intermediary since Flash should be able to maintain state.
Potential libraries are Ignite's XIFF API and jabberflash.
They can talk to jabber servers, but not sure about gtalk yet. Hazrat ?
Since google's gtalk gadget is written in flash, this might be the way to go.

article on XIFF

3. Firefox extension ---- Gtalk

This has potential, though the application development could be tougher because parts of it have to be built in XUL & C (verify ?)
Potential library xmpp4moz.
Verify if it can talk to gtalk. Hazrat ?
Interesting links on programming Firefox

4. Java -- Gtalk
Ignite's Smack API
Interesting Bolinfest article on it.

This would be like the original OnChat and will suffer from the problems
of developing an attractive small java applet for the browser - not so keen on this approach.

1 comment:

H said...

I totally agree with you on the latency matter. The 50ms addendum per node/server is a good benchmark. It's a new one for me :D

As of the writing of this comment, no one has use XIFF with [serbver]. Maybe we'll be the first 1. Also, JabberFlash hasn't been updated since 2002. I'm afraid there are lots of incompatibility issues that may arise.

As for xmppformoz, It's kinda interesting to make TrueTalk embedded inside FFox. I'm still researching whether xmppformoz can connect to [serverb]

In Smack's case, even though it's for JAVA, which would sprout out problems like Mr. Shahril mentioned earlier, guys at Java2Script has successfully converted a java+swt+smack google talk client into javascript to be launched within a browser. It would serve best as a backup, should XIFF+Flash isn't possible yet.