jprime2018

Going Reactive with Spring 5

Last month I had a pleasure to give a talk on Going Reactive with Spring 5, at jPrime 2018 conference, in Sofia, Bulgaria. The conference itself was organized and delivered very professionally, by some very nice people from Bulgarian JUG. I would definitely recommend visiting this conference next year to anyone from the region. There were so many great speakers, top notch, industry leaders, having very interesting talks. To be honest, I was a bit nervous, being on the conference agenda next to such great speakers. Yet, I was proud, too.  It was a really great experience for myself, to be the part of such great event. Thank you, @jPrimeConf, for giving me this opportunity, to be “the reactive guy”. 🙂 Of course, big thanks to my company Seavus, too, for supporting me in preparation and visiting the conference.

Watch the recordings from all talk at this YouTube playlist.

About my talk:

In recent times, Reactive Programming has gained a lot of popularity. It is not a “silver bullet” nor it is a solution for every problem. Yet, it is a paradigm to build applications which are non-blocking, event-driven and asynchronous and require a small number of threads to scale. Spring Framework 5 embraces Reactive Streams and Reactor for its own reactive use, as well as in many of its core APIs. It also adds an ability to code in a declarative way, as opposed to imperatively, resulting in more responsive and resilient applications. On top of that, you are given an amazing toolbox of functions to combine, create and filter any data stream. It becomes easy to support input and output streaming scenarios for microservices, scatter/gather, data ingestion, and so on.

This presentation is about support and building blocks for reactive programming, that came with the latest versions of Spring Framework 5 and Spring Boot 2.

Watch the recording and see the slides

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

proper method naming matters

Proper Method Naming does Matter

We all have taught to choose good names for methods in the code we write. There are various coding style guides which set some ruling around method naming conventions and best practices. Although we tend to follow those in most cases, many times we forget to think will somebody else would be able to completely understand what method really does, by reading method name. Or, will our future self be able to clearly know the purpose of the method by reading this method name in 3 months after we wrote it. This is a short story about learning the hard way that proper method naming does matter.

Read more how we speeded up out our code by 95%

Devoxx

Devoxx Poland 2015 – Java Conference Summary

There are a lot of interesting tech conferences in 2016. If you want to stay up-to-date with the technology you are developing with (and you have available time and budget), there is some conference out there for you. Just do a simple google search to explore the possibilities. If you are quick enough in making up your mind and registering for a particular conference, you will most probably be able to get an early bird discounts. Last year I’ve visited Devoxx Poland in KrakowDevoxx is an annual European Java, agile, mobile and web conference. It was originally created by Belgian Java User Group. Last year the conference took place in Belgium, UK, France, Poland and Morocco. Many top industry speakers were talking about interesting topics. More than 10.000 developers visit those conferences annually.

Although it’s usually possible to watch all the presentations online (even for free), visiting a conference gives you some additional perspectives. One example: every day we got used to work in a team with some 5-10 other good Java developers. Just imagine how you would feel when you are at the same place with e.g. 2000+ other Java guys. And many smart people who present out there at the stage. It’s something you need to experience.

Devoxx Poland is my top choice for 2016 as well. For many reasons. Very well organized conference, great topics, great speakers, affordable price, to mention a few. Visiting Krakow in June is a nice experience, too.

In this post I will write a short review of the conference last year (2015).

Read about my summary of Devoxx Poland 2015

Functional programming

The Need for… Functional Programming

A Hardware Issue Became a Software Problem

During the last decades we are all witnesses of computer systems constantly improving in speed, efficiency, increasing space for storing data and decreasing the size of the components. The popular Moore’s law was a correct prediction that the number of transistors of the largest microprocessors will double about every two years, since 1970s. But increasing the number of transistors on a chip and increasing processor’s frequency, among other things, also requires exponentially more power.

Processors were originally developed with only one core. Around 2005, in order to continue delivering regular performance improvements for general-purpose processors, manufacturers such as Intel and AMD have turned to multi-core designs, sacrificing lower manufacturing-costs for higher performance in some applications and systems. (source Wikipedia)

Traditionally, computer software has been written for serial computation. To solve a problem, an algorithm is constructed and implemented as a serial stream of instructions, executed one at a time. In order to use the resources of a multi-core processor, some kind of parallel or concurrent execution approach became a need. Suddenly, due to the change applied by hardware manufacturers, software developers must rethink the design of their programs.

Read more…

Watch online recordings of Java Conferences from 2015

Visiting a conference is a very interesting experience. Plus you can meet some interesting people, hear what’s in hype, learn some new stuff and ask questions. On the other side, due to a budget and/or (what’s missing the most) available time, sometimes it’s not easy to participate to a conference. Nevertheless, this does not have to mean that you should not be able to watch online recordings of some of the interesting talks and presentations. If you search the internet and particularly Youtube, you will be surprised how much interesting stuff is available there. And all for free. Of course, what’s not free – is your free time. 🙂 You’ll have to find some and invest it in widening your horizons.

Since recently it somehow became a practice that many conferences (even big ones) publish recordings of the talks. In the Java world as well. So, if you have some time, you can enjoy recordings of major Java conferences and top industry speakers presentations. In this post I’ll share some links to Youtube playlists with recordings of Java conferences from 2015.

Get recordings of Java conference talks from 2015