The growth and power of mobile devices

The following is the recent statistics of my agriculture based website

It is amazing to see, Internet Explorer is in the fourth place, and the third place goes to mobile browsers.


The following graph shows the split up of the mobile devices.


mmm. interesting!!


Monitoring JEE applications

Development of Java enterprise applications had evolved over a period of time, We can say we are in a legacy period now with the help of modern frameworks and packages. I could see lot of developers start talking about Grails, many of them started learning Groovy scripting. It is amazing to feel we can make a Java enterprise web application with all modern libraries and UI frameworks integrated in just 10 minutes!!! Thanks to Grails. Application become less error-prone and development becomes an enjoyable one with the modern frame works. Lazy developers like me are so happy to know he is not going to write javascript for UI, SQL queries for backend access. While we giving importance to rapid component development and integrations, these libraries become inevitable.

On the otherside, one should worry about performance. It is painful to think about the CPU consumption of the browser while loading packed AJAX libraries, the number of SQL queries being fired to complete a simple task, the number of connections opened/closed to execute those queries, the load applied on JVM in terms of high CPU consuming threads or concurrent processing without threads getting blocked. When multiple tiers involved, debugging becomes a pain. While we don’t have sufficient time for development, we can’t afford for the resources to spend much time debugging each and every tier. A simple slow down at my DB backend, slows down my enterprise application. But my developer finds it after 5 working days because, he already spend one day each for user interface, Spring beans, ORM integraton and finally Hibernate tiers!! Monitoring them as silos din’t work out. All our admins tries to prove their box is doing good! It is worth to search for a tool which can monitor all of them as a service.

Here is a case study.
We take a simple web application running in Tomcat 6.
It uses Struts 2 for View, Spring 3.1 for Model, Hibernate 3 for Spring ORM with MySQL backend. We run one Apache web server where Phpmyadmin is running for the same database using by java application.

The application was running without any issue in the beginning. We used to upgrade it as we add new modules. Recently we found the application is not responding for logins. We could see the when we try login, the request is on progress for ever. We could see ‘Waiting for…’ without time-out! As any critical issue, this one also din’t have any trace in application process log, tomcat log. It happens sometimes 🙂 Without waiting for me, the server dies in another 3 or 4 hours!

A good idea is post it in the forums, But where? Java? Struts? Spring? Hibernate? Mysql? I have no trace with me! As a lonely programmer, I need to find out where I shoud start now. I added all the components in my monitoring solution and restarted Tomcat. I got the results when the problem occured again.  All the requests are pending in ‘user login’ block. I have an audit code, which will write success & failure login attempts to database, It is waiting for SQL connection for hours!! All the login requests are pending as ‘Waiting’ threads.

See the graph given for two days. You could see the blocked thread count increased from 10 to 212 on periodic intervals.

  • Red dots indicates the time at which the application stops responding to the users.
  • Yellow dots represent the appliation crash time.
  • The sudden drop shows the manual restart of the application.

Very many threads are in blocking state with the following trace.

Stack Trace     :
java.lang.Object.wait(Native Method)
$Proxy17.add(Unknown Source)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process($ Source)

Now we got a handle from which we need to start.

I got an immediate reply from spring community – it is connection pool

  • Transactions are not implemented properly. Since DataSource is directly injected, spring dint care about releasing the connections.
  • Need to make all my service methods @transactional, DB retrievals made as read-only in addition to few other changes to DAO configuration which I preferred.
  • I was checking the connections consumed or the session details at MySQL, I dont see any abnormalities.
  • The fault was with my blind guessing about default active/maximum connections of commons-dbcp. I thought default connections will be sufficient for me. But I found I din’t give the minimum, maximum and active SQL connection count where default values 8 connections. But I need 5 ~ 12 connections

Hence this solves the issue. The abstractions of the frameworks reduce the time being spent in development. At the same time, We need to be in a position to analyse the different tiers integrated together.

Representing ThreadDump details is basic thing with java monitor, but representing the details so that it can reduce our diagnosing time is highly important. Monitoring JTA becomes a valuable point in any java monitoring product. Still searching for better way of monitoring Struts/Spring/Hibernate layers individually. Hope we will get it soon!

IBM developerWorks seminar on ‘Leverage the power of smart SOA’ – Report

A full day seminar on ‘Leverage the power of smart SOA’ was conducted by IBM developerWorks forum today, 12th Mar 2009, at Image Auditorium, MRC Nagar, Chennai. I registered myself for this last week, got the confirmation over phone a day before.

The arrangements were good. Though, the preparations were not so planned as that of IBM conference held at Tidel park or the Websphere week celebrations held early this half year, I would say it was decent enough at this point of time. Yes, Organizing an event within a facility like WOW & Tidel park is relatively much easier than that of engaging a full-fledged conference.

ibmWe had been requested to be there at registration counter by 8-30AM, to get a suprise gift! I’ve seen many professionals across the companies came on time. That’s a good sign. I could see sweating Bharati Muthu, (Program Manager – Skill development for developerWorks, India/South Asia) was working behind the screen to make this event successful.IBM experts delivered useful and interactive sessions on SOA, web2.0, cloud computing etc.

The questions were enormous because all questions got goodies :). I would say some of the doubts were worthless!

The program started with a movie demonstrating IBM developerWorks followed by Bharati’s keynote. Let me brief about the rest of the sessions below.

1. Smart SOA – Ram Viswanathan, IBM

SOA is already on the full swing, a hot topic among the techies. This session was about optimizing it furthur, to suit the current economic trend, changing customers requirements etc. He insisted the need for bringing business and IT together to drive any company. He justified his view from various surveys and reports. SOA is to be implemented efficiently so that it can make the processes more agile, (change friendly), which will make the company to survive, He said.

2. Cloud computing – Ram Viswanathan, IBM


This is the recent buzz in the industry. I had attended a session conducted by Sun last week, which motivated me to give a serious look into this. I will write about this session slightly later.Ram presented the Cloud Computing at a macro level, followed by an interactive Q&A session. He explained about the need for Cloud, different clouds available now, the pros and cons of the same. I could remember some interesting questions were asked like, difference between grid computing and cloud computing, relationship between SOA, Cloud computing and SAAS etc.

3. SOA Next Steps: Entry points through reuse and connectivity. – Vignesh V, IBM

entry points

Image courtesy:

Vignesh followed Ram to deliver a speech in detail on SOA and looking for possibilities in implementing the same. He issued tips to developers/managers to possibility of implementing SOA at customer place, rephrasing it, key points to convince the client to SOA, and how IBM has tools to support one’s decision. He listed out several entry points among which reuse and connectivity is given preference in his speech.

I should mention an interesting video about IBM ESB, he played. IBM knows how to market it! Here is the youtube video.

4.  SOA Technologies: Web 2.0 – Naren Krishnan, IBM

This session was interesting to me, because I’ve been working in this for a while. Naren was talking about the need for Web2.0, what are the technologies supporting web2.0 and the IBM tools that helps the developers to create applications based on the same.

5. SOA life cycle, Service Oriented Modeling and Architecture (SOMA) – Vignesh, IBM


Image courtesy:

This was a detailed session about the life cycle of SOA. I thought it might have been better if it was delivered before the entry points to SOA. Vignesh pointed out the various phases in SOA like model, assemble, deploy and manage/monitor and explained the role of IBM tools in each and every phase. Finally he explained SOMA, which is a part of model in SOA lifecycle.

6. IBM developerWorks: Learn, Share, Connect – Himanshu Goyal, IBM

ibm developerWorks

This was purely marketing lecture to developerWorks portal. Himanshu being the head, he delivered his lecture in an interesting manner. But Bharati provided more information about the portal in a session I attended couple of months ago in Week of Websphere!

7. SOA Technologies: SOA and zSeries – Ramakrishnan Kannan, IBM

This is an interesting session on Main frames. Kannan explained the complex SOA concepts with simple real life examples and covered the topic in a decent manner. His talk was about modernization, how to integrate z OS with SOA. Good session followed by q&a. Being a pure java guy, I am not able to grasp everything he told.

8. Managing Business Process as Entry Point to SOA – some IBM vendor

This session was not so interesting to me, I got bored with repeated information and the way the speaker presented his views. Unfortunately I got a call from my office and I need to quit in halfway.

9. JAM – UnConference

This is an interesting part of the agenda, Just-A-Minute/Unconference. Participants were encouraged to present their own topics of interest within the given time of 10 mins. Laptops were arranged for JAM speakers to design their slideshow (I hate the word PPT, so MS-centric!). Proactive policies were declared to choose the speaker and topic. (democracy as Bharati told!!) I missed to see who won that ipod shuffle for his successful JAM session. I came to know that many participate actively and truly to bring “community knowledge haring” to full!

My view . .

dw logo

Image courtesy:

This is an interesting change, Corporates are creating developer communities. Of course, they try to form a forum, pushing the technology, which helps them to market their ideas and products. I just think about how Linux User Groups (LUGs) evolved over a period of time across the globe. Corporates follows the same strategy and they are coming to public domain.

Most of the giants are creating their own cloud, their own developer forums. IBM’s developerWorks, Sun’s Kenai are all trying to pull or encourage or help developers with their products. I will write more about this individual topics when I found time.

Let me end this report with a line what Himanshu pointed out.

I don’t know what I don’t know!

Thanks to IBM for the goodies delivered, the green planet revolution and the nice lunch!

For more info :