Yearly Archive: 2017

HikariCP

Fast, Faster, HikariCP

When it comes to application performances, bottlenecks like waiting too long for a specific page to load or triggering an API call which never returns – are easy to spot. In those cases it is obvious where problems are and where most of the execution time was spent. Of course, it is totally different thing, will you be able to resolve the noticed performance issues or not.

On the other side, there are many places in the application where time can be spent. Some used tools and libraries we take for granted and do not expect our logic is spending significant time running within them. This is a story about one specific case, in which application logic takes a lot of time to execute and how a simple change using HikariCP helped to cut the execution time in half.

Read more…

Still using java.util.Date? Don’t!

Java 8 was released 3 years ago (March 2014) and brought a lot of language improvements. One of those is new Date and Time API for Java, also known as JSR-310. It represents a very rich API for working with dates and times. Yet, I see many developers still using good old java.util.Date and java.util.Calendar classes in the code they write today.

Sure, we still have to interact with legacy applications and old APIs, using mentioned classes. But this does not mean we can not use new java.time API when writing new code or refactoring the old one. Why we would like to do so? Well, using the new API is simpler, more straightforward, flexible, easier to understand, classes are immutable and hence thread safe… just to mention a few.

Read more…

Analyze web server logs on the fly with GoAccess

There are times when you get urgent ping from you customer or hosting provider operations team. They complain about significant drop in application performances. Or that something is eating all the available server bandwidth or similar. The reasons for those problems could be various. If application logs and metrics showing normal behavior, before digging deeper, it is a good idea to exclude “external factor” first. GoAccess could get very handy in this situations, to analyze web server logs on the fly.

Ream more about how to use GoAccess

Effortless email testing with FakeSMTP

Each web application today sends some emails out. Those could be various information, reports, notifications etc. Sooner or later you will get a task to prepare and send an email. There are different ways how you can code the logic for generating email messages. What can sometimes be a bit cumbersome is testing this logic during development.

There are three major concerns, when it comes to email testing. One is configuring the right SMTP server, which is reachable, can talk with the application and takeover the sent email. Second is making sure that no test email reach real users, because nobody likes to be spammed (one could easily become confused, or even angry). The last one is taking care that your SMTP server does not get blacklisted, which can happen if you send a lot of funny “test 123456” emails out to the internet. Little tools like FakeSMTP could get very handy in resolving those concerns.

Read more about how to use FakeSMTP

Parameterize Hybris ImpEx import by config data from local.properties

SAP HybrisThere are times you have to parameterize data which is being imported by Hybris ImpEx import. One example could be handling of environment specific parameters, like different development and production endpoints URLs of a particular interface etc. A solution is to use Hybris ConfigPropertyImportProcessor in .impex file.

Read more about how to use config parameter in impex file