SOA based on WS-* is fundamentally flawed

May 17th, 2007

All this while, I used to think SOA based on WS-* (see W3C and OASIS) would likely not scale because of the complexity involved in understanding and using the WS-* specs. Now I’m firmly convinced that SOA based on WS-* will never scale because the entire philosophy and thinking that is driving it is fundamentally flawed. Let me explain.

The idea behind SOA as a concept is loose-coupling, i.e. about a large body of applications that co-operate with each other to produce more powerful super-applications. If you look at the thinking driving SOA based on WS-*, it is all about tight-coupling, i.e. about a large body of applications that are extremely well co-ordinated to produce more powerful super-applications. Co-ordination instead of co-operation – therein lies the flawed thinking.

Co-operation is a notion that can be made to work on a large scale with few guiding principles/standards (the web is a wonderful example; others are the movie industry using DVDs, printer industry using letter size paper, etc). It is not easy to achieve, but it is feasible. Co-operation allows for individuality while enabling a shared goal to be achieved.

On the other hand, co-ordination on a large scale is practically impossible to achieve (an army like the US army, the New York Philharmonic Orchestra are some examples of co-ordination). Co-ordination demands extreme discipline and control. Individuals do not matter, only the common goal does.

Everything about SOA based on WS-* tries to achieve co-ordination (the specs themselves and all the grand talk about ESBs, governance, lifecycle management, meta data repositories, etc).

Co-ordination is extremely appealing because it promises ultimate efficiency. This is probably why enterprises are taken in by the SOA based on WS-* sell. With enough time, when it becomes apparent that they’re chasing a fallacy, people will come to their senses and do something much simpler to achieve co-operation that may be messy and not so efficient, but it sure as hell will work.

New and improved Yahoo Maps

May 17th, 2007

Played around with the new and improved Yahoo Maps and must say it is very slick. Yahoo has done a very nice job of integrating local data with their maps – unlike Google Maps where you have to first search for businesses to have them show up on the map (this search typically produces a lot of garbage), Yahoo has a nice browse feature which lets you get to the popular businesses really quickly (and the data quality is very good). Performance also seems quite good – I even switched to satellite mode and the transition happened fairly quick.

I guess the next round of map wars is officially underway – be fun to see how Google responds :-)

Why JSON beats XML

May 15th, 2007

Last summer I had the opportunity to implement a library that serialized Java objects to JSON strings and de-serialized JSON strings to Java objects. I know I should have used one of the umpteen existing libraries – but hey, I was suffering a temporary bout of NIH :-)

When doing this work, I realized how JSON has really hit upon the sweet spot of data interchange. There are really only two data structures that matter for any sort of data interchange between applications – arrays and hash maps (I’m including any arbitrary combination of the two – for e.g. a hash map of arrays of hash maps). By focusing on these two cases alone and providing a very compact representation, JSON has really nailed the problem of simple and efficient data interchange between applications.

Wasn’t XML supposed to solve this problem ? Well, XML is neither simple nor efficient from a data interchange perspective.

Schema introduces serious complexity when using XML for representing data while not serving any really useful purpose as far as I can see. Most of the issues with dealing with data from foreign sources have to do with interpreting the semantics of the data. Schema only helps with hints about the structure of the data; this is marginally useful and definitely not worth the huge effort involved in defining Schema. Only in the rare case where a certain structure is very widely accepted and used does Schema even begin to make sense.

Now, one could argue for using XML without Schema and I am willing to bet good money that most of the use of XML in the real world is without Schema. But in this case, the other failing of XML – that of efficiency creeps in. XML is too verbose because it was designed to be very general.

JSON has another huge advantage – besides its origins in JavaScript, it has a natural affinity with dynamic languages like PHP, Ruby and Python. Arrays and hash maps are very widely used in programs written in these languages – therefore dealing with foreign data (de-serialized from JSON strings) is no different than dealing with local data. No specially convoluted and over-engineered APIs to learn or use. XML, try and beat that :-)

The business of funny

May 14th, 2007

Met brothers Sandeep and Rajiv at a social occasion the other day – they are the brains behind EffinFunny, a web site that offers professionally created video clips from up and coming as well as established comedians. While the site and content are really cool (I highly recommend you check it out for yourself), what is very interesting is how the company is aiming to change the business of stand-up comedy. I think it is another great example of what Web 2.0 is really all about.

EffinFunny uses professional resources to videotape comic performances at live shows they organize once a month (currently in L.A. only). The company then applies a rigorous editorial process to distill the best content from these performances and releases this content on its site. Anyone who wants to is able to try out at their shows – there is no pre-qualification.

What EffinFunny is doing is creating an open and efficient marketplace for comic talent. Folks visiting their site get high quality content from the best up and coming comedians – they don’t have to sift through digital garbage like they need to at sites like YouTube. The up and coming comedians get to show off their wares without really worrying about issues unrelated to their core competence like making slick videos. Anyone looking to hire/use new comic talent gets to see the comics in action and compare them with their peers in a cost and time effective manner. All in all, Web 2.0 at its best.

28 tons a year

May 13th, 2007

Did some math using the EPA’s Carbon Emissions calculator today. Looks like our household generates about 28 tons of Carbon a year. Here’s the breakdown:

  • Our cars – 10 tons
  • Electricity/gas for our home – 17.5 tons
  • Waste – 0.5 tons

A real eye opener for me.

Its pretty safe to assume that households in third world countries generate nowhere close to this much. I was thinking of my own childhood growing up in India. We did have a car, but it was used mainly for leisure trips and driven nowhere near as much as my family does now. We did not have central air conditioning or heating systems in any of the homes we lived in (we lived in some extreme climes where we could definitely have used these). We used ceiling/table fans for cooling ourselves and blankets/sweaters to warm ourselves. We did not generate even a 100th of the waste my family generates today. We simply did not consume as many goods with elaborate packaging and we did not throw away anything until it had served every ounce of its life. Could I get my family to change so we start living that sort of a simpler lifestyle ? Probably not. But could we do something to reduce our emissions ? I think so – there’s a number of very simple suggestions available here which we are going to try.

I recommend anyone reading this do the math for themselves and look for ways to conserve.

Patents serve middlemen, not inventors

May 10th, 2007

I ran into this article today arguing why Patents are a wonderful thing because they reward inventors in a big way and spur more innovation.

I could not disagree more with the author.

Patents reward a whole industry of middlemen way more than the inventors who create them.

Only in rare cases do inventors make big gains. This happens when they have/acquire the business skills needed to translate their invention into commercial success. Someone like Larry Page (quoted in the article) would fall in this category.

The common case is that the inventor receives a small if any reward for his/her invention and the maximum benefit goes to corporate managers, investors and/or lawyers (of course, if it is worth anything in the first place). If the invention is a commercial success, investors and managers reap the rewards. If the invention is used to sue, lawyers reap the rewards.

Inventors are typically driven by passion, the passion to create. On the other hand, Patents are driven by greed, nothing but greed.

Blockbuster scores

May 9th, 2007

Our family recently decided to get back to renting DVDs after a somewhat long pause (we had a second child and could not find time to watch movies). I consider us pioneers in online renting – angered by a somewhat stiff late fee at the local video store (just like the ad :-)), we signed up for Netflix pretty early on. We loved the online renting model and enjoyed it for a long time until we found we were not really doing justice to the $20+ monthly fee we were paying. So we quit.

This time around, realizing there were other options besides Netflix, I took the opportunity to research all of them and found Blockbuster’s model the best by far. After struggling to find its place when Netflix became a significant player, I think Blockbuster has come back with a virtually unbeatable model – it has cleverly combined its online and in-store rental businesses to offer fantastic value and flexibility to customers. I pay around $10 a month. I get to rent one movie online and whenever I’m done with it, I get to exchange it for a free movie in-store and the next movie on my online queue is immediately shipped to me (no waiting for the movie to get back to their warehouse). Plus, I get to rent a bonus movie free from the store every month. Blockbuster does not come out a loser either; invariably, when I’m in the store, I pick up another movie, paying the normal fee for it – so they get some more revenue from me.

I think this is a great case study on how a company faced with disruption has been able to not only find a way to compete effectively but also get to a position of great strength. Of course, the new disruptor for all of these guys is video over the web …

Evolving notions of trust

May 8th, 2007

Historically, when I put my trust in someone, I did it because I believed they would do good by me.

I put my trust in a family member or friend because I believed they cared about me and therefore would do good by me. I put my trust in a business because I believed they had a vested interest in doing good by me (they would benefit from what I had to offer – my talents or my money). I put my trust in institutions (academic or non-profits) because I believed they would do good by everyone. These notions of trust have been developed over centuries and passed down from generation to generation.

In a Web 2.0 world, it seems like my notions of trust have expanded – I’m beginning to trust people using a whole new basis. I’m trusting them because I believe our interests are very well aligned. I have no other basis – I’ve never met these people nor am I ever likely to meet them.

For example, when I use an open source package, I trust the developers and others in the community because I think we all care deeply about the shared asset – the code. As another example, I trust my fellow consumers when they write reviews of products because I think we are all watching out for each other. Sure, there are examples of fraud and abuse of this trust, but they are far and few – they exist even in the traditional models of trust described above (backstabbing friends, businesses that defraud and non-profits that squander).

At first glance, this may seem like simple co-operation; however, I think there are subtle differences. Co-operation involves well-defined upfront expectation of rewards for pursuing a cause. In the Web 2.0 world, there isn’t such an upfront expectation, there is simply a blind trust that everyone who cares about a cause will make a positive contribution …

Java – time to move on

May 7th, 2007

On the eve of Java One 2007, I for one have decided to move on from Java. I suspect I am somewhat late to the party – there has been a growing trend for some time of developers seeking greener pastures.

I’ve been working with all the major dynamic languages (Python, PHP, Ruby and JavaScript) the past couple of years (I also developed a major Java based system during this time) and have grown to love the huge gains in productivity they offer. In a world that thrives on speed, it is easy to see why this gain in productivity will be immensely valued in the coming years.

While not all of the dynamic language environments are as mature as Java (PHP and Python are definitely very close) in terms of execution speed and availability of tools/libraries, there is a lot of attention being paid to them at this time and I am confident they will mature quickly.

After C, I for one cannot think of a language that has had more impact than Java. In addition to fueling the growth of transactional enterprise web applications, I believe that Java’s portability has really helped fuel the Linux revolution. But all good things must come to an end sooner or later and I believe that we are at that point for Java …

Shadowy world of cookies

May 5th, 2007

For a while now, I’ve been using options in Firefox and IE to prompt me before accepting cookies from web sites. Boy, am I surprised to see what goes on …

I would highly recommend that everyone try this and see for themselves. In Firefox 2, use Tools -> Options -> Privacy, check the “Accept cookies from sites” box and select “Ask me everytime” for the “Keep Until” option. In IE 7, use Tools -> Internet Options -> Privacy, select the Advanced button, check the “Override automatic cookie handling” box, select the Prompt option for First party and Third party cookies, check the “Always allow session cookies” box. In both Firefox and IE, there are buttons to clear all cookies, use that to delete all existing cookies. Now sit back and watch the fun!

While I do not generally have a problem with first party cookies that serve a functional purpose (like holding your shopping cart at an e-commerce site), I find third party cookies that track your every move extremely offensive. I’ve come to detest companies like Hitbox that make huge sums of money off data collected in a very shadowy fashion. What is really scary is that when I heard a guy from Hitbox speak at a recent conference (see previous post), he was talking about how they knew the demographics of the people accessing various sites, how many kids they had, their family income and so on – loads of personal data – they are using this personal data in combination with people’s surfing habits to sell all sorts of analysis. Talk about big brother watching …

If you want to personally do something about this – use the browser settings described above to avoid any unwanted cookies (IE has a handy setting to automatically reject third party cookies – but some of them now circumvent this and act like first party cookies) and also clear all cookies periodically (Firefox has a handy option to do this automatically every time you close the browser).