Tuesday, May 29, 2007

Presentation on GWT

I listen to Bruce Johnson's presentation on GWT. It was like an introductory presentation where he really didn't dig in to GWT. But this is a very good one for understanding the road map to GWT. He justifies the decisions nicely.

It would have been great if he discussed the limitations of GWT also. While understanding the difficulties in java2javascripting , there are situations where we really struggle due to it's limitations.

One of those limitation where we were in trouble is the serialization part. GWT has its own serialization model for their own reasons(!) and we had to write our delegates for the third party modules for using them with GWT. Good news is, GWT team now planning to move away from IsSerializable interface in coming versions!

Ofcourse there are lot others and fortunately we are able to get rid of those issues one by one.

Those who are interested in listening the presentation, click here.

Tuesday, May 22, 2007

How to create a label cloud in Blogger

Blogger has the concept of 'labels' which are similar to 'tags' which is an important Web2.0 concept. However, by default Blogger does not come with a tag/label cloud. I found an interesting article on the Web about how to do this.

Read

I will try to implement the tag cloud for this Blog soon.

Saturday, May 19, 2007

IVY dependency manager (Part1 Introduction) Contd....

Himath requested to discuss the dependency management in detail. Thanks himath for your feed back. I will try to explain this in more detail on this post. Today will discuss on dependency management in detail before go in to the IVY guide lines.

Dependency management is , like its name suggests ,
Managing the project dependencies in a centralized storage.
For example, if we are using spring-1.2.8 in our projects A and B. Then assume spring 1.2.8 has dependencies of commons-logging-1.0.4 and log4j.1.12 dependencies. So what we have to do is , we should have a lib folder inside our projects and have these all dependencies into it. So what are the headaches for doing this.

  1. You have to keep remember of these dependencies each every time you add a new lib. For example if you are going to have new dependency like foo.jar , the you should know which are the dependencies of foo.jar.
  2. You have to keep jar files in your project repositories. For example, we may need to keep spring jars for all the project repositories which uses spring.
  3. Switching from one version to another is very difficult. For example I am moving from spring 1.2.8 to spring 2.0 version. Then again I have to add the new dependencies to my project dependency folder.
  4. Maintaining project artifacts is difficult. For example we have sub modules a, b and c in our project and we need to b and c jars for building a, we may need to build the b and c first before build the a.jar, even though we haven't changed the code base of b and c.

Above are few of the many problems we face when we don't have a centralized dependency management system.

So now lets discuss the advantages of having a centralized dependency management system.
If we have a dependency management system , then all of our artifacts (For us, it is mostly jar files) are in the central repository (Another svn repository). Every artifact has a configuration file where you have your dependency information. This is an extract of a configuration file for a sample. (This is taken from one of our projects etl-server)


Here you can see etl-server-core-1.1.jar is the artifact and dependencies for this artifact are listed inside the dependencies tag. So that tells the story. You have spring 1.2.8 is in the dependency list. So you don't need to separately keep the log4j dependencies here since you have those entries already inside the spring dependency file. If you look this in to more, which ever the projects using the etl-server-core-1.1.jar, they don't have to keep the these dependencies inside their list. Because these dependencies are already referred through etl-core-server jar.

So lets list down the point now.

1) Using dependency management we can maintain the centralized repository. So in your project page, you only need to use a XML file listing your dependencies. Ivy will take care of downloading them from the dependency repository when we build the project using ant.

2) Ivy maintains a local cache directory (possibly inside your /.ivy folder) for your downloaded dependencies, so you don't need to download them each and every time. This download is one off.

3) To publish your project artifact to repository is as easy as using an ant command publish!

4) Due to the chain of dependencies concept, if you refer one artifact foo.jar in your dependency file, then whatever the dependencies needed for foo.jar will be taken care of foo's dependency file. You don't need to keep them inside your dependency file.So it makes your life much easier.

So for more details it is better to have a go through the IVY DOC site before we discuss this matter in to more detail.

Sunday, May 13, 2007

IVY dependency manager (Part1 Introduction)

Its a Sunday noon in Singapore. I just had a chat with Chirantha who is based on Royal Brunei these days. He just joined to our blog. Welcome chirantha. Awaiting few blogs from you on your mysql expertises :)

This is an attempt to introduce our recently setup dependency repository. As a step forward to make full use of version controlled source management, we have started using our own internal artifacts repository for some time now.

I try to split the topic in to three.
1) IVY Dependency manager - Introduction.
2) How to use our repository.
3) How to publish artifacts to IVY.

This week we will discuss on the ROADMAP to IVY :)
Its been long time our engineers have been feeling of using a common repository for our artifacts. Having common dependency manager is good for many reasons. Especially we don't have to keep individual dependencies for each and every product. The version management is very easy. So it was decided to go for a repository internally.

Now we need to decide the right choice. The main two candidates were Maven and IVY . After several considerations we decided to vote for ivy. Lets discuss on what caused us to choose IVY for our repository.

  • We thought IVY is a handy light weight tool on it's own grounds.
  • Considering the scope of our requirement, which we mingle with our own proprietary and open source artifacts we do not need to use maven ibiblio or any other out of box repositories.
  • We all are used to work with ant. The complexity in using maven with ant is a widely known fact! . Probably maven expects users to do everything using maven. Basically maven is a project management tool where IVY targets dependency management.
  • The IVY support to ant is really good. Publishing artifacts to repository can be easily done through ant and IVY.

So we decided to use IVY for our own reasons. Maven has it's goods and bad so IVY too. For more comparisons refer IVY site.

So stay tuned with hsenidians for my next post on how hsenid is using IVY.


BTW It is notable that IVY is still in apache incubator. I don't understand this. Though people used to compare IVY with Maven, they are not competitors :) . They are different tools and the level of scopes are different. So we mark our big +1 for IVY ;)

Saturday, May 12, 2007

Software Architecture Series - Peer-to-peer Architecture

I thought of writing a series of posts on Software Architectures. In this first post, I will discuss Peer-to-peer (P2P) Architecture.

In a P2P architecture there's no notion of clients and servers; equal peer nodes show the behavior of both clients and servers.

In a P2P architecture clients provide resources (bandwidth, storage space, computing power) and results in a more robust systm with data replicated over multiple peers with no single point of failure.

Applications of P2P Architecture can be categorized into the following areas:
  1. Communication and Collaboration - Chat/Irc, IM (Aol, Icq, Yahoo, Msn), Jabber
  2. Distributed Computation - use peer computer processing power
    • Seti@home - Search for Extra Terrestrial Intelligence (SETI)
    • genome@home - understand gentic information
  3. Database Systems
    • Local Relational Model (LRM) - relational queries to run across 1000s of computers
  4. Content Distribution Infrastructure for sharing digital media and other data
    • Most P2P are under this category. e.g. Napster, Publius, Gnutella, KaZaa, Freenet, MojoNation, Oceanstore, PAST, Chord, Scan, FreeHaven, Groove, Mnemosyne
I personally found the concept of contributing to searching for extra terrestrial intelligence and understanding genetic information by sharing ones PC resources interesting.

A good example of a P2P application of today is BitTorrent [2].

References:
[1] A Survey of Peer-to-Peer Content Distribution Technologies
[2] Wikipedia (BitTorrent)

Friday, May 11, 2007

Getting Things Done

Is there a Silver Bullet to Time Management? This is a question I have been trying to answer for quite some. Now I have come to the conclusion that there is no such silver bullet but each person need to choose the best method that suits him or her.

We've come a long way since simple TODO lists. Infact there are quite a few modern ways of time management. Stephen Covey introduces a great method in his book "The Seven Habits of Highly Effective People" and it's sequel "First Things First"

I liked the concept of focusing on the important things and not the urgent things that we tend to focus on. Just knowing these principles could improve one's time management a lot.

Tony Robbins also has his time management method called "Time of Your Life". Here he focusses on the importance chunking and grouping of related tasks together and being emotional about the achievement of the tasks. This method is more heavy weight than the Covey method and for someone who's learning it it could take about 1 hour a day just to do the planning. So to use this method one has to be really disciplined.

A recent time management method I stumbled across is called "Getting Things Done" by David Allen.


I got an eBook and yet to apply the whole book. At least I've been using his concepts for my email which, is in hundreds per day. So far this has been the most effective method I've used with my emails.

This is simple and light weight. Unlike the previous two methods, you don't have to spend too much extra time doing the planning.

I used to delegate a lot of tasks to lot of people and found it difficult to keep track of all tasks. This is expecially difficult as some people tend to forget. Using this method it's really easy to keep track of delegated (Waiting for Tasks) .

Well, in conclusion I would say there's no silver bullet but knowing all these techniques would really help as in this age of balancing 1000s of tasks we cannot only depend on todo lists anymore.

Wednesday, May 9, 2007

Random thoughts - Software Architecture to Toastmasters

Last two days have been quite warm here. Yesterday the temperature rose to about 94F. This is infact hotter than a typical day in Colombo.

I've been working on a briefing for Carnegie Mellon and subject was Responsibilities of Software Architects. This is a topic where there are many definitions. Search the web and you'll probably find 100s of defintions. I did a little bit of study my self. At the end I could identify 4 main responsibilities of Software Architects. Hundreds of specfic responsibilities could be categorized under these. The 4 categories of responsibilities are:

  1. Architecting and maintaining the architecture
  2. Communicating (especially the architecture) with all stake holders
  3. Providing Technical Leadership to the project
  4. Acting as a Consultant
What surprised me was that except for the first role, all other roles involved communication and leadership to a very high extent. Simply said a good architect must be a leader and a powerful communicator as much as have the requried technical skills.

This is something most technical people ignore. This brings me back to the title. I joined a Toastmasters club about a month ago and today I did my first prepared speech. Toastmasters is an excellent way to improve your communication skills which I recommend to all.


Monday, May 7, 2007

Marking 10th year anniversary


As we hsenidians marking our 10th year of successful run, it is time to move on. The best part of the hsenid culture is adopting the new methodologies. There are lot of examples made in the past. The way we adopted the open source culture and AGILE process was one of those such examples.
So what's now? We did smell the much hyped(Hype is a bad word though,Tim O'Reilly will tell more here) web2.0 as an important entity in coming years. We have shown our commitment through web2.0 expo last month. Oh yes more pictures from our orangehrm blog. (Folks from oragehrm will take this for sure ;)

So hsenidians from various parts of the world (You can take USA, Malasia, Singapore, Brunei, Kuwait, India and Sri Lanka of course ! as those various parts ) feel better to maintain our own developer blog. We know, we expertise on certain areas and its time to pay back to the world of web, which helped our way along last 6, 7 years .(Innocent folks , please trust me ;) )

So whats next, we will keep on blogging. Of course you can expect good feeds from our experts' areas !