Skip to content

Archive

Waiting for transaction propagation

In the land of traditional ACID DBs, I often encounter code that is trying to collaborate with some external system using a queue or notification system. The problem is that it ends up sending the notification to the external system before the data has been committed to the central database. Then when the external system tries to query for data based on the notification, the data is not there yet (a different or outside a transaction).

Generic API documenter for web-services

For some time I have meant to fully document all the different APIs I’m involved in. It gives a more professional feel, it helps integrators and front-end developers and it actually makes it easier to spot inconsistencies in naming or configuration.

Spring DefaultKeyGenerator gotcha

To speed things up I had applied the excellent @Cacheable annotation to a service method in our application (don’t miss the excellent performance analysis here, btw). However, I had not paid too much attention to the parameters going into the cache key. I would have expected something like concatenated toString() or something similar, however the default is to use the hashCode() of each parameter and create another (32-bit) hash code. Obviously this can easily generate collisions, as we shall soon see.

Back to the world

I thought that since it feels pretty late to enter the blogosphere at my age, I will write up a small explanation, if there is anyone interested.

Robot

After a few days of writing code directly for drawing surfaces and cylinders, it turned out to be very hard work to get a good-looking robot. That gave me the idea of loading a model made in a 3D program instead. This gives much more flexibility when the models need updating, and it also makes it possible to set some material properties and light settings there, so that this does not have to be done by hand. The next step is to draw the robot's part models in the right position, and then animate the robot. The robot can be controlled either manually or through a control file, specified in XML.