Tags:

    Happy 2009

    Well, the end of last year was quite busy finishing a project and making it go live and then all the Holidays' activities. The New Year started fine but now all but one of my kids are sick.

    That said I finally started to use MythTV to watch the postseason Football games and it is nice to watch them after the game ended because then I don't have to watch any of the countless commercial breaks. This cuts a 3 /12 hour game down to a little bit more than 1/12 hour.

    While finishing the project last year I learned a lot about Hibernate and the pros and cons of it. The biggest problem is that the design of the Entities are made early on but the performance issue will not arise until late in the project. Having nobody on the project with enough experience designing the entities a lot of time will be spent at the end of the project to resolve performance issues because many of the issues cannot be resolved without code changes.

    For example a User with Regions, Roles, Addresses will build up quite a graph. In a Web project the data must be loaded fully before it is handed over to the website meaning that all the data must be fetched from the DB. With eager loading most of the data can be fetched with one query but with the drawback that all the data is loaded even if not needed like when the User is just a reference in another object and the only thing needed is the key, first and last name. Especially if the Entities and referenced Entities are referring to many other Entities that can pull a lot of data and then creating all the mapping Java instances. Using lazy-loading could elevate that problem but it would yield many subsequent queries if all the data are needed. Now Hibernate allows me to fetch the subsequent data at the same time programatically but these are only loaded in additional queries (trips to the DB). The only way to handle this is to have different Entities which different degree of loading referenced data. But that in turn has a deep impact into the code requiring some major code changes. This is especially problematic if Inheritance is used because that would prevent the developer to create a light and full Entity based on the same base class. I will talk about this later in a more elaborated entry.

    Finally after more or less 2 years I finally managed to clean up my office. Because it is the only room in the first floor where the kids have no access to it ended up to be a storage room for computer equipment but also for other stuff. Eventually I created a list of steps to clean up the room and eventually it was done. Now the next project of that kind is cleaning up the garage with is way more challenging.

    Happy New Year - Andy