The latest Openbravo Release Leaves us more Technical Improvements
As we were saying last week, several performance and usability improvements have been made recently in Openbravo. Today we will talk about the most significant one regarding performance which is Tomcat JDBC Connection Pool Module and the Support of Function Indexes. We will start talking about the Tomcat JDBC Connection Pool.
Before, Openbravo was using two different connection pools which were the Hibernate default connection pool and the APACHE DBCP for the connections provided by the ConnectionProviderImpl. Openbravo used these two pools because it is interesting to use existing -but idle- connections that are prepared and waiting to be used. This avoids the overhead of initiating a new connection.
The new connection pool that is now used by Openbravo greatly improves the performance: If we talk about the number of concurrent connections at a given moment, we see that the size of the new connection pool is less and better controlled , all thanks to the new configuration. Additionally, the resource consumption is less and, with proper configuration, the database performance is better, which is especially noticeable in high-volume environments.
The graph below shows that the reduction of idle connections is considerable, not marginal.
To start using the new connection pool some changes have to be made in the “Openbravo.properties” section. If one wants to use the new pool, the following sentence has to be written there:
The interesting part is that we have different options: If you want to use another pool instead of this new pool, you should define it here. So, there are different options which make this feature very flexible. If you do not fill this property and you leave it blank, the new pool will not be used and instead, the old configuration will be used. As mentioned, one of the most interesting improvements of the new pool is to be capable to configure it to accommodate the needs of any environment.
The other new feature which improves the performance is introduced by the Support Function Indexes project.
In Openbravo, the function based indexes functionality was not supported previously. A Function Index is an index which supports basic SQL functions. The need to support these indexes appeared because in some search queries from Web POS, the “iStartsWith” operator was being used to fetch data. The resulting database query uses the UPPER function. The standard indexes are not used when a function is applied on a filtered column but the function based indexes are. The fact of being able to support function indexes is boosting performance and again, it is specially noticeable in high-volume environments. Database queries are much faster and the user experience is improved. The only rule that has to be respected is that the index functions are compatible with PostgreSQL and with Oracle.