[Adium-devl] Java-based libraries... a ponder, a thought, an apology

Andreas Monitzer soc at monitzer.com
Fri Dec 8 03:56:22 UTC 2006


I agree that the Java Bridge probably has gone the way of the Dodo (I  
wasn't aware its deprecation until well into SoC 2006), and I've  
actually thought about all the implications for my code worth 3  
months of my live (that includes a canceled holiday trip and stress  
symptoms that still plague me today) for some time now.
My plugin code has some very evil workarounds for issues related to  
the Java Bridge (mainly its inability to forward exceptions thrown in  
constructors, and the lack of a simple way to implement callbacks  
into ObjC-code). I never liked that part of the plugin, but I  
couldn't think of a better way (short of rewriting the Java Bridge).

I'd be willing to implement a fully ObjC-based XMPP library for  
Google SoC 2007 (don't have any time before summer, sorry),  
leveraging current technologies like NSXML* and KVO to get a simple  
yet effective framework for XMPP (as long as I don't have to care  
about backwards-compatibility). The fact that this is more work than  
simply using a finished XMPP library should be made up by the fact  
that I have a much deeper understanding of the protocol now compared  
to half a year ago.
Additionally, I used Smack only as a parser for XMPP (except for  
connection setup and file transfer), since its developers went for a  
heavily multithreaded solution, but seem to have missed "Threadsafe  
Programming 101", so most of its convenience functionality was simply  
broken -- the developers told me to insert delays all around the  
place to work around those, which is simply unacceptable. I submitted  
a lot of patches fixing some of those problems, but didn't solve all  
of them, and the most important one wasn't even accepted.

Using an ObjC-based approach would solve many issues (including the  
ability to use non-blocking I/O, which is dead simple using  
Foundation), it would also allow me to add support for XEPs that were  
ratified after SoC 2006 (most importantly, the personal eventing  
protocol, which 90% of the new XEPs build upon), and remove/not  
implement the ones that were deprecated after last August.
This solution would also fix the problem of the wasted 3 months,  
since it could simply be considered a learning phase for getting  
experience on how to do it in a non-optimal way (getting a complex  
thing like an IM protocol implementation right on the first try is  
pretty much impossible).
Of course, this thing would require the contact hierarchy rewrite  
we've talked about back in September/October. Another downside would  
be, that jingle support would once again move farther into the  
future, since that would blow the frame of SoC by an order of  
magnitude (otherwise Alvaro would't have failed finishing his  
implementation).

What do you think about this?

andy





More information about the devel mailing list