Friday, December 25, 2009

Wolfram Alpha - Computational knowledge engine

Wolfram Alpha is an answer engine which provides ANSWERS to structured queries (e.g captial of sri lanka), rather providing a ranked list of web pages that most popular search engines would do. This engine uses automated reasoning to infer other results which is most useful for users. Thought the inferences that the engine makes is not currently amenable for my knownledge as of this writing, it gives very useful inferences. For more information read this and this.

Note:
I explicitly made the error in search query; "captial of sri lanka" (captial rather capital) to show how inferencing is done on the context of the search query.

Thursday, September 10, 2009

Gtk-WARNING **: cannot open display

When you ssh to a remote machine and want to execute a graphic bound applications such as JFrame etc, use ssh with -X argument. -X is for forwarding.

ssh -X user@host

Sunday, August 30, 2009

How to install kernel headers to build modules against the Xen kernel - Amazon EC2

If you are using a Ubuntu/Debian AMI, and need to install kernel headers to build modules: apt-get would not work almost all of the time. You would probably end up with doing something like following,
root@domU-XX-XX-XX-XX-XX-E1:~$ apt-get install linux-headers-`uname -r`
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Couldn't find package linux-headers-2.6.21.7-2.fc8xen
root@domU-XX-XX-XX-XX-XX-E1:~$
I used the following method to get Kernel headers and compile a VMWare 2 instance. This method will always work,
wget http://kojipkgs.fedoraproject.org/packages/kernel-xen-2.6/2.6.21.7/2.fc8/i686/kernel-xen-devel-2.6.21.7-2.fc8.i686.rpm
alien -k --scripts kernel-xen-devel-2.6.21.7-2.fc8.i686.rpm
dpkg -i kernel-xen-devel_2.6.21.7-2.fc8_i386.deb
ln -s /usr/src/kernels/2.6.21.7-2.fc8-xen-i686 /lib/modules/
2.6.21.7-2.fc8xen/build
ln -s /usr/src/kernels/2.6.21.7-2.fc8-xen-i686 /usr/src/linux
Make sure to include symbolic links to .configure to work properly.

Thursday, August 27, 2009

Virtual cloud? or something like that

Everyone on the plant is really interested in cloud computing these days. There are many organizations specialized in providing HaaS services. Is it possible for someone to build their own cloud, if one could find a hardware rich machine. Yes!, it is. Lets call this is a virtual cloud. How can a virtual cloud is built?. Simple, use VMWare 2. Let see what I did,

1. I have two machines. A hardware rich machine A (172.19.0.32) and some other machine B (172.19.0.44).

2. I downloaded and installed VMWare 2 in machine A. This version is free and you will get an access key free too. Follow the simple instructions to install VMWare 2. VMWare 2 has a very powerful web console. Default http port is 8222 and https port is 8333. To install VMWare 2 in Ubuntu, follow these instructions.

3. Now I am going to create an VMWare image to install Ubuntu 9.04. Ubuntu is my all time favourite Linux distribution.

4. From machine A, open up a Mozilla browser and type http://172.19.0.32:8222. Login using "root" and the password. Create the VMImage for Ubuntu 9.04. If you are using the "console" tab for the very first time, browse will ask to download VMWare Remote Console Puglin. Download and restart the browser.


5. Create many number of VMImages. Use different distributions. If you want you can use Windows too. Logout after this.

This is the place where we can introduce the notion of a virtual cloud. Each VMImage can be treated as a node in a cloud. There is one limitation though. This cloud can grow up until it runs out of VMImages.

6. I have created my virtual cloud in the previous step. How can I access it from out side. Lets go to machine B. In my example machine B is in the same network. Access the VMWare 2 using http://172.19.0.44:8222. Login as "root" and password. I need to find out administration permissions documents to create users to access VMImages but "root".



7. In this example, there is only one VMImage. Select it and power it up. You can turn on many VMImages.




This way you can create your own private virtual cloud.

Amazon EC2 allows users to create custom AMIs. Unless one does not have an agreement with them, one can not build AKIs and ARIs. If I do the prior in an Amazon EC2 node, I would definitely be able to run a distribution with my kernel, without worrying about underlying necessaties. This process might be possible to try in any cloud service providers.

One would ask, why would you want to do this after all. Well I am a grad student and this is fun!.

Thursday, August 13, 2009

http://blog.saminda.org/

I have registered *.saminda.org domain for myself at last. Domain registration 101, http://blog.saminda.org/ is for my blogs. Enjoy!

Monday, August 3, 2009

Thursday, July 9, 2009

Vitro - Integrated Ontology Editor and Semantic Web Application

Vitro is a general-purpose web-based ontology and instance editor with customizable public browsing.

With Vitro, you can:

  • Create or load ontologies in OWL format
  • Edit instances and relationships
  • Build a public web site to display your data
  • Search your data with Lucene
One of my previous blog posts talk about Protege ontology editor. One could use Protege 3.4.1 (latest release when this post is written) to create ontologies and import them to Vitro to create a powerful web portal.

Saturday, July 4, 2009

Protégé-OWL

Protégé-OWL editor enables users to build ontologies for the Semantic Web, in particular in the W3C's Web Ontology Language (OWL).

An OWL ontology may include descriptions of classes, properties and their instances. Given such an ontology, the OWL formal semantics specifies how to derive its logical consequences, i.e. facts not literally present in the ontology, but entailed by the semantics. These entailments may be based on a single document or multiple distributed documents that have been combined using defined OWL mechanisms

OWL has been the de-factor standard to capture the concept of knowledge base of a domain.

Apache Hadoop Core

Apache Hadoop Core is a software platform that lets one easily write and run applications that process vast amounts of data. It enables applications to work with thousands of nodes and petabytes of data in a distributed environment.

This application is based on Java (>=1.6).

References:

[1]. http://hadoop.apache.org/core/

[2]. http://en.wikipedia.org/wiki/Hadoop

[3]. http://en.wikipedia.org/wiki/Filesystem_in_Userspace

Wednesday, July 1, 2009

Bing.com search engine from $

Check out this new search engine bing.com from Microsoft. I am quite impressed with the map section.

Friday, June 26, 2009

PHP 5 on Tomcat

Recently I came across this article on configuring Tomcat (>= 5) to interpret PHP 5 scripts. This is developed by Quercus. There is an open source version with GPL license. (oh no!).

Anyways, one can configure Tomcat to work with PHP in 30 seconds and it is quite interesting. There are three jars associated with this task, quercus.jar, resin-util.jar, and script10.jar.

Well these jars are not OSGi compatible. It is simple to convert these to OSGi bundles and I am really looking forward to see how these behave in Equinox. You can have servlets, jsp, etc plus php in one container. Owesome!.

Thursday, January 1, 2009

Feliz 2009!

I wish everyone a happy, joyful and fruitful new year!

In Spanish feliz means happy. I was so fortunate and honored to spend the new year's eve with one of Spanish families' here in Miami. Trust me on this, Spanish people have mastered the art of partying!. I had the opportunity of learning some customs and traditions that revolve around Spanish way of celebrating the new year. We ate 12 grapes before midnight, a wish at every grape, last grape sharp at midnight, wishing all those wishes will come true in new year. The other tradition was, some people and including this family walked around the block with their traveling bags that they believed it will bring them enough wealth to travel around the world in 2009. In the midst of everything, I had a Salsa crash course, which made me moving to the beat. I was quite a fast learner!. The other great thing was I had the opportunity of experiencing authentic Spanish music where billa and kaparinya (if spellings is incorrect, please help me to correct it) inherited from. With my very limited Spanish understanding ability I manged to consume 1% of the conversation at the night. Rest, they were kind enough to translate it to me :-). This family treated me as their own and I felt that I was not alone in Miami after all!. I sincerly thank this wonderful family in bolttom of my heart for inviting me for such a wonderful occasion.

I am looking to 2009, excitements, challenges & everything, and with God grace I hope everything will be worked out fine for everyone in new year and the rest of the years to come!