Ramblings of a Java developer and OSS fanatic

Hystrix and Spring Boot

Making your application resilient to failure can seem like a daunting task. Those who read “Release It!” know how many aspects there can be to making your application ready for the apocalypse. Luckily we live in a world where a lot of software needs such resilience and where there are companies who are willing to share their solutions.

Enter what Netflix has created: Hystrix.

RAML: How Specification Becomes Documentation and Testing

In my last post I talked about what annoys me about Swagger. This evening, I took the time to see whether there are any good alternatives out there. As it seems, there are a lot of them. Two of them I found especially worth looking at: API BluePrint and RAML. This article is about RAML, but I’ll definitely post another one on API BluePrint.

RAML is a specification format that looks like a YAML file. It describes how a REST webservice should look like and how it should behave with regards to return values. In short, it’s what WSDL is to SOAP webservices. RAML specifications are not hard to write and is a top-down approach to REST webservices, unlike Swagger, which is a bottom-up tool mainly aimed towards documentation. You’ll write the RAML specification before writing the code.

Swagger Is Great, But…

Nobody likes to write documentation. However, in the REST age where REST-based webservices are obiquitous, documentation for public webservices is a necessity. There are a lot of tools out there that provide REST documentation generation, but there’s one that stands above the rest (pun intended): Swagger. Swagger is a JSON format that describes a REST webservice. However, the strength of Swagger is the UI, which is a JavaScript HTML5 UI that is just awesome.

Spring Boot’s Info Endpoint, Git and Gradle

I’m a huge fan of Spring Boot. I really like how it has raised my level of productivity and the ease of adoption. I also use Git on a day to day basis. However, the integration of information of your Git repository in Spring Boot is not that straightforward if you’re using Gradle. Luckily it’s not that much work, as you’ll see.

On Polyphasic Sleeping

Some time ago, I tried a new way of sleeping. It’s called polyphasic sleeping and basically consists of trading core sleep for intermediate naps. The big advantage is that you need overall less sleep than you would need if you’d take a single main period of sleep (called a core sleep). A normal person on average needs about 8 hours of core sleep a day when using a monophasic rhythm. There are 3 main variants of polyphasic sleeping: the siesta, the everyman and the uberman. Every variant is more extreme.