August 22, 2008
Some projects we work on, gives us a deja vu feeling. One feels like “I have been thru this already” … “Oh … the same old thing again”. But some projects take us into an unchartered territory. There is a sense of fear (of failure) and a sense of challenge. Intense learning comes from sincerely working on such projects. Such opportunities don’t come by very often. Recently, I had one such experience with Performance Load Testing of a web application.
This wont be a how-to-do a performance testing kind of a thing. There are already many, written by experts. Instead, I would focus on 4 key learnings that I derived out of this experience. I feel, this is unique in its own way, and hence worthy of being shared.
This will be the first part of the 5 part post that I intend to blog. In this introductory post, I shall set the context and name the four key learnings. I do this, partly, to commit myself to write about the four learnings in detail in the coming days.
The Context
For an online competition product, I had to estimate the safe concurrent load that it can take on a server of a given configuration. The web application is built on J2EE (using Servlets & PoJos).
We used a completely Open Source stack
Server – Dell 6950, 12 GB RAM, 4 Dual Core AMD 8214, 64 bit
OS – CentOS 5
Load Balancer – HAProxy
Web Server – Tomcat 5.5
Database – MySQL 5
Development – Java Servlets, Java POJOs, FreeMarker, JavaScript
The Java Runtime Environment used was a 32bit environment (which means only 2 GB max memory per VM, btw we use Sun jdk 1.5.x ).
The key learnings were
1. Know your load
2. Know your tool
3. Know what to expect
4. Use your brains
More on these learnings soon.
Leave a Comment » |
Web server, opensource, programming | Tagged: freemarker, HAProxy, java, mysql, performance, pojo, Testing, tomcat |
Permalink
Posted by Intensity !
August 12, 2008
Open Source means different things to different people. I am not going to explain what it means. There are umpteen resources available like this one.
When I was the lone Open Source champion in my friends circle, I had to field a whole lot of questions. Being myself a novice, I had a tough time fielding those questions. Some of them went like “How do you think it would sustain ?”, “Have you ever donated for any open source project that you have used ?”, “How often have you seen the code?”, ” This free thing wont last long.” Many Open Source projects have been ditched … and so on.
I wasn’t troubled by many of these questions except for these …
1. Have you paid/donated for using Open Source software ?
2. How often have you seen the code ?
Many companies today would not have come into existence but for Open Source. Open Source software has made it easy and inexpensive to get going. This site suggests Open Source alternatives for almost any proprietary software that one comes across. I use fair amount of Open Source software myself and am on constant hunt for more and more of such stuff. I recently came across this. Certainly there is some guilt feeling that haunts me for not having donated for the Open Source Movement either as cash or code.
My experience with Open Source so far has convinced me that ‘free as in beer’ facet of Open Source has been the major criterion for its reach. But to the question (1) above, my answer is ‘NO’. But soon I would be getting rid of that guilt. Now to answer (2), there is a 99% chance that I don’t look into the code, for the simple reason that I didn’t have to. I would like to share my lone experience tinkering with an Open Source code.
For a user forum, we tried JForum. As we needed tighter integration with the rest of the application, we had to modify the code. V, my colleague, did a great job at this. At the end we were inspired by the design and the code organization of JForum that all new developments imbibed the virtues of JF. The code was readable and making changes were painless. In fact it was much less painless than making changes to the code of our ex colleagues, who had bequeathed to us a fantastically sadistic piece of spaghetti code.
It did not stop with this. As we run our applications on cluster, we had an issue with JForums cache. The cache was local to a tomcat. We needed a common cache. We found that there wasn’t any JForum-memcached integration done. V plunged into action and created the (supposedly) world’s first ever JForum-memcached integration. It was now a marriage of two Open Source projects solemnized by V.
Despite my repeated pleas to V, to document the JForum-memcached integration layer and to give the code back to the community, V is yet to heed. I hope this post would knock off all inertia in V and make V’s contribution to the Open Source world … and as usual, I will steal a bit of credit for having motivated V to do so
2 Comments |
opensource, programming | Tagged: jforum, memcached, opensource |
Permalink
Posted by Intensity !