42 does Constraint violations, Query optimization and L2 Caching

42 has organized a series of internal workshops focusing on the chasm between Java development and managing the Database. Five workshops have already been given. The most recent workshop focused on the constraint violations, optimizing queries and level 2 caching. The workshops have a theoretical and a practical part. During the practical part, the students got to get their hands dirty with a couple of coding puzzles, immediately applying what they have learned.

Constraint Violations

Jeroen van Schagen, main contributor to the JARB framework, talked about the mismatch between application and database. His talk consisted of two parts. The first part was about the validations that take place in both the database and the application. Jeroen made a case for aligning the validations in such a way that the core data the validations are based on, are drawn from a single source. That source is, of course, the database. The second part of his talk he focused on handling constraint violations from the database. The current best practice in the Java community is to prevent these constraints by checking upfront in the application layer for a potential violation in the database. A deeply flawed, albeit "best practice", method of dealing with this matter. Jeroen pushed forward the case for dealing properly with constraint violations by mapping these to Java exceptions. In both cases JARB plays a role.

Optimizing Queries

Databases have very few secrets for Ron Smeets and he was once more willing to share his experiences with a larger group. First off, Ron showed the way of the explain plan and how to divine its arcane readings. Not satisfied with mere understanding, Ron prodded the masses on to deal with the encountered performance problems by having them tweaking the schema of the database. Ron also showed the essence of statistics for the explain plan, since all computations are based on what is already there. His presentation was interspersed with entertaining war stories of how matters can go horribly wrong when the explain plan is ignored.

Level 2 Caching

Our resident caching expert, Willem Dekker guided us through the various forms of caching that are available in general. He then dove right into the caching mechanism that this session was about -- the Level 2 cache. Willem described how to combine entity and query caching and showed the pros and the cons of both approaches. A word of caution was prevailing throughout the talk -- caching is not without its price, so be careful in applying it.

What 42 can do for you

If you like this workshop concept and you think your company will benefit from an infusion of knowledge and expertise at this level, we are more than happy to accommodate you.

Also, we often notice that the knowledge of our developers runs deeper than just coding. It happens regularly that our developers play a major role in gettings software development teams back on track, solve crucial performance problems in applications and come to participate in important architecture decisions. If you happen to be looking for technically skilled Java developers who know more than just Java, with a strongly embedded quality mindset and team working capabilities, you know where to reach us.