Monday, 22 September 2008

OpenID and the Register

The Register is one of my favourite sources of news, and one of the things they do well is to put the opposing view. Of course being contrary is fun, but of course it doesn't mean its right.

Ted Dziuba has written an article railing against OpenSocial, OpenID and Google Gears (rather humourously I admit). However, while I agree the jury is still out on OpenSocial and Google Gears, I think that Ted is deliberately having a go at OpenID for no particularly good reason.

Ok. I admit. OpenID is not the simplest thing to handle.

But then again, it took my mum a while to figure out this InterWebbyNetty thing too. The fact is that there are a whole bunch of people who don't understand really how the web works, but they somehow muddle through. These are the people who type a URL into the Google Search bar, it comes back with the same URL as the first link in the list, and they click on that link.

So Ted is basically saying these same people cannot type "pizak.myopenid.net" in as their username? Hmmm. I think my mum could handle that. And she might appreciate not having 100 different userids on a 100 different systems, that each implement a different rule on how long, and how complex the password should be. A different rule on memorable places, names, mother's maiden name, etc for when you forget the password. A different login page.

Ted claims:
"I got lost on the part where my username isn't really a username. Its a URL."

Of course this is the same Ted Dziuba who somehow manages to debug complex Java code by looking at stack traces with jstack. Hmmm.

Personally, it seems that Ted (who used to work at Google) has a thing against Google. Google likes OpenID, therefore Ted doesn't like OpenID.


Enjoy the article, just apply a large pinch of salt.

Friday, 19 September 2008

wso2.com gets a makeover

Take a look. Congrats to the team that has done this - I love it.

Thursday, 18 September 2008

WSO2 and PHP tech flick

We've started doing some interviews on YouTube. Here is your chance to find out more about WSO2 WSF/PHP 2.0 from Shankar.

Tuesday, 16 September 2008

An interesting problem in Event Driven Architecture

I spent last week hacking on Event Driven Architecture with some very smart people. We came across a problem, and I thought maybe somebody has already seen this and solved it! Comments are welcome.

We were using the following pattern. We have n existing systems. Lets call them L1...Ln. Each of these systems is basically not "touchable" - we can only call the existing interfaces. Each system offers something similar to the following interface:
* update(resource r)
which allows you to update some object, resource or thing. 

We plan to use this interface to update all the systems using events to keep them in sync. Each system can subscribe to updates and keep in sync. 

This works fine if the model is master-slave. In other words, there is a single master system that publishes events to all the slaves. But in reality, that isn't how most architectures work. Each system may have updates which need to be propogated to the others.

To make this work, each system allows you to be notified when any updates happen The problem is that you cannot distinguish the root cause of the update. Some updates come from within the existing system, and of course some updates come through the external interface. 

So imagine I make a change to Resource R1 in system L1. An event (E1) is issued saying there is an update to R1. This is distributed to L2 and L3. These systems in turn update their core storage in response to event E1. Now, these systems issue events (E2 and E3) that reflect the updates to those systems. Ideally we would junk these updates since they are just "echoes" of E1. Without doing that, the system will start to resonate, and feedback will takeover, just like in a badly setup PA.

Spotting the echoes is actually pretty hard to do: we cannot distinguish between these echoes and E1. 

Ideally we would have a correlation between E1 and E2, but since the existing system can't be changed, we can't do this.

Suppose we try to do by comparing E1 and E2. The problem is there may be different data in E1 and E2. Maybe system L2 adds an "last updated" timestamp. This will mean E2 is slightly different to E1. 

What about using timing. Just drop all events that come back referencing R1 for the next 10 seconds after E1 is delivered? What if someone edits the resource inside L2 and there is a genuine new event (E4) as well as the echo? The real event gets dropped.

Is there any solution? The only one we found is that we have a "Master System" (M). All updates from L1...Ln must go through M. So L2 only hears about L1's events via M. And M keeps track of the master data, and M knows what information is important and what is transient (like the aforementioned Timestamp). 

Every time an update comes to the Master, it checks against its own store. If there is a genuine update (the important data for the resource has changed) then it distributes it to everyone (except maybe the source of the update). If the important data matches the existing state, it drops the message. Think of it as a feedback supressor.

So in our case, E1 would get past (genuine update), but E2 and E3 would be dropped. But E4 would be distributed because it contains real updates to the state of R1.

This is a good pattern. It means we always can get the master state. But its also considerably more complex with more moving parts than the standard view of an Event Driven Architecture. You need to have twice as many topics for example (because you have to have one topic for messages to flow up to the Master and a separate topic for messages to flow out back to the Ln systems.

Secondly we need a complete copy of the state (or at least a cache of recent state) PLUS we need to know the shape of the data - what is important and what is transient.

All in all, this is an interesting issue when you try to bridge between a legacy system and an event driven architecture. If anyone has a better solution, please let me know!

Friday, 5 September 2008

Adding Persistence to Synapse

Danushka has written an excellent article on using ActiveMQ to persist messages in transit through Synapse or the WSO2 ESB.

Thursday, 4 September 2008

Chrome gets a techie testing

According to Google Analytics, 13.64% of all the visitors to my blog for the past day used Chrome. That is about four times the average. So my assumption is that the techie crowd are giving Chrome a good road test. I think it will be interesting to try again in a week or two, and see if Chrome is winning hearts, or whether people head back to Firefox.

Chrome 4 Geeks

If you are reading this on Chrome, try this link: about:memory