Thursday, April 12, 2007

Go OpenGrok

To me, browsing a codebase until now always required downloading it and setting it up in an IDE. But as good as they are as a development environment, they are quite cumbersome (some might prefer to say they are an overkill) when it comes to browsing code, especially one that you are not familiar with. Add to this the need to have them and the codebase everywhere and everytime you want to browse... and all I wanted was to browse a set of code!

The idea of a web based source browser instantly appealed to me. I heard about OpenGrok in one of the sessions at the Sun Techdays and tried it out right away. OpenGrok is a web based source browser with cross referencing and freetext search. All that I need to do is to configure the path of the codebase and run OpenGrok. OpenGrok generates a war that I dump into tomcat and that's all! I can now search the code, click on the variables and methods to check their definitions and do all that's in the scope of code browsing. Moreover, I can just set it up on one box and access it from anywhere on the network.

OpenGrok uses exuberant Ctags and lucene, the java based search and indexing library to get the job done. It's an easy-to-use code browsing tool... try it out!

-Ashish.


Digg!

Wednesday, March 21, 2007

Rails vs Struts

I had done a study on the size and effort metrics and performance of an application developed on Rails vs that on Struts. Here are the observations:


Please note that the performance figures are not an exact measure and need to be considered with these points in perspective. There might be scope for improving the performance of the application, as there was no performance tuning performed for the application. In addition, following points also need to be taken into account.
  1. Ruby VM: Ruby is right now an interpreted language. But a project (code name Rite) plans to make it byte compiled. This would improve the execution speed of Ruby based programs.
  2. Framework method tuning: The Rails framework has been around only for a little more than a year. Development is on profile various components especially Active Record and Helper methods. The tuning effort would further improve the performance of applications using Rails.
  3. Choice of web server: WebRick was used as the web server for this application. Apache and Lighttpd are the suggested web servers for better performance.
-Ashish.

Wednesday, February 28, 2007

Sun 'Tech'-aways

Last week saw techies from all around the country and outside flocking at the International Convention Center in Hyderabad. It was the Sun Tech Days symposium, a worldwide developer event organized by Sun Microsystems and touted as the mini Sun One conference! With 3000+ attendees, it almost seemed like all roads led to Novotel,Hitex. Although far from the heart of the city, the venue was aptly located very close to the Hi-Tech City thus gaining a lot of visibility from the various IT companies. Both the ICC and Sun representatives did a commendable job of managing the crowd, time, booths, technical sessions and the whole event as such. To top it all, there was good food and gifts galore! Event of this scale can of course not do without sponsors and the list included some of the big names from the industry like AMD, Oracle, VmWare, Accenture, SAS, and NIIT.

The technical sessions were divided into multiple tracks alligned with the technologies - J2SE, J2EE, J2ME and open solaris. While on the first two days the attendees were free to choose between any of the sessions going parallaly in these tracks, on the third day, they had to choose between one of - Netbeans, J2ME and Open solaris - tracks. The sessions on ‘Java scripting’ and ‘JRuby’ in the J2SE track were quite interesting and having worked on Ruby, were quite appealing. It was interesting to know that the Java platform was no longer restricted to the Java language alone but supported various scripting languages like JRuby, Javascript, Groovy and Jython. The session on ‘JMX and concurrency’ talked about the new concurrency API in JDK 5.0 and its rich features that address the issues with the old Thread support. The JMX API which was already a part of J2EE 1.4 has now been adopted into the core java platform.

Among the more interesting sessions (and among the ones that I attended!) in the J2EE track, was the one on J2EE 5 and Glassfish. Apart from the technical talk on the new EJB 3.0, persistence API, JAX-WS and JAXB, the speaker encouraged the attendees to be a part of the Glassfish community and contribute to the development of the reference implementation.

The booth on Java DB, an Apache Derby based project, introduced the java based database. It is best suited for small and medium scale applications and can be bundled along with the application! An ideal solution for sharing database backed applications. The session on SPOTs was very impressive. The Small Programmable Object Technology aims at using Java for programming devices having embedded chips… something that was in the domain of C all this while. The demo showing three robots trying to chase each other recieved a loud applause from the audience. VmWare gave a presentation on their virtualization technology, which apparently is receiving a lot of attention and popularity. The technology evolved trying to explore solutions to the under utilization of the hardware. The presentation introduced the idea of treating one physical system as multiple virtual machines and then focused on its impact on cost, n/w maintenance, and availability. Their VMotion technology that allows runtime movement of virtual machines (and therefore the appliations running on them) from one system to another without requiring the systems to be down indeed has a lot of potential.

On the third day, as part of the Open Solaris track, there was an interesting talk on Opengrok. Opengrok is a tool that indexes a given code allowing developers to browse and search the codebase. Although the intent behind its development was to enable quick and easy browsing of the proliferating open source code on the internet without having to set up a development environment, it can be used for any application codebase in our day to day projects. What more, it also has support for dropping the ‘opengrok’ed code into a web server and browsing the code over the network!

I must say that it was a good learning experience and a forum to meet other developers and exchange ideas with them. And did I mention about the discounts in technical books and journals! :)

The sessions can be downloaded from the Sun Tech Days page on the Sun website:
http://developers.sun.com/events/techdays/index.jsp

- Ashish