JAX London 2018

Roxana Popescu
Making Gumtree
Published in
8 min readOct 27, 2018

I had the great opportunity to participate in this conference along with my colleagues from Gumtree. We had a really great time and we learnt a lot of new and exciting things!

Jax London had something for everyone: talks about Java 9 and Java 11, Kubernetes, Microservices, but also talks about what’s hip and in trend right now: Blockchain and Kotlin, “the new kid on the block”. 4 full days of workshops and talks! The workshops tackled some hip themes: Developing Java applications on the Blockchain, Stream processing with Apache Kafka and KSQL, Java application security and Architectural Katas. I have to admit that the workshop content itself was a bit disappointing, you can do better next time, Jax London!

So here’s a little summary of the most interesting talks I attended to:

Day 1

Testing Microservices: From development to production by Daniel Bryant

The move to microservices brings new challenges with regards to testing systems. In theory, each microservice should be able to operate in isolation. But in reality, a service usually isn’t worth much without its counterparts. On the other hand — recreating the full system for testing just one service cancels out the benefits of modularity and encapsulation that microservices are expected to bring.

Daniel Bryant focuses on contract testing, API simulation and chaos experimentation, suggesting that they are useful and important strategies in microservices testing.

He divides the testing phase into 3 stages:

  • Testing in dev: Unit tests, Benchmarking, Property-based tests and Contract testing (CDC)
  • Pre-Production testing: config tests and integration testing with production
  • Testing in Production: Exploration chaos testing, monitoring distributed tracing canarying and A/B testing feature flagging.

Consumer-Driven Contract might be the answer to enabling Continuous Delivery without breaking interdependent services on every change:

  • Consumer writes a contract that defines an interaction with the API
  • Consumer issues a pull request to producer containing the contract
  • Producer runs the SUT and tests if the contract is valid. If yes, then simply accept the pull request. If no, then modify the SUT to meet the contract.

In the Test Pyramid, the place of contract testing would be somewhere between Component testing and End-to-end. Well-known frameworks for CDC are Pact and Spring Cloud Contract.

CDC

API simulation

  • is great when a dependency is expensive to access or tricky to mock
  • is useful when failure modes of dependency are hard to recreate
API simulation
API simulation

Chaos Engineering is the discipline of experimenting on a distributed system
in order to build confidence in the system’s capability
to withstand turbulent conditions in production

Fault injection and Chaos engineering prerequisites

  • High severity incident management
  • Monitoring
  • Measure the impact of downtime

Materials to read:

Changing Code with Kotlin by Darren Hobbs and Liz Keogh

Although I expected an elaborate comparison between Java and Kotlin, the presentation was quite refreshing and hands-on explaining the interesting features of Kotlin.

Null Safety

Kotlin has found a way to get rid of the scary NPE! It has two types of references that are interpreted by the compiler: those that are nullable and those that aren’t.

By default, Kotlin assumes a value cannot be null:

var a: String = "value"
a = null //compilation error

To be able to create a nullable reference, we need to append the question mark (?) at the end of the type definition:

var b: String? = "value"
b = null //works fine

Elvis operator

When we have a reference and we want to return a default value from the operation if the reference holds a null. To achieve that, we can use an elvis (?:) operator. This is the equivalent of orElse/orElseGet from Java Optional class:

val value: String? = null

Safe get calls

Safe call operator ?. calls the method if the property is not null or returns null if that property is null without throwing an NPE.

nullableVariable?.someMethodCall()

Var vs Val

Variables in Kotlin are declared either var or val.

var x = 3
x = 5 //it works without issues
val y = 3
y = 5 // compilation error

Migrating from Java to Kotlin

Migrations are always a pain, but Kotlin makes it somehow easy. Since it has been developed by JetBrains, Intellij offers a very nice tool for converting your Java classes into Kotlin.

Day 2

GraphQL — forget (the) REST? by Christian Schwendtner, Programmierfabrik

The speaker concentrated to show us why GraphQL could be a better choice in some cases than REST. GraphQL is an open source query language developed by Facebook.

GraphQL is a syntax that describes how to ask for data, and is generally used to load data from a server to a client. GraphQL has three main characteristics:

It lets the client specify exactly what data it needs.

It makes it easier to aggregate data from multiple sources.

It uses a type system to describe data.

The speaker underlines the difference between REST and GraphQL. REST is an architectural concept, has no official set of tools and its main focus is the API and the communication between server and client.

When can GraphQL be used?

REST focuses also on hypermedia controls (HATEOAS), which allows the client to navigate through the API. If your API doesn’t need hypermedia controls then GraphQL could be a better choice.

A GraphQL schema is at the centre of any GraphQL server implementation and describes the functionality available to the clients which connect to it. The schema has to define the query entry points for your objects and the operation (mutation - write or subscription — continuous read). Mutations are operations sent to the server to create, update or delete data. These are comparable to the PUT, POST, PATCH and DELETE verbs on REST-based APIs.

Can GraphQL and REST coexist? Of course. GraphQL can be used as a gateway to give the client a consistent view of the data. The GraphQL gateway wouldn’t load the data then itself, but rather call the existing REST endpoints and function as an aggregation point. This way, the client can benefit from the GraphQL flexibility and you get to keep the actual services as RESTful services.

You can read more here and here.

The importance of communication skills for software engineers, Erica Tanti, Ixaris Solutions

Erica Tanti approached very boldly the well-known stereotype: “software-engineers don’t have social skills”. She proposed a very simple (but yet difficult) solution: just speak. Communication is important and it is one of the key skills that makes collaboration and team work more effective.

The Agile manifesto says that the most efficient and effective method of conveying information to and within a development team is face-to-face conversation.

So how do we better ourselves at speaking? How do we get past the fear of making a fool of ourselves, being rejected by the audience? Erica invited us to make a small exercise and find a person in the conference room and talk to them. About what? Anything at all!

Some suggestions were:

  • Get involved in Scrum ceremonies. Do a demo, facilitate a retrospective, this way you can practice your speaking skills in a familiar environment: your team
  • Speak with someone you don’t know at a meetup or at a conference. How? Just approach them, say hello and ask what they liked about the event. Who knows? You might gain a business contact!
  • Give a talk to your company or at a meetup in your area. You don’t have to be an expert on the matter, you just have to share your knowledge with others.

The conclusion? Start speaking!

Effective leadership in Agile/DevOps environments by Michiel Rook, Touchdown Consulting Services

What makes a good leader? Michiel Rook tried to answer this question as best he could and he had a great insight!

Effective leadership

He starts by defining the types of leaders:

  • directive leaders: they command to their employees
  • servant leaders: they are good listeners, empathic, persuasive and don’t command the team, instead they work with the team to achieve the goals. They may be coaching or supporting the team with the decision-making.
  • situational leader: the leader changes their strategy depending on the person, situation or time.

What makes a leader good according to Michiel Rook is the ability to switch between leadership styles.

Some “must-have” traits would be:

  • be a visible and present leader, not just sit in your office and wait for people to come to you.
  • be empathic: understand your employees and listen to their day to day struggles
  • get out of the way: help your team be a self-organised team and not depend on you too much.
  • be vulnerable: don’t be afraid to show you are human too and admit your mistakes

An effective leader enables a team to reach its full potential. Michiel Rook

Making Microservices Micro with Istio and Kubernetes by Ray Tsang, Google

I must admit this presentation was one of the most enjoyable and valuable talks at Jax 2018.

Microservices architecture is being adopted by more and more companies, so it will still be here for quite a while. Along with the microservices architecture, comes a whole range of auxiliary tools.

Istio is an open source service mesh framework created by Google together with IBM, Lyft, Pivotal, Cisco and Red Hat.

Microservices with Istio and Kubernetes

How does Istio work?

  • it is split into a data plane and a control plane.
  • The data plane is composed of a set of intelligent proxies (Envoy) deployed as sidecars that mediate and control all network communication among microservices.
  • The control plane is responsible for managing and configuring proxies to route traffic and enforcing policies at runtime.
  • uses proxies that are usually deployed as sidecars in pods. A proxy controls access to another object. Istio uses proxies between services and clients. It enables the service mesh to manage interactions.

To start using Istio with Kubernetes, the only thing you need to do is to apply the configuration file in your namespace:

kubectl apply -f config.yaml

You can see the full talk here and go through a short tutorial here.

That was all guys! Happy coding and learning! You will be able to find all the talks on Youtube.

--

--