This article will be about multiple joins in Hibernate model during super class fetch in JOINED inheritance mapping strategy, and generally how I significantly improved our system performance using some simple patterns. There’s a lot of stuff on internet about this (usually wrong approach), so here I’ll present my working solution for this problem.
Read the full articleThis catching title will be not about distributed hibernate search, but something really close :)
The case I’ve recently solved was a quite different. I have a frontend application that uses hibernate database and hibernate search, and then I needed to add additional application - let’s call it an integration server, which exposes some API webservices for the overall system. Integration server uses the same database as the frontend application, and enables clients to put data to the database using its webservices. Both applications exist on two different physical servers, as well.
Read the full articleIn the current project we faced the problem of concurrent changes to database, for the data that should be accessed sequentially. Imagine you have the customer’s bank account where he can withdraw the money. If the customer is not a person, but company, and if he can have multiple users accessing the bank application, without any locks there’s a chance for situation where two or more users depute transfers, that exceed the account balance, but because data is accessed concurrently, they both can make payoff.
Read the full articleThis article describes some complementation for Open Session In View pattern for Java/Spring. But first I want to show just my point of view about the pattern itself. Many people consider this as an anti-pattern and tell that it never should be used. I think exactly opposite, and here are some explanations.
Read the full articleI’ve recently had a requirement of setting up the application to work in high-availability environment, which among the others involved hardiness for database (mysql) crash. We established with the customer that we want to have a second database server, where the mysql database mirror will be maintained using master-slave mysql replication. In this model the master mysql server takes care of synchronizing records from itself to the slave server, and the slave server is available in fail-scenario for the application in read-only mode.
Read the full article