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

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

Solving locale issues with docker containers

#docker / May 16, 2016 / 3 min
When docker kicked in to the enterprise market many things started changing. Along with microservice-based architectures it became a must-have technology for any “modern” project (the containers idea itself isn’t new - docker has just made things much simplier). In analogy to Java related slogan from 1995 “Write once, run anywhere” almost 20 years later docker enthusiasts say: “Build once, run everywhere”. In fact both ideas can coexist easily and that’s probably one of the reason they really do in practice nowadays.
Read the article

Apache FOP - center table cell vertically

Apr 6, 2016 / 1 min
Nowadays we can argue if using Apache FOP is still the best solution for generating PDF documents. One of it’s biggest competitors is probably JasperReports Library which supports multiple file formats and does not require creating XML templates manually from scratch (thanks to Jaspersoft Studio). However, sometimes you just have to face the FOP’s XML monster :) The FOP’s way of styling elements (text blocks, tables etc.) is almost identical to the CSS.
Read the article