Knowledge: Tech Blog

Where we share our thoughts on technology and design.


Bartosz Jedrzejewski

JVM Roundabout - Microservices

JVM Roundabout is a meetup in London where all things related to JVM are discussed. The February edition of the meetup focused on microservices. I had to be there!

Bartosz Jedrzejewski

How to use Java Optional correctly

Java Optional has been around for a while now. It is a pity that this language feature is nor used more often by developers. This is a simple demonstration of how to use it correctly.

Oliver Kenyon

Using Kafka and Grafana to monitor meteorological conditions

Apache Kafka provides distributed log store used by increasing numbers of companies and often forming the heart of systems processing huge amounts of data. This post shows how to use it for storing meteorological data and displaying this in a graphical dashboard with Graphite and Grafana

James White

What's new in JUnit 5?

JUnit 5 has been available for a few weeks now so in this post I will investigate setting it up and migrating from JUnit 4 then explore some of the new features available.

Bartosz Jedrzejewski

Chess data mining with Apache Spark and Lichess

Lichess makes over 100GB of chess games from 2017 available on their website. This post shows how this data can be transformed with Apache Spark and analysed. Something for Data Engineers and Chess Enthusiasts alike!

Bartosz Jedrzejewski

Successful microservices architecture with the Twelve-Factor App

Using microservices in your architecture is a very popular choice. Unfortunately it is also challenging to get it right. With the help of Twelve-Factor methodology, I will tell you how to set yourself up for a success rather than a disappointment.

Bartosz Jedrzejewski

Spring Boot and MongoDB - a perfect match!

The popularity of Spring Boot in the Java world is undeniable. In this post I will show you yet another reason for this. Using Spring Boot makes working with MongoDB an absolute pleasure.

Bartosz Jedrzejewski

Java Enums - how to use them smarter

A short introduction to Java enum capabilities followed by concrete examples of good use. How enums help with implementing lazy loaded singleton, following open/closed principle and using strategy pattern.

Bartosz Jedrzejewski

Code reuse in microservices architecture - with Spring Boot

In most microservice architectures, there are many opportunities and temptations for sharing code. In this post I will give advice based on my experience on when it should be avoided and when code reuse is acceptable. The points will be illustrated with the help of an example Spring Boot project.

Bartosz Jedrzejewski

Recommended Reading For Java Developers

Being a software developer requires constantly improving ones knowledge. This is a short list of books that made the largest impact on me as Java developer. I hope that you too will find here something that will take you to the next level!

David Wybourn

Introduction to Hadoop and MapReduce

What is ‘Big’ Data? Big data is one of those buzz phrases that gets thrown round a lot, companies love saying they work with ‘Big’ data, but what is ‘Big’ data? When does data get so big that it can be called Big data? One Gigabyte? How about a Terabyte,...

Bartosz Jedrzejewski

Java Microservices - How to get started in minutes using Dropwizard

This blog shows how to get started with microservices using Dropwizard. It guides the reader through building a simple task-list service.

Allen Wallis

Fixing an LDAP PermGen leak in JBoss

The standard LDAP JNDI implementation that ships with Java leaks a classloader reference when used from a web application hosted in a web container. While Tomcat and Jetty both include factory-fitted workarounds, JBoss does not. This post describes a JBoss-specific fix.

Andrew Aylett

Iterating while counting

Suppose you have a collection, and you need to perform an action on each element. That’s not hard to do in any mainstream programming language. What if you need to know the index of each element as you process it? Not hard, but depending on your datastructures, possibly not as...

Andrew Aylett

Eclipse Kepler and @Nullable

When Eclipse Juno came out last year, I was excited to see some support for @Nullable annotations. I didn’t get very far with them at the time, though, as the implementation was quite strict. With the release of Kepler though, it’s much easer to make productive use of @Nullable to...

Mark Rhodes

Efficient Map Initialization in Java

This post looks at how to construct Java's built-in hash based Map implementations to ensure they have sufficient, but not excessive capacity. Hash based maps are one of the most commonly used data structures in programming and Java provides two different implementations of these - the commonly used HashMap and...

Andrew Aylett

Building Web-Services Using Guice

I've recently had the opportunity to investigate building web services using Java. I think it's fair to say that Spring is the most commonly used dependency injection framework for Java, and it comes with a lot of other useful tools too, but I have no experience using it so I...

Colin Eberhardt

Developing a GWT TodoMVC application

This blog post describes my experiences of developing a simple Todo application with Google Web Toolkit (GWT), that I have contributed to the JavaScript TodoMVC project, which compares the implementation of the same application with various JavaScript frameworks. This blog discusses why I chose GWT, the compromises and benefits of...

Mark Rhodes

Lazy Lists In Java - Part 2

In my last post back in June, I introduced a new data structure, the PatchWorkArray, which performs insertions and deletions lazily in an attempt to improve performance over the lifetime of the list. In this post, I'll detail a simple extension to this class which makes it more practically usable...

Mark Rhodes

Lazy Lists in Java

This post outlines a general purpose alternative to ArrayLists which provide lazy insertions and deletions to speed up those operations. The Java source code, unit tests, javadoc and jar file for all the classes mentioned in this blog is available ArrayLists are perfect when you want to get elements...

Mark Rhodes

Lists with Fast Insertions and Removals in Java

This post describes the implementation of a List in Java which allows log time removals and insertions. Lists are probably the most useful data structures in programming. Java provides a number of ways of creating a list out of the box with regular arrays, and the ArrayList, LinkedList and Vector...

Steven Hall

Handling Validation Error Messages in Struts2

I've recently been developing a web project using the Struts2 framework. A problem that came up during development was validation. More specifically, the way error messages and page redirects are sent back to the user. In this blog post I'll explain the problems I encountered, and some solutions to those...

Mark Rhodes

Sorted Lists in Java

This post goes through an implementation a SortedList in Java which ensures its elements are kept in order and guarantees O(log(n)) run time for all the basic operations: get, contains, remove and add. The source code, javadoc, unit tests and class files for this post are available here: Sorting...