August 30, 2017

​ When Hystrix Cannot Save Us


Hystrix with Spring Boot in 2 Minutes


Today, the creation of web applications has been made really easy with frameworks like Spring Boot. Let's say we want to be sure that our application remains responsive even if a third party system does not answer our requests. Here’s how we can solve this problem with Spring Boot in some code snippets coming directly from our payment component:

The EnableHystrix annotation does the following, according to its JavaDoc:
All it does is turn on circuit breakers and let the autoconfiguration find the Hystrix classes if they are available (i.e., you also need Hystrix on the classpath).
Apart from that, we only need to add the HystrixCommand annotation to the methods, which we can cancel, in the case of a timeout or error:

August 17, 2017

Quick Note: ADFS Authentication for Microsoft Dynamics 365

This is a quick note about a problem that took me several hours to figure out because there is few helpful information out there. So if you happen to have a Microsoft Dynamics 365 system and want to fetch an authentication token from ADFS, read on.

The Problem

Microsoft Dynamics 365 is a tool to manage customer relations (CRM), and we use it to track all communication with our B2B customers. The problem at hand was to feed it some information about customer from another system (written in Java), and thankfully, Dynamics has a webservice, so this should be easy.