Monday, December 28, 2009

Beautiful Sri Lanka

Couple of shots I was able to get on the way.

Parrots, often find as couples





Peacock, hope I will find one in its dance, one day.

Ruwanwali Saya

Ruwanwali Saya

Sunday, December 27, 2009

@ Jaffna

We were @ Jaffna last weekend, following are few shots. If you are planning to go a) it takes about 14-16hours drive b) it is good if you have a SUV/Pickup as some parts of the road is not in that good condition (around Vavuniya). c) You have to leave Elephant pass by 5pm on your way back.

Nallur Kovil

Wating on A9

Waiting on A9 for Clearance

A9 Road

A9, almost at the end of road. Not many roads in SL run for 300+kms (it is 200kmX400km almost).

Elepahnt Pass

Elephant Pass


Tal Trees, Signature of Jaffna

Iranamadu Tank

Iranamadu Tank

Monday, December 21, 2009

Nice Sequence Diagram Tool

Found very natural to use, handy tool when you want to describe a scenario.

Tuesday, December 15, 2009

Binary-Relay: An Efficient way to pass both XML and non-XML content through Apache Synapse

Finally got the article done on Binary Relay, which enables Apache Synapse/WSO2 ESB to pass through non-xml data (and xml data if they need to) at the byte level--a very useful tool when using Synapse/WSO2 ESB as a load balancer. It can be enabled by adding a message formatter and a builder to Axis2 via axis2.xml. Read the article for more details.

Saturday, December 12, 2009

A new Book on Geronimo

A new book on Geronimo, Apache Geronimo 2.1: Quick Reference, has came out, and I received a complementary copy. More details soon.

Friday, December 4, 2009

Prof. Elinor Ostrom : Indiana University's 8th Nobel Laureate

Elinor Ostrom

Elinor Ostrom, the Arthur F. Bentley professor of political science and professor of public and environmental affairs at Indiana University has bagged the 8th Nobel prize for IU (For Economics). More details can be found in Congratulations!!.

Apache Web Services in the Real World, an E-Science Perspective

Today I did a presentation at ApacheCon Asia, road show, and slides are given below.

Friday, November 27, 2009

Scalability, Consistency, Correctness, and Availability, Choose any Three

Above four properties are tightly locked with each other giving rise to interesting tradeoffs, and given a system, you may chose any 3, but achieving all four at once seems almost impossible.

Having said that, Correctness---fact that a system behaves according to its specification---is a property any system have to have, and systems that do have only other three are not very interesting. But it is worth noting that consistency and correctness are two different things, and an inconsistent system may be correct, given that its specification does not make any claims on consistency.

Tradeoff between scalability and consistency is well discussed under the topic of loose consistency. Amazon CTO, Werner Vogels has shed much light on the topic, and he argued that to create scalable systems, we have to let go of strong consistency guarantees like ACID (transactions). His post Eventually Consistent, revisted discusses this topic in detail. Those systems are Scalable, Correct, and Available, but only have loose consistency. Amazon's Dynomo is an example of such a system.

We can build Correct, Consistent, and Available systems using group communication, but those systems do not scale. Typically, the limit is considered to be 8-10 nodes in a group in group communication.

Finally, we can build a Scalable, Consistent, and Correct system by stopping all new requests whenever a change happen in a node untilthat change is disseminated in to all other nodes in the distributed system---even if there are thousands of nodes. Unfortunately, if updates are frequent, the system will reject messages most of the time, hence has poor availability.

Incorrect systems are bad, but neither of last three are bad by itself, and each of those are useful on some usecases. Hence they are useful tools in architect's tool box.

My Shutterbug @ Kandy

Following are couple of shots, which came out good---at least IMHO.

View from Lankathilaka Temple 2

Nelum (Lotus)

Fisherman Wharf Sea Lions

A major attraction in San Fransisco is Fisherman Wharf, specially Piper 39 and its Sea lions. Following are few shots of those noisy and smelly, but cute and lovable animals.

Sea Lions at Fisherman Warf, SF

Sea Lions at Fisherman Warf, SF

Actually, an interesting point is that those guys were never placed there by humans, rather one day, they decided to invade boat decks in Piper 39, and stayed there ever since (See Crowd loved them, and soon they were a major attraction, which allows those snaky invaders to stay there unmolested

Tuesday, November 24, 2009

Prof. Geoffrey Fox named among "People to Watch" in HPCwire

IU digital scientist and professor Geoffrey Fox named among "People to Watch", see IU news article for details.

Friday, October 9, 2009

Configuring Https in Axis2

If a client is connecting a https server, he has to trust the certificate of the server, and the developer has to provide the trusted certificates to the client. is the closest reference I found, which basically says look at httpclient configurations, and also thread discusses how to do this.

Basically Axis2 depends on commons http client security and it uses JSSE security. So setting following properties will do. However, httpclient also provides more deeper control.


Wednesday, September 16, 2009

Simplify data extraction using Linux text utilities

Simplify data extraction using Linux text utilities is a very nice article that teach how to do text magic with the Unix shell, and these commands become handy with pipe (|) operator.

Sunday, August 9, 2009

An Video on HCI/ User Experience @ Google

An Video on HCI/ User Experience @ Google The Science and Art of User Experience
at Google
". If you have noticed that I am thinking lot about user experience, the reason is that I am beginning to believe both in academia or or industry, impact on the end user is central to both understanding a problem and designing solutions.

Monday, August 3, 2009

Editing Fstab

If you have forget--like me--how to edit the fstab to mount windows partitions by default, describes how to do it.

Sunday, August 2, 2009

ICWS Talk 2: Application of Management Frameworks to Manage Workflow-Based Systems: A Case Study on a Large Scale E-science Project

This is the second talk, and it discusses integration of Hasthi with LEAD Project, a Large Scale E-Science cyber-infrastructure.

Citation: Srinath Perera, Suresh Marru, Thilina Gunarathne, Dennis Gannon, Beth Plale, "Application of Management Frameworks to Manage Workflow-Based Systems: A Case Study on a Large Scale E-science Project," icws, pp.519-526, 2009 IEEE International Conference on Web Services, 2009


Abstract: Management architectures are well discussed in the literature, but their application in real life settings has not been as well covered. Automatic management of a system involves many more complexities than closing the control-loop by reacting to sensor data and executing corrective actions. In this paper, we discuss those complexities and propose solutions to those problems on top of Hasthi management framework, where Hasthi is a robust, scalable, and distributed management framework that enables users to manage a system by enforcing management logic authored by users themselves. Furthermore, we present in detail a real life case study, which uses Hasthi to manage a large, SOA based, E-Science Cyberinfrastructure.


ICWS Talk 1: Enforcing User-defined Management Logic in Large Scale Systems

Early July I presented two papers at ICWS, here is the first one. This is the base of my thesis.

Citation: Srinath Perera, Dennis Gannon, "Enforcing User-Defined Management Logic in Large Scale Systems," services, pp.243-250, 2009 Congress on Services - I, 2009


Abstract: The ubiquity of information technology, technological advances, and utility computing trends have motivated largescale systems, but managing and sustaining these systems is far from trivial. Automatic or semi-automatic monitoring and control are a potential solution to this problem. However, since management scenarios differ from system to system, a generic management framework that can manage a wide variety of systems should support user-defined management logic. This paper proposes a novel architecture that can manage large-scale systems according to user specified management logic that depends on both global and local assertions of the managed system. Furthermore, the paper demonstrates that despite having a global view of the managed system, a management framework can scale to manage most real world usecases.


Dissertation: Enforcing User-Defined Management Logic in Large Scale Systems

As I promised before, following is the information related to my Dissertation and Defence (At Indiana University).

Title: Enforcing User-Defined Management Logic in Large Scale Systems
Year: 2009
Primary Advisor: Prof. Dennis B. Gannon
Thesis Committee: Prof. Dennis B. Gannon (Chair), Prof. Geoffrey C. Fox, , Prof. Beth A. Plale, Prof. David B. Leake, Dr. Sanjiva Weerawarana

Thesis can be found through ProQuest here (I paid and enabled open access, and therefore, you do not need an account to download it). Also there are two papers.
  1. Srinath Perera, Dennis Gannon, "Enforcing User-Defined Management Logic in Large Scale Systems," services, pp.243-250, 2009 Congress on Services - I, 2009
  2. Srinath Perera, Suresh Marru, Thilina Gunarathne, Dennis Gannon, Beth Plale, "Application of Management Frameworks to Manage Workflow-Based Systems: A Case Study on a Large Scale E-science Project," icws, pp.519-526, 2009 IEEE International Conference on Web Services, 2009
Slides used for the presentation can be found below.

Due to advances in distributed systems, social motivations, and economic motivations, scales of systems are on the rise. In large-scale systems, changes--caused by failures, maintenance, and additions--are a norm rather than an exception, and therefore, manually keeping these systems running is difficult, if not impossible. System management, which monitors and controls systems, is a prominent solution to this problem.
However, management usecases differ from system to system, yet developing a specific management framework for each system defeats the purpose of building system management frameworks in the first place. Management frameworks that enforce management logic authored by users provide a solution for this problem. These frameworks enable users to change framework's decision logic to cater for user's specific requirements, and after deployed, they monitor and control target systems in accordance to the user-defined management logic. If these logic assert only a single component of the system, we call them local logic, and if these logic assert multiple components in the system, we call them global logic. The global logic depend on a global view about a system, which is non-trivial to support in large-scale systems. However, they enable users to reason about the target system explicitly and, therefore, provide a natural way to express management usecases.
This dissertation presents a new, dynamic, and robust management architecture that manages large-scale systems by enforcing user-defined management logic that depend on a global view of the managed system. Using empirical analysis, we have shown that it scales to manage 100,000 resources, which demonstrates that the architecture can manage most practical systems. This is a testament that despite its dependency on a global view of the managed system, a system management framework can manage systems in accordance to user-defined management logic and can still scale to manage most real world systems. Furthermore, we have demonstrated that the architecture is robust in the face of failures and stable with respect to different operational conditions.

Monday, July 27, 2009

Keynote at CSE Conference

I did a keynote at the CSE conference last Friday. It was a high level talk trying to discuss possibilities (from a Sri Lankan context) in economic hard times. Slides are attached.

Sunday, June 28, 2009

Optimizing MPIs for multi-cores : Thoughts by Eran

Nice blogs by Eran, Optimizing MPIs for multi-cores : Thoughts, and also this presentation Functions + Messages + Concurrency = Erlang by Joe Armstrong is pretty good if you need to understand some dynamics of multi-cores and concurrency. In my opinion, Some of his points are open to argument, yet he present a different perspective, obviously helped by his experience with Erlang.

Friday, June 26, 2009

Overhead of Servers on VM's

I was doing a performance tests, and initially trying to run them on virtualized hardware. We ran them first on EC2, then on a Xen based virtualized layer, and finally on real hardware. We observed that the virtualized version is much slower (15 TPS on virtualized vs. 290 TPS on real hardware, almost as 20 times slower!!). Still not sure wheather this applies to servers in general or is this a special case. However, if this is a general result, for servers (which usually has high IO/ CPU overhead) virtualization is really looking bad.

Saturday, June 20, 2009

Role of Trust: about "Sri Lanka cricket: an example of what we can do together"

I saw this post by Dr. Sanjiva, Sri Lanka cricket: an example of what we can do together, and I can not agree more. To add my two cents, in my opinion, a part of the problem is that we---Sri Lankans---have lost faith on each other. This faith, the belief that others would not exploit although one has lower his own guard is a great thing, and it always yields a team, which is greater than a sum of it's parts.
One of the example of this trust the history can offer is Phalanx formation practised by Greeks (and later by Swiss) to great effect. One of the key features of the formation is that each man is protected not by his own shield, but by the one hold by the guys in the right, which gave each guy maximum freedom on the battlefield. Then, each man has literally placed his life in the hand of the guy to his right, and trust him to carry out the job. Result was a formidable formation---for instance, Aleksandr the Great used this to its full effect---which was legendry until after decades later Roman's out maneuver them in Battle of Magnesia through the flank (topic of interest, but not relevant to our discussion).
However, it is so easy to preach, and very hard to carry it out, because the trust is mutual. In game theory, Prisoner's dilemma shows how hard (probabilistically) for two untrusting guys to trust each other. For example, with the traffic in the Kandy road, it takes close to 2 hours to drive from Flower road to Gampaha---28km---which says we drive about 14km/hour. I am sure if we all can drive with order, we can get to the destination much faster---I mean how can you drive slower than 15km/h? However, none of us (including me who soon learnt the hard way that no quarter is given there) trust others to not to exploit it if we drive nicely.
So my concluding remark is that trust is such a great thing. Each of us by ourselves can only do so much, and it takes teams to make difference. The trust---or should I say faith, which assures each guy to play his own role, is the key in a great team. But, trust is mutual where it is so hard to keep and easy to break. Every time someone exploit someone else, he contributes to this inertia of untrust by making victim's heart bit more untrustful, and the society (or the team) as a whole takes a step back. You do it over a long time, we get where we are.

Thursday, June 18, 2009

Time Zone conversion using date command

Just found out that we can convert between time zones using the Linux date command.

e.g. date -d '16:00 EST' will convert from EST to current time zone.

Wondering how many more things are hidden inside Linux!!

Wednesday, June 17, 2009

Drools and CEP

Drools 5.0 now supports CEP and workflows. I did not get to checkout the workflow support yet, but CEP using rules is a topic I have been involved while at the extreme Lab @ IU. Although it is not apparent, CEP network (different compositions of event streams) and the Rete algorithm, which is the underline algorithm for Drools, both share much in the sense that both construct a tree to represent queries and match events by propagating them through the tree. We worked on creating a layer on top of Drools to handle CEP, but by supporting events from Drools deep down, Drools have enabled concurrent processing, whereas the layer we build on top of Drools have to be synchronized because Drools is not thread safe. It is going to be a versatile tool to build new applications/ usecases.

Tuesday, June 9, 2009

Sri Lanka, a Brids eye View

This is the clip Sri Lankan Arilines runs few minutes before touching down on SL, no need to say that I am so happy to see it. Thanks for Kaushalya for pointing it out.

Saturday, June 6, 2009

FreeMind Resize Problems

If you try to install Freemind using the most simplest way in Ubuntu 9.04 (Unzip, set java home, do a chmod 755, it runs in to a problem in resizing the window. It can be fixed by setting the enviorment property export AWT_TOOLKIT=MToolkit, and more details can be found in Freemind Linux Page.

Sunday, May 24, 2009

How Big is the Enterpise

Who Has the Most Web Servers? provides some speculations on the number of web servers some well known companies do have. Does companies who out-compute indeed out compete? Fact that most companies does not release the number of servers seems to suggest most of them believe that way.

Data over Fedex is real

According to this Werner Vogels's Post, now Amazon lets you ship (literally via Fedex) your datasets to Amazon and have it uploaded to S3. Also the post points to few papers/ talks about data intensive computing.

Tuesday, May 19, 2009

Hope for a New Age

Finally, the day---which most of us feared that would never arrive---has come to pass. Sri Lankan armed forces have finally brought whole Sri Lanka under one flag, a feat that took us three decades. Let us bow our heads in salutation to each member of the armed forces and to their families, whose sacrifices that made this victory possible. I hope in 10 years from now, all of us will remember their sacrifices, and when we look back at that time, we will see that we made good use of this opportunity so that we could face them without shame.

After years, I felt that on this occasion Sri Lankans have united under same idea and hope we can figure out a way to make use of this opportunity, may be the best we have had after 1815. We must remember nobody will solve our problems for us. Not UN, not the west! Otherwise, why after all those years, we have never heard of a 3rd world nation that stood up with help of their aid and direction and become a developed nation? Why we only hear exploitations and Wars created by others? No! We are alone on this fight, nor will others fight it for us, nor can others understand the situation enough to fight it for us. It is up to us to figure out a way, and stand on our feet.

Wednesday, April 1, 2009

Google going to respond to your emails

According to Google Autopilot, it seems Google going to respond to your emails automatically, mirroring your personal style, and seems they are well beyond Turing test. It will take control of your life, you can happy live ever after.

Everything about this cool app is great except for that today is the April 1st.

Sunday, March 29, 2009

SOAP over HTTP, SOAP over Bus, and SOAP over Fedex

I was at a talk by Genevieve Bell (Anthropologist), and one example I remembered is that how India supported connectivity to few rural villages (for E-Seva initiative I believe).

The village did not have connectivity, but had a bus that everyday go back and forth between the nearest town. What they did was install a Wifi receiver in the bus. When at the village, the bust automatically reads messages from a computer (again Wifi enabled) that is located at the bus stand, and when at the town, it sends all the messages to Internet, and brings back whatever messages the world has sent back.

India is going to have (may be already have) satellites, which cover its breadth, and then this solution will be obsolete. Nevertheless, it strikes me by its simplicity (rather it is outof the box). Different versions of the same idea can be find in other places. For example, in Ploar Grid the use case is like follows (From what I heard). There are lot of equipments installed that continuously collect data across a large region, and rather than setting up a communication network, a small plane flys through the area and collect data from equipments via Wifi. Similarly professor Tanambaum said "never underestimate the bandwidth of truck full of tapes", and in the paper "Above the Clouds: A Berkeley View of Cloud Computing" authors recommended that it could be cheaper to Fedex the disks to the cloud computing provider.

Also, there are another set of use cases are emerging. With use cases like Large Hadron Collider and Large Telescopes, the size of data is going out of bounds. For example, March IEEE Spectrum reported an optical receiver with 640Gb/sec. With these systems, peta bytes (10^15) of data are common. Problem is even with 10Gb/sec Ethernet (yep Teragrid is connected via 10Gb/sec Ethernet) takes 20 minutes to send 1 tera bytes, and it takes 11 days to transfer a full peta byte. Therefore, it might be common in the future that we receive literally a container full of data.

These kinds of asynchronous (with very big latencies) communications provide different kinds of interactions, and call for different types of use cases. It is a challenge to figure out how best to use them, and how best to present them to the user. For example, client side validation and preprocessing is very important, and it might make sense to add additional data, which might be useful to the result. For example, if you are searching Google through this way (nobody will if they have a choice), you might need to return all the results not only links (may be small crawl of first few results) etc.

Saturday, March 28, 2009

The Story of Stuff

This is a pretty controversial view of the how market/consumer/style driven economy works.

In one or two places it does over simplify (e.g. with computers, just one small piece added part). However, there are truths in it. Actually, more or less "watch TV -> You sucks -> go and work -> buy things -> watch TV" is part of our lives. It is more less the effect imposed by criticizing eyes driven by styles and trends. I do not know how true are the numbers, but if 50% (they say it 99%) of things are thrown off in 6 months, we have a problem.

The original can be found in The Story of Stuff with Annie Leonard.

Friday, March 27, 2009

Is Cloud Computing Really Ready for Prime Time?

The article by Leavitt [1], on January Computer magazine, is a nice, and in my view impartial, discussion on what cloud has and can bring in to the table. It points to few problems that are still at large.

Also the blog post [2] by James Governor, argues that hardware as the service model of Amazon is the way to go. I agree that nice simple model of AWS simpler, because it enables users to port with relatively less changes, and of course "simpler is better". However, the higher level of abstractions like App Engine could provide more features like failover, or auto scaling (I mean auto scaling the application, not just increasing machines). Among questions are how general will those features, how much changes do they need to exiting systems, can they solve associated hard problems?

[1] Neal Leavitt, "Is Cloud Computing Really Ready for Prime Time?," Computer, vol. 42, no. 1, pp. 15-20, January, 2009.
[2] Amazon Web Services: an instance of weakness as strength

Thursday, March 26, 2009

Finishing My Thesis Defense

I finished my Thesis defense yesterday. But actually seems it is old news now :); most people already know through Dr. Sanjiva's Blog. I still have to do few additions and updates to the thesis, and we are planning to return to Sri Lanka when I am done. I will later post thesis, abstracts, and slides.

My topic is "Enforcing User-Defined Management Logic in Large Scale Systems". My adviser is prof. Dennis Gannon, and the rest of the committee are prof. Beth Plale , prof. Geoffrey Fox, prof. David B. Leake and Dr. Sanjiva Weerawarne. I would like to thank prof. Gannon and the rest of the committee whose insights and encouragements made this thesis possible.

Furthermore, I would like to heartily thank Dr. Sanjiva, first of all for convincing me to read for a Ph.D---as my friends know, I was pretty decided not to do one by my third year at Moratuwa--- and for his unceasing attention, help, and advice though years. If not for him, none of this would have possible. Also my heartfelt thinks go to my wife, Miyuru, my parents, and my bother, for their help and support.

All Six people who originally worked on Axis2 from LSF are in grad school (Jaliya, Ajith, Chathura, Eran, Deepal), and also there are many more who followed them (more detail here). We will see many Ph.Ds from these people soon. However, earning Ph.Ds will be only a small step towards where we want to go; there is lot of hard work ahead.

Friday, March 20, 2009

Introductory Video on the LEAD project

This is an introductory Video on the LEAD project (Linked Environments for Atmospheric Discovery), which we (Extreme Lab) have been involved for last 5 years. Very brief outline was given here. Details can be found in

Sunday, March 1, 2009


Just come acorss Wikimedia, wikipedia's media counterpart. For images for presentations etc, Wikimedia and Open Clipart are great sources. Open Clipart has additional benefit of having svg images, and I usually use OpenClipart + Inkscape to create my presentations.

Wednesday, February 18, 2009

Need for New Global Conventions by Dr. Thrishantha Nanayakkara

Dr. Thrishantha Nanayakkara has written this article, Need for New Global Conventions, in Harvard Crimson about the conflict in Sri Lanka. I wonder President Obama still read Harvard Crimson.

One thing international community does not realize (or rather ignore) is that they are susceptible to manipulation. There are many ways to fight a war, and if one do want to do something bad, either he can do it himself or manipulate information to get someone else to his dirty work (someone powerful enough!). Since international community does not bother to check the background, check history, and do a independent evaluation, rather pass judgment by case by case, they are susceptible to manipulation. That is how they gain mistrust.

Saturday, February 7, 2009

Comparison of Political Philosophies

I found this comparison of Political Philosophies, "Comparing Liberal, Conservative,
and Libertarian Answers"
By David Bergland very interesting. It is presented as a Q&A session, and one thing I take home from that is there is no one correct answer.

Thursday, February 5, 2009

What is WSO2?

VNC and Clipboard

I worked with VNC (server Linux) and Win XP client without clipboard working for a long time. At last, I decided to google for it, and find out that for the clipboard to work, I have to run the command vncconfig -nowin & as well from the server. Details can be found from here and from vncconfig man page.

Tuesday, January 20, 2009

Inaugural Address

Today President Obama, the 44th president of US sworn in, and lot of people are looking froward for him for change. We hear it discussed, sometime even in lectures, spelled out by professors themselves. Here is his Inaugural Address (transcript) , I like his addresses, even though he is not a powerful speaker, he uses pause to a great effect, and is able to rise emotions.

Also this is the Lincoln's second inaugural address, which is considered one of the best, and it includes the famous quote, "With malice toward none; with charity for all; with firmness in the right ....--Abraham Lincoln", and John F. Kennedy: Inaugural Address.

Monday, January 19, 2009

King Xerxes of Persia and beholders eyes

I watched the movie, One Night With The King couple of days ago, apart from being a nice movie one thing that stuck me was how different the King Xerxes is portrayed in this movie compared to the movie 300. My guess is former is much closer than 300, however it is ironic the how different things are depend on the point of view.

Sunday, January 18, 2009

Google Knol & Fallacies of Distributed Computing Explained

This is interesting,Fallacies of Distributed Computing Explained.I found it in Google Knol, which according to Google is a place to share knowledge. It is a collection of authoritative articles on specific topics, and as usual they depend on crowd sourcing.

Thursday, January 15, 2009

Is Google Making Us Stupid?

Interesting article, Is Google Making Us Stupid? by Nicholas Carr, written by the author of the book Big Switch which I blogged about few months back (It is a reading in one of classes, could not help writing a blog after I read it). He observes that with the internet we are more and more used to skim through and jump from link to link, a habit he suspects that may have a negative effect on our brain, alienating us from serious and focus reading.
But, his evidence does not run very deep, mostly they are personal observations, however, when I think about my own net browsing habits and what I seen others do, I feel may be there is a ring of truth in it. (However, at Grad school, there is no shortage of serious reading!! I am safe :)). Nevertheless, as he himself pointed out, when "writing was invented", and "printing was invented" people complained lot, so on and so forth, and at each case our brained proved to up to the task. Humans are good at adapting, and with luck our brain will continue to do so.