Thursday, October 23, 2008

ApacheCon US keynote speaker ..

My wife Shahani will be one of the keynote speakers at ApacheCon US in New Orleans in a few weeks. She was until recently CTO of the ICT Agency of Sri Lanka, basically the government's IT place. Prior to that she was Head of Engineering at Virtusa, the largest software company in Sri Lanka. Before we came back to Sri Lanka (in 2001) she worked for a while in a startup called Prescient Markets (which interestingly was building software for trading corporate paper .. one of the fishy instruments causing problems now ;-) .. but they didn't survive the .com crash; so maybe they're not to blame!) and before that part time at IBM Research while finishing her Ph.D. in CS at Purdue as well.

She's a great speaker .. I'm sure it'll be a great talk (about how open source code has helped build amazing government solutions I think)! Unfortunately I won't be there as I'll be at home with the kids ;-).

Wednesday, October 22, 2008

Book on RESTful PHP Web services

Aha! Another RESTful Web services book .. this time by WSO2's own Samisa Abeysinghe, father of Axis2/C and now our Director of Engineering. Gotta love it!



You RESTafarians out there have to check this out .. given Samisa's WS-* credentials I'm sure there'll be some people who try to dismiss it outright. Give it a read and see .. I'm sure Samisa would be happy to get feedback and respond to it appropriately!

This is now the 3rd book by a WSO2 person: Samisa's, Deepal's one on Programming Axis2 and the one I wrote (prior to WSO2) on Web services. The WSO2 people authored bookshelf is growing! AWESOME!!

CORRECTION:
Glen has reminded me that he, Paul and others wrote the Building Web Services in Java book too! So, that makes 4 (and counting)!

Monday, October 20, 2008

India: Don't give into terrorism!

Sri Lanka is currently under major pressure by the Indian government to stop the ongoing war against the LTTE. Why? The Indian state of Tamil Nadu is a key supporter of the coalition central government in India. Tamil Nadu's residents are Tamil, the same race the Tamil people in Sri Lanka belong to .. and with whom we have a 2000+ year old history of interaction in various forms. So there are bunch of politicians in Tamil Nadu who actively supported LTTE and still do. There are also many who are genuinely concerned about the well being of innocent Tamil people in the war torn areas in Sri Lanka's north. To cut a long story short, Tamil Nadu can bring down the Indian government .. and they're threatening to do so now unless India intervenes in Sri Lanka's war.

Why? Because they apparently believe that innocent Tamil people are being killed and that the war is an attempt to destroy the Tamil populace of the north. That is nothing short of ludicrous - after more than 25 years of fighting our military has learnt bitter lessons of how to win a war in this environment and killing normal people simply isn't part of the formula. The president of Sri Lanka has invited the Indian foreign secretary to come to Sri Lanka to find out for himself what's being done to prevent civilian casualties and to see the real situation here. But, I doubt the offer will be taken up.

The LTTE is being squashed these days. That's because of a well-thought out military strategy being executed very carefully without a rush. The LTTE is so desperate that they're preventing innocent people from leaving to government controlled areas where they can be taken care of.

Don't get me wrong- I've said before in my blog and will say it again: there is no military solution to a 2000+ year old racial conflict. We need a political solution involving true devolution of power to the different regions of Sri Lanka and all the military can do is create an environment where the government can indeed execute such a change. Does our government have the political strength to pull it off now? I honestly don't know .. but we have to give them a chance to do it by winning the military part. If they don't do it, I will be the first to vote against them at the next election.

Why is that important? Tell me, which country would tolerate an armed group having their own naval bases, their own air force, their own territory, their own police, courts, taxes and more? Would the US "sit and talk" to such a group if they were to do that within the US? Would India? Would Russia? Would UK? No of course not.

What cannot be tolerated is the existence of a separate area which is under LTTE control and where indeed many Tamil people live but they live under intense difficulties. For example, every Tamil family is forced to give one member of their family to the LTTE.

Is that what India's Tamil people want for the Tamil people in Sri Lanka? Of course not. This is a political game that is being played well by LTTE and Tamil Nadu politicians and the one that's standing to lose is Sri Lanka.

This is absolutely a war to liberate the Tamil people from the evil clutches of the LTTE - not an attempt to annihilate them!

We've had 25+ years of a terrible war. It has taken many many lives on both sides- and almost all of them young lives. Now we have an entire generation that has known nothing but war. We need to get past this in order to prevent our country from going more down the tubes.

We have real problems to solve which cannot be solved militarily. At the same time, we cannot solve them when there's one armed group that has appointed themselves the sole representatives of the Tamil people (because they kill off any other Tamil leaders who don't agree with their approach and solution). We need to solve it with a dialogue with all Tamil political parties, Muslim parties, Sinhalese parties and the MANY political parties that transcend race. LTTE will not allow that to happen - we've had enough failed attempts at talking to them. Now its time to destroy that beast once and for all and enter into a political solution to ensure that we will NEVER have another LTTE showing up again.

If you live in the US or EU or somewhere else you may think "ain't my problem". However, you'd be wrong. Read up a bit on the LTTE and you'll see that they're part of your problems too - terrorism is an international curse & disease and cannot be put down until everyone stops supporting it.

I hope the Indian central government will not budge and invade or threaten to invade Sri Lanka again like what they did in 1987 (with Operation Poomalai). Have you forgotten how those criminals whom you air dropped supplies for killed 1255 of your troops in Sri Lanka and then went on to kill your own ex-prime minister Rajiv Gandhi?

India, please, leave us alone.

Monday, October 6, 2008

HTTP content negotiation in Axis2

Keith Chapman has written a nice blog explaining how to set up and configure content negotiation support in Axis2.

I thought I will take the opportunity to explain some of Axis2's design so you understand how all of this works.

The way this works in Axis2 is with a pluggable message formatter concept. Basically, when a message hits the wire in Axis2, two key decisions need to be made: (a) what transport protocol to use (HTTP, SMTP, FTP, File, UDP, etc. etc. [yeah, I know .. calling HTTP a transport protocol is heresy]) and (b) how to format the message to bits on the wire.

The decision on how to format the message can be influenced via content negotiation. So if you send a message saying "hey I prefer JSON" (by sending an Accept: header with a JSON media type) then the runtime can look for a JSON formatter and if its available, then the response will be sent in JSON. If you say I want it in plain text, then again if such a formatter is available that's used. What parts of the internal message model is serialized into the wire is up to the message formatter to decide. If no preferred content information is available then the system figures out what it thinks is the right media type (typically based on the incoming media type) and uses the corresponding message formatter to write the bits.

Message reading happens in the exact opposite way in Axis2- you write a MessageBuilder which can "unformat" a media type and register that with the runtime. Then when a message comes its incoming media type is used to figure out who can read the message and create a canonical message in Axis2 represented in Axiom (as a SOAP Infoset).

The use of a the SOAP Infoset (aka an Axiom tree with s:Envelope as the outer element) as the internal message model has bothered some people. Two key things to remember: (1) this does not mean that every message is actually converted to an XML Infoset and (2) it does not mean the application or the wire message ever have to be SOAP aware or at all related to SOAP. Every runtime like Axis2 needs a canonical message representation and we've chosen the SOAP Infoset as the canonical message representation. No more, no less.

We avoid converting every message to even an XML Infoset by using Axiom's ability to provide an XML facade to any bit of data without actually making that facade real. Thus a message can come into Axis2 via Smooks say and can go out via another EDI message without ever being converted AT ALL into any XML representation. The bits can literally stay in the socket buffer and be streamed right out. That's key to achieving high performance. Apache Synapse (and WSO2 ESB, the open source ESBs built on Axis2, live on that capability to deliver incredible performance.

The beauty of this approach is that the message format decision and the transport protocol selection are totally orthogonal. What that means is that if you add say XMPP support, then instantly we can send/receive SOAP, JSON, plain text etc. etc. over XMPP with absolutely zero cost. Oh BTW Axis2 does have XMPP support already.

Sunday, October 5, 2008

Paul on EDA based system integration

Paul has (as usual) written a great blog on applying EDA in a complex system integration scenario we've been dealing with recently. Read the comments too .. lots of good feedback.

FreeMind mind mapping tool

I've recently started using FreeMind and I have to say I absolutely love it. Its a great tool and it seems to have the good enough feature set .. so far no complaints!

I've long struggled with using PowerPoint (actually OpenOffice Impress .. but PPT is more a category statement!) to organize even presentations because of the strictly linear nature of the beast. I'm a big whiteboard fan because of the 2D environment it gives me to think with .. and still use a paper notebook for the same purpose when not in front of the whiteboard or when I need to get the results portable. I think FreeMind may be a good alternative to all of that - we'll see.

You may also want to check out this FreeMind demo video.