May 2018: Interviews, Spring I/O and more

Hard to believe, May is already gone. The month was pretty though for me, it startet with a bike crash for me, that cost me a bike and some time at the doctors.

Interviews and articles

I was very happy about publications at Heise Developer. First of all there has been a recap about JavaLand 2018 and the mentoring program in which I took part: Die jungen Wilden pt. 2.

Next was an interview conducted by Thorben Janssen with me, also for Heise Developer: Im Gespräch: Michael Simons über Spring Boot 2 und sein neues Buch. Thanks a lot for that, Thorben!

There was another interview I did during JAX last month with the JAXenter: Michael Simons über Softwarearchitektur. My series of articles about Spring Boot 2 has been translated to English for the international version of JAXenter as well: part 1, part 2, part 3 and part 4.

And last but not least, I wrote a piece for Informatik Aktuell about 4 years of Spring Boot: 4 Jahre Spring Boot.

My book is available on Amazon, as paperback and Kindle-Edition.

Spring I/O 2018

I did travel a lot in May, some holiday, but also work. I was at Spring I/O again, this time with a session about Micrometer:

Micrometer and metrics are a super interesting topic. I put a lot of effort into this talk and into the demo. To my personal disappointment, I delivered the talk not as good as I wished. The month with it’s bad start and the traveling took a bigger toll on me than expected. Anyway. I tried something new and published my personal transcribed for the talk as well, find it here. The sources for the demo are – as always – on GitHub.

| Comments (0) »

28-May-18


April recap: JAX 2018 and having a bestselling book on Amazon

We’re only in for 4 months in 2018 and I can not believe all the stuff already happened. I did one final iteration of my talk about Spring Boot starters at JUG Saxony in Leipzig. It was their 100th meet up and the welcomed me with great hospitality. I was very happy to meet my friend Oliver there. Just a day later, several colleagues from INNOQ and I met at our Berlin office for a workshop about cherishing communication by Spring Boot Book started to appear in physical form on Amazon and other shops just in time for JAX.

My colleagues Martin and Simon at the booth:


Thanks a lot to Ralf for helping us with the booth. Also for challenging me with a complicated topic which should be way more simple:

I had a fresh new talk with Michael Plöd about Spring Boot 2 hot topics on a ridiculously large stage:


The talk went very well and spiked the sales of the book a lot, resulting in this:


I’m actually a bit overwhelmed. The book hitting place #478 in all German books by the end of Thursday was a blast. Thank you kind people out there for supporting me. Keep sending me all those unwrapping pictures, I’m already looking forward to your feedback. Maybe in form of a review?

JAX itself ended for me coaching in an architecture retreat with Susanne, Peter, Jörg and Eberhard. It started a bit out of my comfort zone but it was a good thing todo.

Back to the book:

Analysing a book

The following content is a Jupyter notebook. It’s an embedded Gist. You can clone it and use it as a base for your own experiments.

| Comments (0) »

28-Apr-18


March 2018 recap

March 2018 was a damn crazy month. It began with the release of Spring Boot 2.0 which meant big congratulations to the whole Spring Boot team and more work on my side: I’ve updated all examples for the Spring Boot Buch, went through the manuscript one last time and sent it to my publisher. I’ve written the book with LaTeX, using Minted and Pygments for syntax highlighting and I think the people at DA-TEX did a stellar job for the final typesetting:



Also thanks to René Schönfeldt at dpunkt for your support during the last year and getting that thing to the printing plant in March. Also many thanks to Eberhard Wolff. He helped me with valuable feedback and mentoring throughout the last year. The book should hit stores any time soon now. You may get it at Amazon or an ePub version at dpunkt plus.

Dating back to November of last year, Dominik asked me to write about Spring Boot 2 for JAXenter. Those articles came out in March, too:

Those post are German but are being translated for the english portal as well at the moment. I’m quite impressed how many rubber boot pictures are out there.

And then there was JavaLand 2018. I have been to every installment of JavaLand, have been involved two times in the program committee, spent last year as a mentor at JavaLand4Kids and this year, I could be a mentor for my friend Felix who spoke about generating tests in the newcomer track in the fully booked tent:



Thanks a lot for putting your trust in me, Felix! Inspired by the success we had and Timothées talk about mentoring, I’d love to do that again.

I myself feel blessed and lucky. 2 years ago, I was invited to speak at Spring I/O 2016 about Spring Boot starter. First public talk ever and from there on the ride got a bit crazy. 15 more talks leading to this audience at JavaLand and I’m still totally stocked:



Thank for being there!

Last but not least: Several services I worked on the last 3 months went into production. One based on a mix of Jersey/JAX-RS/HK2, two Spring Boot based. I’m totally thrilled how easy one could integrate Spring Boot with just a few starters into a foreign ecosystem.
The team basically could still write JAX-RS-Resources as used too and enjoying all the good stuff that comes with the Spring ecosystem, mainly Spring Data repositories and especially Spring Integration. Incredible how easy and clean flows can be defined by the Java-DSL. I was asked what the advantage of Spring Boot was for the new services compared to the old stack: Even though I had to write some integration points, we could work on a much faster pace, having to deal a lot less with plumbing code and concentrate on the business value.

April will start with vacation for me and hopefully, I’ll finally hold a copy of my book in my hands during the next days.

| Comments (0) »

31-Mar-18


Code examples in your Keynote or Powerpoint-Presentations

Code examples, when nicely executed, are a good and valid alternative to live coding. In the end, when you’re not Venkat or Josh, what is live coding anyway? Most of the time one does rehearse the code anyway 😉

Before you add code to your slides, have a look at this presentation by Uri Native called codeware.

One option to get nice code into your presentation regardless wether you’re using a tool like Powerpoint, Google Slides or Reveal.JS are images. Carbon is one way to create nice images from code.

I personally like (or, TBH dislike the least) Keynote, so images are not the first format I’d chose, especially if I want to generate PDFs from presentations who’s code can be copy and pasted. Therefor I run with highlight by André Simon.

Install it with Homebrew brew install highlight and then you can use it’s RTF output option to create RTF data that can be pasted into Keynote (or Powerpoint) as you like. Combine it with pbpaste and pbcopy for an easy workflow without intermediate files. pbcopy is a terminal tool that copies content piped to it into your macOS clipboard.

Here are some examples:

# Highlight a Java source file and copy it's content to your clipboard
highlight DemoWebFlux.java --style zellner -O rtf | pbcopy
# Paste unformatted JSON code, format it and then highlight and copy it
pbpaste | python -m json.tool | highlight --style zellner -O rtf --syntax json | pbcopy

I think you get the point. Just insert the formatted RTF data into your deck. Most of the time I try to increase the font size as much as possible.

I’m using this in my slides and I am pretty happy with it.

| Comments (2) »

10-Mar-18


Revised Actuators in Spring Boot 2

This post has been featured on This Week in Spring – February 20th, 2018 and I’m feel honored to be referred as “Spring community legend” but even more so to be listed next to a lot of people who’s work I use on a daily basis. Thanks, Josh.

Tim from Ordina posted a nice blog recently, about Visualizing your Spring Integration components & flows. As it happens, I’m currently using Spring Integration as well and find the Integration Graph really useful.

Tim recommends just adding the integretion-http component, but I cannot do this because the project uses JAX-RS and Jersey.

Here is where the revised Actuator support in Spring Boot 2 really shines: Actuator isn’t depending on a specific technology anymore, like Spring MVC, Jersey or for that matter, Spring WebFlux.

Existing and custom endpoints are technology agnostic and can be written without thinking about Spring MVC or Jersey.

Here’s what you need todo to provide Springs Integration Graph pretty much like @EnableIntegrationGraphController but without tying yourself to a specific web technology and at the same time, profiting from all the infrastructure behind Actuator:

import org.springframework.boot.actuate.autoconfigure.web.ManagementContextConfiguration;
import org.springframework.boot.actuate.endpoint.annotation.Endpoint;
import org.springframework.boot.actuate.endpoint.annotation.ReadOperation;
import org.springframework.boot.actuate.endpoint.annotation.WriteOperation;
import org.springframework.context.annotation.Bean;
import org.springframework.integration.support.management.graph.Graph;
import org.springframework.integration.support.management.graph.IntegrationGraphServer;
 
/**
 * Provides insights into the integration graph and flow.
 *
 * @author michael@simons.ac
 */
@ManagementContextConfiguration
public class IntegrationGraphEndpointConfig {
 
   @Bean
   public IntegrationGraphServer integrationGraphServer() {
      return new IntegrationGraphServer();
   }
 
   @Bean
   public IntegrationGraphEndpoint integrationGraphEndpoint(final IntegrationGraphServer integrationGraphServer) {
      return new IntegrationGraphEndpoint(integrationGraphServer);
   }
 
   @Endpoint(id = "integration")
   static class IntegrationGraphEndpoint {
 
      private final IntegrationGraphServer integrationGraphServer;
 
      public IntegrationGraphEndpoint(IntegrationGraphServer integrationGraphServer) {
         this.integrationGraphServer = integrationGraphServer;
      }
 
      @ReadOperation
      public Graph getGraph() {
         return this.integrationGraphServer.getGraph();
      }
 
 
      @WriteOperation
      public Graph rebuildAndGetGraph() {
         return this.integrationGraphServer.rebuild();
      }
   }
}

@ManagementContextConfiguration is a specialized configuration that only deals with management endpoint config. It creates an instance of IntegrationGraphServer and passes it on to an IntegrationGraphEndpoint which is marked as such. The endpoint has a read and a write operation, the later mapping automatically to a POST-request.

Note: You should register your custom endpoint configuration in /META-INF/spring.factories. The management endpoints can be configured to live in a different Spring context and the specialized configuration may not be part of regular auto configuration. For the example above that would look something like this:

org.springframework.boot.actuate.autoconfigure.ManagementContextConfiguration = \
  your.package.IntegrationGraphEndpointConfig

The above endpoint will work only in the same context as the main application, as IntegrationGraphServer needs access to the application context containing your flows. But I have the impression I’ve successfully nerd-snipped Tim.

And just like that, I can build upon Tims nice D3.js based Spring-Integration getting the data from /actuator/integration.

This and more is part of the upcoming German Spring Boot Buch.

| Comments (0) »

13-Feb-18