Friday, June 27, 2008

Import Apache Qpid in to Intellij Idea

During last couple of days I was struggling to import Apache Qpid java in to Idea (Intellij Idea) and start the broker with Idea.My main target was to debug the broker using Idea. But there were few modifications to be done.I thought this will be useful for the people who are new to Qpid.

1. First build the Apache Qpid java using following commands or please refer to the how to build in Apache Qpid.
  • mvn -Pfastinstall
  • cd distribution
  • mvn (This will create all the artifacts )
  • tar -xzvf target/qpid-1.0-incubating-M3-SNAPSHOT-java-bin.tar.gz
In here the file name is depend on the version of the Qpid you are using, somehow you have to extract java binary.Then navigate to the extracted directory and set the QPID_HOME variable to that directory.
Now you are in a possition of running Qpid in commandline so you can try this out by following command.
  • $QPID_HOME/bin/qpid-server
Now come back to importing in to Idea. Go back to the source folder of Qpid java and run the this command inorder to build the Idea project.
mvn idea:idea
This will create an Idea project so you can open the project using Idea but the problem is you won't be able to run the java broker on Idea and you won't be able to debug the broker. So in order to make it happen you have to do several modifications. First we have to hardcode the Qpidhome, although we have already set the environment variable it's unable to access them when we start the broker using Idea.
Please have a look in to following diff files and you'll get to know how to do those modifications. diff files.
When you do modifictaion don't apply the patch directly please have a look and do the modifications according to your installation which means your Qpidhome is different from my one.After doing three of those modifications compile the project in Idea and run it, It will work. If this doesn't work for you please be kind enough to comment on this post.

Thanks

Friday, June 20, 2008

Exokernel Concept

I'm doing the module Advanced Operating Systems and while I'm reading on that I found some interesting topic called Exo-kernel Operating systems.
This was initially proposed by a research group at MIT in 1995. This is a concept which is very useful when it comes to arena of developing high performing applications and this concept is really controversial when we concern about the idea people had about operating systems.Previously people thought about operating systems as a piece of software which hide all the tricky information from application developer and user of the system.But when we concentrate about the performance this abstract layer leads to a huge performance hit due to this fixed abstraction.
As an example if we concern about a Webserver it will keep on increasing it's cache although it's exceed the main memory since the operating system itself handle the memory using the virtual memory so application doesn't have any idea about what's going on inside.So this leads to reduce the performance of the web server.
Likewise using the high level abstraction is always reduce the flexibility of the application development and limit the performance and functionality of the system.So what they suggest with this exokernel concept is kernel (exokernel) will handle the hardware multiplexing and resource protection while application itself will handle all the resource management using their own applicaton specific policies. So what happen is application developer is suppose to implement a piece of software called library operating system which do all the resource management and the kernel will take care of multiplexing the hardware. But the main challenge of this concept is every application has to develop it's own library operating system and this leads to a real overhead.Exokernel researchers develop their own library operating system called ExoS and an Exo kernel called Aegis and they did some benchmark with their resources and click here to see that...

And they have developed a web server called cheetah which use it's own library operating system which is specific for a web server and they used infomations like knowledge about HTTP to bind with IO and they are not copying data but they send data directly to the client from it's cache. So this is the performance difference they had with that cheetah .. click here

So Exokernel principle is something which seperate the hardware protection from resource management from a typical operating system.With exokernel it's not trying to give a virtual machine to each and every application but it's tying to expose hardware to the application while protecting hardware resources from untrusted application.Inorder to implement the protection with exokernels they use this techniques
  • Secure Binding
  • Visiblel Revocation
  • Abort Protocol
Secure binding is a way of protecting resource by binding them with the library operating systems in order to impelement it they have use several techniques like hardware protection, software protection and download code.Visible revocation is revocating resources with keep in contact with the library operating system, with normal applications revocation happens invisibly as an example when kernel wants to deallocate a particular page it doesn't go and ask from application but what it does is simple deallocate the resource but in here kernel deallocate memory by asking from the library operating system. And at last Abort Protocol is a way of break binding when library operating system is unable to respond to the kernel.So here what happen is when libOS is unable to respond to particular request it breaks appropriate resources which bind with library operating system and let the application to know that.

Those are the information I got about exokernels and more commanets will be very useful.

Thursday, May 8, 2008

Extract JMX information from a remote MBean server

I was able to write a code which is capable of extract all the MBeans with a given domain and print all the attribute value and attribute names of each and every MBean.
Here's my code...

If you want to extract all the MBeans which are registered with the connected Server you can simply pass two null value to the method queryNames method.

Monday, May 5, 2008

HP 520 Laptop with Ubuntu

I bought an HP 520 Laptop from Sri Lanka which is worth 800USD. And I wanted to install Ubuntu 7.10 on my new machine and I was bit of suspicious whether it supports for all the harware in my machine. After successful installation of Ubuntu 7.10 I was able to review that It supports for Intel Pro wireless device but unfortunately It doesn't support for sound card.So I decide to swich in to Latest Ubuntu release 8.04 which was release before one week and it works fine for my HP 520 Laptop. But honestly I have certain problems with the OS in my machine.
1. When I hibernate it hibernates and when I start my machine in next time It works fine for few minutes and it get stuck...

2.After working for three or four hours my machine is becoming quite slow and there's no issue with the memory usage and processor usage. Yesterday night I was working on Idea with opening two Idea windows and slow down happened all of a sudden and I was able to find my swap usage became 100% so it's obvious to slow down my machine.

I'm not sure about the problem this might be a problem with my hardware or may be a problem with the OS.I feel like switching for Debian but I love Ubuntu..

If any body knows any solution please leave a comment...

lahiru

Wednesday, April 23, 2008

Selected for Google Summer of Code 2008

I had a dream of doing a Google summer of code since the day I heard about that. Due to the great time I spent at WSO2 I was able to learn how to communicate in open source world and It really helped me to make my dream success. I was able to get a project in Apache incubator which is Apache Qpid.
Apache Qpid is a multiple language implementation of AMQP( Advanced Message Queuing Protocol). In my project I have to develop a command line interface which is capable of extracting JMX information from Qpid. Since Qpid already have a JMX interface to manage those JMX information I just have to develop the JMX connectors which runs in the shell. The important things in this project is the development of command line interface since most of the people used to ssh in to remote machine and work on that particular machine then running xwindows on remote machine is a pain. So the best option is to use a CLI for monitoring things.

Hope to write some more about my Gsoc project in future. May be about JMX and Java stuff...

Sunday, December 16, 2007

Thanks for your great assist

There's one of my school friend .He took a laptop to me as
a gift...That's really really useful for me..
Thanks.

Saturday, December 15, 2007

Hi folks,

My professional Life

I'm Lahiru,I'm an undergraduate in a state University in Sri Lanka (University of moratuwa) and major in computer science and Engineering.Now working in WSO2 as a trainee Software Engineer.
Professionally i like to be a good software Engineer but as usual my desires get change time to time.Sometimes i feel i'm crazy guy when i change my mind time to time.As an example sometimes i feel that i should do Post Graduates by going abroad and sometimes i feel stop all these technical stuff and switch in to some non technical job and another time i feel that i should leave out all these things and go to a monastery and be a monk.....Thats' how i am...Who knows what sought of a person will i be..In my professional life i have few people whom i like to imitate those are Dr Sanjiva Weerawarna, Samisa Abeysinghe, Dinesh Premalal and Vajira Ginneliya.

Professionally I'm an open source person and really really impressed by Ubuntu 7.10 release.I'm using emacs as IDE and be careful if you start on using emacs you'll be really addict to it.You'll never use vim,vi or even cat commands if you start on using emacs....

If i speaks about my current desires i wanna work very well at WSO2 and be an Apache committer. At wso2 i'm working mainly with Apache Axis2c which is a soap engine which runs as a Web Services Project in Apache Software Foundation.
At WSO2 we are developing Web Services Framework on top of Axis2c.We have a main product called WSFC which is totally written in C and it contains all the WS-Specifications like

WS-Security
WS-Relieble Messaging
WS-Policy

Using WSFC they develop several other scripting framework which can run on top of WSFC.WSF/PHP WSF/Perl WSF/Ruby are the basic products.At the beginning of 2008 WSO2 going to release Apache Axis2c 1.2 and WSFC 1.2.

My family life
That's a quick and simple discription of me if i start from the very beginning I was born in a small lovely town(Galle) in Sri Lanka.My mother is Janaki Chandrika Wimalasundara and my father is Ginnaliya Gammathige Gunathilake.I'm happy to say that i'm the second of a family with four brothers.My elder bro is Tharindu Gunathilake who's also an undergraduate in right now and my third bro already did Advanced level and his only ambition is to be a doctor youngest one is still schooling.That's about our small family.
My father doesn't have a proper job since he used to switch from one job to another time to time then we have some economical problems in our family.He's a diabetic patient since 1984 and he has addicted to smoking.Hopefully now he's gradually stopping those bad habits.I hope we all can spend some happy time after few years..But who knows what'll happen...!
In my life my mom plays a gigantic role as usual for all other people, if there's a success in my life mom was there for me in all those achievements.Her only ambition is to make her four sons good citizens in the country.I think she is already achieved her targets...But still more to go...Still we doesn't have a house to live and now we are living in a small wooden house which was build at the back of my grandma's house with the assist of my mom's brother.I never ever forget that tiny house since that is the place which gave me all the success that's the place where i lived when i was studying for Advanced Level.

My Personal life

I started my education life from one of the best school in my country.My school was Mahinda college which is situated on top of a small mountain.When i was in primary my only interest was to play play play....We guys used to go to near play ground and start on playing cricket whenever we get permission from my mom.
I spend my school time in same manner until i come to grade 10.During those years I played Basket Ball and Base Ball and i was the captain of out school Basket Ball team and Base Ball team.

But all of a sudden i felt that i should stop all these playing and start on studying hard and make my mom happy.There were two people who affect me to get that decesion those are Vajira Ayya and Galba(my school friend).Big thank for those two guys...!Otherwise i would be a different person.Then once i started work in grade 10 was able to be the first in first time then onwards i was able to improve my studies until i finish my lovely school time.Here i have to mention some of my school friends Galba,Akhila,Pasan,Jangi,nisal,Azees,Bandu,sanda,mola,harsha,soori,peshan,ashan,...and there are lot more...
I had a cousin who was a extremely unique student during his A/L time then i wanted to be a guy like him..i wanted to get the meddle given by school for the best physics student then that dream lived with me until i finish A/L.I'm so happy to say that i was able to achieve my target by getting the best A/L results out of my classmates in 2004.
During my Advanced Level time i had some other desires as well..There was a girl who came to most of classes i went i felt to make her my girlfriend...But that was in vain and i never forget that since it's one of the place where i was fail to achieve my target..
Then i entered university of Moratuwa and started on working hard since i wanna select for Computer Science and Engineering.Hopefully i was able to select for computer science and i'm very happy at our department...
I have a person whom i like to use as a model to follow.. he's one of my mom's cousin Ajith Welihinda ..Most Humble person i've ever seen in my life...