Spring Cloud Sleuth is an awesome project that provides a way to trace requests that span multiple systems. Spring Cloud sleuth can optionally export this trace data to Zipkin where it can be visualized in a neat way. I especially love the fact that Spring Cloud Sleuth integrates deeply with Spring Integration and can nicely trace out the flow of a message.
In this post I present how you can control a situation in which there are multiple beans that qualifies for an injection point in Spring.
Microservices are not a trend anymore. Like it or not, they are here to stay. Yet, there’s a huge gap before embracing the microservice architecture and implementing them right. As a reminder, one might first want to check the many fallacies of distributed computed. Among all requirements necessary to overcome them is the ability to follow one HTTP request along microservices involved in a specific business scenario - for monitoring and debugging purpose.
JTemplate is an open-source implementation of the CTemplate templating system (aka “Mustache”) for Java. It also provides a set of classes for implementing template-driven REST services in Java. This article introduces the JTemplate framework and provides an overview of its key features.
This article gives you insight into the memory usage of Java™ code, covering the memory overhead of putting an int value into an Integer object, the cost of object delegation, and the memory efficiency of the different collection types. You'll learn how to determine where inefficiencies occur in your application and how to choose the right collections to improve your code.
Along with lambda expressions, Java SE 8 introduced method references as a shorthand notation. These are mostly used to reference static methods (e.g. Double::toString) or constructors (e.g. String::new), and these uses are straightforward. However, method references to instance methods can yield results that differ from lambda expressions in surprising ways. This is because the invocation target of a method reference – the part before the :: – is evaluated when its declaration is first encountered, whereas lambda expressions are only evaluated when actually called.
Let's say we're dealing with a number of input fields that require validation. The validation logic might be simple or complex, involving many different factors or parameters to validate a single field. Normally, we use a number of if...else blocks to validate each and every input field. This approach will lead to concerns regarding maintainability, readability, and extensibility. Hence, I would like to discuss the best approach using the Strategy pattern, but using Enum for the implementation. This approach was already used in one of my previous projects and proved to be useful. Let's start our discussion.
will show how I did implement it some time ago and saved more than 3.5 times the memory. I want to add though that it was a special case (works only on the hexadecimal strings) and most of the time it’s best not to reinvent the wheel.
Flink started as a German research project at universities in Berlin and Potsdam (“Flink” means “nimble” in German), and became an Apache Incubator project in 2014. Like Spark, it enables analysis of both batch and streaming data, replacing Hadoop’s MapReduce paradigm with a directed graph approach that leverages in-memory storage for massive performance gains.
Java Concurrency Tools for the JVM. This project aims to offer some concurrent data structures currently missing from the JDK
Simple implementation of ForceTouch on Android
Offline-First Reactive Android Apps (Repository Pattern + MVP + Dagger 2 + RxJava + ContentProvider)
GraphQL bindings for Neo4j, generates and runs Cypher