Monday, June 28, 2010

GMail targeting under 1sec load time with HTML5

According to Google, many of the upcoming features of GMail are going to be  HTML5-ready. They hope HTML5 will speed up loading and execution time of GMail. Google’s goal is to get their Web-based email service to load in under 1 second. While going through the original article I noticed a couple of interesting things.

Speed is a feature!Truly it is. I do believe speed is one of the most critical decision factor when it comes to selecting a software application. To be honest I am very much happy about the load and execution time of Google, but they are looking for more. Interesting!.

Currently, the Gmail program is comprised of 443,000 lines of JavaScript, with 978,000 lines if comments are included.I did actually not know that it was written completely in JavaScript in the first place. The interesting point is roughly each line of JavaScript is accompanied by one line of comment. That implies how vital the comments are in a software programming and of course how complex the GMail logic is ;-).

Wednesday, June 23, 2010

Qpid Site Gets a Major Revamp!

Apache Qpid site gets a major revamp. It looks really awesome. Great work guys!

Tuesday, June 15, 2010

Airplanes punch holes in clouds and make it rain

cloud-hole-punch This is a very rare scene in the sky. A recent study reveals that these punches are formed by airplanes. According to scientists droplets in clouds exist in a supercooled state, well below freezing, yet remain in liquid form. When planes go through these clouds, they cause a drop in temperature that freezes these droplets. As a result part of the cloud gets converted into ice crystals forming a punch hole. These ice crystals fall to earth in the form of snow or rain. So, this is another way airplanes mess around with the weather.

Monday, June 14, 2010

How to fix : DoModal inside a DLL Crashes with VS2005 SP1

ISSUE :

I had been experiencing a strange crash in my application since I installed VS2005 SP1.

It was an MFC-based add-in (i.e. a DLL) for MS Excel which did a DoModal internally to show up a Dialog. When I debugged I saw that the culprit was the following code segment in dlgcore.cpp.

image Basically the AfxGetApp() returned NULL leading to an assertion fail.

FIX :

I inserted the code CWinApp theApp; in one of the source files in my DLL making a CWinApp-derived object available to the DLL. That solved my problem.

Thursday, June 10, 2010

How to Debug Apache Qpid Broker with Intellij IDEA

Apache Qpid/Java no longer has a Apache Maven build as it’s build system was moved to Apache Ant some time back for historical reasons. Therefore you can not do usual mvn idea:idea gimmick to generate IDEA project files. You can create an IDEA project from the scratch but it is unlikely someone would bother to do all that. So, the only viable solution is to use Remote debugging facility in IDEA. This is how you could go about doing this business.

Basically you need to start Qpid broker in debug mode – JPDA mode to be precise - and have your IDE connect to the remote JVM through an IDEA Remote Debug Configuration so that you will be hooked into the remote JVM and get triggered for the calls that are being made.

You can could start the Qpid broker in JPDA mode by passing the command line argument –run:jpda to your startup script. On windows it is qpid-server.bat –run:jpda. The broker will start as a JPDA listener. You can set the wire protocol transport using the JPDA_TRANSPORT environment variable that defaults to dt_socket. You could also use dt_shmem on Windows platforms in case you need to use the shared memory transport. You can set the address (port) using the JPDA_ADDRESS environment variable that defaults to 8000.

Since we do not have an IDEA project for Qpid, we just create an empty project and attach source to it. Once that is done you could follow the steps given below to setup the debugger to use JPDA.

1. Go to Run –> Edit Configurations

image 2. Add a new configuration instance of type Remote

image Set Transport depending on what you set in the broker startup script, Socket for the default case. Set Port accordingly, 8000 for the default case. You may also set the configuration instance name – Unnamed in the screen shot - and press OK.

3. Start your broker using the command qpid-server.bat -run:jpda

4. Launch debugger using Run –> Debug and you should see the following message in the IDEA console.

image 5. Set breakpoints as you wish and start debugging. Happy debugging! :-).

AMQP 1.0 Prototype IM Client

I downloaded an AMQP 1.0 desktop IM client from AMQP 2010 F2F homepage. The broker was running on the cloud – on an EC2 instance in Virginia to be precise - in this case.

image

The coolest thing about this tool was its protocol trace that showed AMQP frames and message flow. I was fascinated to see real AMQP frames in a real world application.

image  Absolutely awesome!

With Apache Qpid Back Again …

I have been contributing to Apache Qpid for more than two years now. A major contribution I did was helping make Qpid/C++ Windows port a success. This is what Steve had to say about what I had done ;-). I should admit the fact that without Steve’s involvement Apache Qpid/C++ Windows ports would have been an utter failure. Kudos to Steve!.

These days I am having a deeper look at Qpid/Java security model as I need to get it working with one of WSO2 projects. It is indeed going to be a really exciting work. I will not forget to post updates here!.

Monday, June 7, 2010

Data deduplication in a nutshell

Data deduplication is a special form of data compression where redundant data is eliminated improving storage utilization. In a nutshell, in the deduplication process duplicate data is eliminated leaving only one copy of the data. However indexing of all data is kept for restoring purposes. Obviously data deduplication helps reduce storage capacity as only unique data is saved in the disk.

Lets have a look at an example.

A considerably large image of size 3MB taken during your summer holiday might contain 100 instances of the same block of pixels. Lets think the size of each block is 10k (to be realistic lets imagine its an images of a lake with a scenic pasture in the background … fair enough ;-)). With data deduplication the size of your image comes down to something like 2M because the total size of redundant blocks adds up to 1M (i.e. 10k x 100). Just imagine the storage utilization you would gain in an enterprise storage implementation!. Its quite a lot.

Also, data is money at the end of the day. If you look at most of the storage services that are there at the moment you will see that they are comparatively expensive. Therefore data deduplication will come in handy when it comes to storing large dumps of data.

Tuesday, June 1, 2010