NoSQL with Couchbase: Setting everything up with Docker

Docker shipping containers

Welcome to the promised NoSQL with Couchbase series, in these articles we are going to learn how to use a NoSQL database called Couchbase. We are going to investigate and learn what it is extremely good at and what it is not the best at. There is quite a lot of stuff to go through, I am imagining it being enough content for around 5-6 articles and therefore I feel like we have to split it up. This first episode we will focus on installation, and as a bonus, we will also get a quick introduction to another powerful tool called Docker.

Continue Reading

Java 9: Be reactive with Reactive Streams

Water stream

Java 9 comes with support for a feature that has been requested a lot, Reactive Streams. However, the idea of Reactive Streams isn’t anything new. It has existed in external libraries such as (and probably most popular) RxJava. But it’s nice to finally see support from it in an official Java release.

Continue Reading

Achieve thread-safety with immutability

Immutability vs. mutability

Mutable objects are different control in a multi-threaded environment and are prone to cause strange bugs and unexpected behaviors in your code. We are going to investigate why it’s usually better to work with immutable objects and learn good design patterns to help you as a developer achieve immutability.

Continue Reading

Improve your JUnit tests with Mockito and PowerMock

Testing library Mockito

Have you ever felt that your code was difficult to test because of your classes, for example, depends on something external? A typical issue is that you have some class managing database operations and during your tests, you don’t want to query the database as it is usually considered out of scope from unit tests. Well, no worries Mockito has got you covered.

Continue Reading

Make your application more resilient with retries

Resilience

Temporary hick-ups occurs from time to time and are quite difficult, if not impossible to entirely avoid. For example, if you are integrating with a REST service, or using a database to manage your data it is likely that at some point that your application won’t be able to reach the service or database. For example, Azure, which is considered to be a highly available service with almost no downtime can still only guarantee an uptime of 99.9%[1].

Continue Reading