JHUG meetup October 20th 2017

On Friday the 20th of October we held our latest JHUG meetup (Meetup.com event). Our host was Advantage FSE, who also hosted another meetup last year. Apart from their presentation room, Advantage FSE kindly offered coffee, pizza and beverages.

This was the first meetup for the 2017-2018 season, and we were happy to have gathered around 90 JHUG members plus around 20 employees of our host. Seeing that there is this kind of interest for the meetup is indeed very encouraging for us, the organisers.

Some devops information: Although we recorded the presentations, due to a glitch with our new recording equipment (a generous offer by yours truly), we were not able to record the sound. This means that the sound in the videos to come will be the one captured by the camera.

Moving on with the presentations. Sam Shemirani (Linkedin) made a presentation on “Microservices with Spring Boot”. Sam walked us through the subject using their project that implements the EU PSD2 directive that has to do with credit card charges on banking systems. He began with some basic ideas on Microservices vs Monoliths and advantages and disadvantages of each architectural paradigm. He then explored several aspects which are important to implement a Microservices architecture, the first being authentication. He also explained how their system makes use of Netflix Eureca for service discovery and Netflix Zuul for routing incoming requests to different microservices (hence the universal hostname and port for all requests). He overviewed two flows of oAuth (which his team decided to use over JWT) and performed a demo with Postman on their API. Another concern Sam explored is centralised logging, which helps figure out the sequence of requests spanning several microservices. His team implements centralised logging using Logback, Apache Kafka and the Elastic Stack. Their system makes use of Docker for the containerisation of the microservices. This also enables using a container orchestration system (such as Kubernetes or Docker Swarm) for deployment, monitoring, elasticity and scaling. A very interesting part of the presentation is how Spring Boot brings all this together for us. If you haven’t seen it already, you will be impressed with Spring Initializr, where you can check the dependencies you need, and a new project will be generated for you where you can start writing your business logic. You can find the slides here and watch the video below:

The second presentation was by Ioannis Kolaxis (Linkedin, Twitter), who talked about Java 9. The first key feature he presented was, naturally, modules. Ioannis explained how modules further refine access control in our codebase, and that the feature was indeed huge, as it incorporated splitting the JVM itself into modules. A (big, red) cherry on top is the jlink tool, with which we can “generate” a custom, lightweight JVM, which only contains the modules our code needs. Ioannis went on with the syntactic sugar Java 9 brings for defining immutable collections, and the gotcha of random iteration order for unordered collections. Another big change is in garbage collection, where G1 is the new default. As Ioannis said, G1 is a low latency-oriented garbage collector, which uses several smaller regions (instead of 2 bigger ones for Young and Old generation). Java 9 changed the memory representation of Strings, which makes them more compact. Java 9 also brings new classes for native process handling and a brand new HTTP client, which also supports HTTP2. Finally, Ioannis demonstrated the jshell (Java Shell) tool, a REPL tool like the ones commonly used with scripting languages. Jshell is ideal for trying out and experimenting with small snippets of code without having to recompile - redeploy our application. You can find the slides here and watch the video below:

At the end of the meetup, we gave away a copy of Spring Microservices in Action and a copy of Java 9 Modularity.

See you all at the next meetup!

Written on October 20, 2017