A couple days ago I attended Spring I/O 2017 in Barcelona and here some of my thoughts.

First day

Keynote- The only constant is change

The keynote was given by Andy Wilkinson and Stephane Nicoll (Stephane actually did the live coding sessions on stage). Andy talked about Spring Framework’s approach to the continuous changes in our (software) industry and how Spring portfolio manages to adapt. Also he talked about the new features Spring 5 is adding like functional bean registration, functional router registration, reactive data access etc. Especially the Spring team has put in effort into the functional router registration, which is the equivalent of the Spring MVC annotation programming model but more explicit (more framework less magic + no reflection) and flexible, but more on that later. Statistics from “start.spring.io” were shown. Clearly, JPA is by far number one choice for all starting projects with MongoDB following the lead. Also, Kotlin seems to be gaining ground over Groovy (Java, of course, is king ~ >80% of projects). Additionally, Kotlin is treated as a first class citizen in Spring 5 with many useful Kotlin extensions shipped in Spring 5.

Reactor 3, the reactive foundation for Java 8 (and Spring 5) - Simon Baisle

Simon did a Reactor 101, talked about Reactor 3 types (Flux 0..N elements, Mono 0..1 elements), operators (map, filter, buffer, retry, flatMap), backpressure, testing and debugging. Reactor is a Java framework that directly builds on Reactive Streams specification ([http: //www.reactive-streams.org/](http://www.reactive-streams.org/)) also Reactive Streams have been incorporated into the JDK as java.util.concurrent.Flow in version 9\. The need behind Reactor is efficient resource utilization. e.x. process higher load with fewer threads.

Spring 5 is using Reactor behind the scenes to implement:

  • WebFlux
  • Spring Data (reactive repositories) - build on top of Reactive drivers NoSQL: MongoDB, Couchbase, Redis, Cassandra , SQL databases not supported
  • Reactor Kafka currently in M2
  • etc

New in Spring 5 - Arjen Poutsma

Introduced the new Functional API in Spring 5. Arjen was one of the authors of the Spring annotation model and actually started his talk with the downsides of that approach (annotations) e.x. a lot of magic involved, difficult to debug, runtime overhead due to reflection

the new functional API is more explicit but avoids any reflection and can be more customizable

Hands-on reactive applications with Spring Framework 5 [WORKSHOP]

Spend the rest of the first day doing a workshop with Violeta Georgieva, Brian Clozel. Experienced the Spring 5 Flux API hands on and it was indeed a great workshop. I, also, really liked the part that they talked about some performance testing they did on WebFlux. They wrote their own JMeter plugin using the WebClient (reactive client in Spring 5) and a few Spring 5 applications and presented to us graphs on threads in use, CPU usage, memory usage. WebFlux was a clear winner in the sense that it was fully utilizing the machine it was running on e.x. 200 concurrent users in blocking fashion had equivalent CPU usage with 800 concurrent users in reactive non-blocking fashion. They both did a great job and there were both really friendly and resourceful.

Second day

Functional web applications with Spring and Kotlin

My favorite talk, hands down. I started learning Kotlin a couple weeks ago and it’s been a great ride. Lately, Kotlin has gained a lot of ground, many companies rewriting their Java codebases in Kotlin, Google announced that it will be the official language for Android, Gradle supporting Kotlin in scripts and plugins, Spring 5 treating it as a first class citizen. Compared the language to

  • Java - great interoperability
  • Groovy - statically typed
  • Scala - simpler, pragmatic
  • Swift - very close, both great languages

Talked about some key features of the language namely type inference, string interpolation, smart casts, default parameters, named parameters, when expression, properties, extension functions (really cool feature coming from C#), null safety, better lamdas, data classes, co-routines etc Kotlin works really well with Spring also Kotlin Extensions for Spring 5 improve a lot the experience for devs.

The road to serverless - Dave Syer

Dave Syer presented for the first time a new project called Spring Cloud Function. Explained the concept of “Serverless”, which is a “dump” name, since it does not mean the absence of servers. In reality what “Serverless” it trying to accomplish is the decoupling of the business code from infrastructural concerns, containers, etc by using a function (lambda) programming model. It’s still too early to say anything about this project or if it is going to get any traction, but I really enjoyed the presentation.

Caching made Bootiful - Neil Stevenson

Another nice talk. I have heard good words about Hazelcast and I wanted to find out how it looks like. He showcased Fibonacci program and he would go ahead and use caching in it. He started from in-memory cache, Hazelcast server cache, Hazelcast client cache and finally, Hazelcast using Java JCache JSR107. Let us not forget though that caching is a hard problem for a reason.

Reactive Meets Data Access - Christoph Strobl

Showcased some of the breaking changes that Spring Data Kay is bringing

  • No more Serializable in ID
  • No More returning null from Repositories
  • Composable interfaces - interfaces that you extend are broken down to smaller ones, so you can pick
  • Consistent naming -> finOne to findById
  • Builder style template APIs
  • Reactive Data Access