Home » Author Archives: Tomasz Nurkiewicz

Author Archives: Tomasz Nurkiewicz

Java EE developer, Scala enthusiast. Enjoying data analysis and visualization. Strongly believes in the power of testing and automation.

Small scale stream processing kata. Part 2: RxJava 1.x/2.x

java-logo

In part 1: thread pools we designed and implemented relatively simple system for processing events in real time. Make sure you read previous part as it contains some classes that we’ll reuse. Just in case here are the requirements: A system delivers around one thousand events per second. Each Event has at least two attributes: clientId – we expect up ...

Read More »

Small scale stream processing kata. Part 1: thread pools

java-logo

Once again I prepared a programming contest on GeeCON 2016 for my company. This time the assignment required designing and optionally implementing a system given the following requirements: A system delivers around one thousand events per second. Each Event has at least two attributes: clientId – we expect up to few events per second for one client UUID – globally ...

Read More »

Guide to time and date in Java

java-logo

Properly handling dates, time, time zones, daylight saving time, leap years and such has been my pet peeve for a long time. This article is not a comprehensive guide to time domain, see Date and time in Java – much more detailed but slightly, ekhem, dated. It’s still relevant, but doesn’t cover java.time from Java 8. I want to cover ...

Read More »

Functor and monad examples in plain Java

java-logo

This article was initially an appendix in our Reactive Programming with RxJava book. However introduction to monads, albeit very much related to reactive programming, didn’t suit very well. So I decided to take it out and publish separately as a blog post. I am aware that “my very own, half correct and half complete explanation of monads” is the new ...

Read More »

Spock VW: writing custom Spock framework extensions

java-interview-questions-answers

Spock framework has multiple built-in extensions that support many core features like @Ignore and @Timeout annotations. But more importantly developers are encouraged to write their own extensions. For example SpringExtension nicely integrates Spock with Spring framework. Writing custom extensions is not very well documented. In this article we will write very simple extension. It is not a comprehensive guide but ...

Read More »

Dependency injection: syntax sugar over function composition

scala-logo

Quoting Dependency Injection Demystified: “Dependency Injection” is a 25-dollar term for a 5-cent concept. *James Shore, 22 Mar, 2006 Dependency injection, as much as it is important when writing testable, composable and well-structured applications, means nothing more than having objects with constructors. In this article I want to show you how dependency injection is basically just a syntax sugar that ...

Read More »

Displaying progress of Spring application startup in web browser

spring-interview-questions-answers

When you restart your enterprise application, what do your clients see when they open the web browser? They see nothing, server doesn’t respond yet so web browser displays ERR_CONNECTION_REFUSED Web proxy (if any) in front of your application notices that it’s down and display “friendly” error message The website takes forever to load – it accepted socket connection and HTTP ...

Read More »

Server-sent events with RxJava and SseEmitter

java-interview-questions-answers

Spring framework 4.2 GA is almost released, let’s look at some new features it provides. The one that got my attention is a simple new class SseEmitter – an abstraction over sever-sent events easily used in Spring MVC controllers. SSE is a technology that allows you to stream data from server to the browser within one HTTP connection in one ...

Read More »

RESTful considered harmful

software-development-2-logo

I don’t like RESTful principles and APIs. In recent years it is seen as universal protocol for inter-process communication, especially in distributed systems. However I see many deficiencies of REST and there are alternatives that work well for certain use cases. Obviously there is no one size fits all, I just want to emphasize that REST architecture is flawed in ...

Read More »

Want to take your Java skills to the next level?

Grab our programming books for FREE!

Here are some of the eBooks you will get:

  • Spring Interview QnA
  • Multithreading & Concurrency QnA
  • JPA Minibook
  • JVM Troubleshooting Guide
  • Advanced Java
  • Java Interview QnA
  • Java Design Patterns