When bytes
meet Mike

Hi! 👋 I'm Mike, a.k.a @mikemybytes, building distributed systems for fun and living. While I specialize in JVM technologies (mainly Java, Kotlin, Spring), my professional interests go far beyond that. Let me show you what I found interesting!

Mike Kowalski

Project Lombok - beyond DRY

#java / May 27, 2018 / 10 min
I have to admit, that when I first saw Project Lombok few years ago it was quite odd to me. The whole “annotation thing” and code pieces appearing “magically” inside the classes made me skeptical. A few years later, I’m now a fan of using Lombok in my Java projects for many reasons. Not all of its users know, that Lombok has more than just reducing the boilerplate code to offer.
Read the article

Build docker images with Jenkins running in docker

#jenkins / Jan 21, 2018 / 3 min
Building docker images within the CI pipeline isn’t something new or unusual these days. Normally it’s super easy - you just have to install Docker in your Jenkins CI environment and add jenkins user to the docker group. Problems appear when your Jenkins instance is a docker container itself. Inception begins How to make docker available inside your container? Here is a three steps solution: Install docker in your container. Expose docker socket (/var/run/docker.
Read the article

SolrCloud on production - the memory

#java / Aug 17, 2017 / 5 min
I want to share with you some of my thoughts about using Apache Solr (especially SolrCloud) on production. In one of the projects I’m participating in, we are using it to provide Near-Real-Time (NRT) searching along with frequent updates to the indexes. Here are some tips, that helped our project stand still on production environment against hundreds of simultaneous requests per second. This post is focused on the memory related aspects of the Solr configuration.
Read the article

The uncertain future of Keyczar

#security / Feb 13, 2017 / 3 min
The cryptographic world changed a lot since 2008 when Google’s Keyczar library showed up. However, one thing is still the same - effective cryptography is really hard to implement. Keyczar library was a quite successful attempt to provide easy to use crypto solutions based on current security standards to Java, Python and C++. Now, after 9 years of its development, the future doesn’t look so bright. Ain’t no sunshine when it’s old In the late 2016 Keyczar’s maintainers announced that:
Read the article

Still using @author for every file? Please don't...

#java / Dec 29, 2016 / 3 min
Luke, I am Your Father! In his first day at the new job, Bob created the following class: import java.util.Arrays; import java.util.List; /** * Returns a sum of given numbers. * @author Bob */ public class NumberSumCalculator { public int sum(List<Integer> integers) { int sum = 0; if (integers != null) { for (Integer integer : integers) { sum += integer; } } return sum; } } He was so proud of it, so he put the @author Javadoc tag with his name at the top.
Read the article

Welcome to HTTPS era with Let’s Encrypt!

Dec 11, 2016 / 1 min
As you can already see in the browser’s address bar, my blog (along with other sites on mkowalski.net domain) received HTTPS support. Thanks to Let’s Encrypt everyone can get valid HTTPS certificate for free! Interested? Check out their’s Getting Started Guide. If you are lucky enough your hosting provider may already support Let’s Encrypt automatically. In my case a manual configuration was required. Luckily, it have been documented well by MyDevil team, so the process took me just a few minutes.
Read the article

How micro should a microservice be?

#docker / Oct 20, 2016 / 3 min
Two days ago I’ve participated in a JUG meeting in Poznań which special guest was famous Java rock star Adam Bien with his presentation called Microservices in 2016 — What Worked Well. The session was focused on the typical Bien’s stack: JEE microservices & Docker and overlapped with his presentation on Devoxx Poland 2016. But don’t get me wrong - it was totally worth it! The Bien’s way One of the most controversial topics during the session was the preffered size and the granularity of microservices.
Read the article

Docker shared storage file permission problems

#docker / Sep 11, 2016 / 2 min
Case Imagine the following scenario: your world-famous web application is hosted with two Docker containers (eg. with application server). Both containers have access to same host’s directories (passed with Docker’s -v parameter) mounted as: /configuration - containing few configuration files, /logs - storing log files outside containers. Arguably, there are lots of better solutions (including databases, log indexing systems etc.) but that’s the issue we need to face now. The following user accounts are involved:
Read the article

Make your git commit verbose

#git / Jul 24, 2016 / 1 min
Even if committing changes with git is straightforward, sometimes you want to verify all changes before doing it (e.g. to come up with with a nice and meaningfull commit message). Luckily there is --verbose switch for git commit. According to the manual (git commit --help): -v, --verbose Show unified diff between the HEAD commit and what would be committed at the bottom of the commit message template to help the user describe the commit by reminding what changes the commit has.
Read the article

So you think you can skip tests? The "dark side" of Maven

#maven / May 31, 2016 / 2 min
Tests are the light side of programming. Period. Running test cases is one of the fundamental duty of every build automation system - including Maven. Even if it’s a kind of ritual and the determinant of style, every experienced programmer knows that sometimes things just have to be MacGavyered instantly. But how to fold up a late night app version using only Maven, bottle of ketchup and an old shoelace if our tests just don’t pass?
Read the article