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.


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.