Devoxx Poland (June 23, 2017, Krakow)

Devoxx Poland is an annual Java conference held in Krakow Congress Centre with over 2000 attendees. We will give you a small insight into what we've learned there and what we've found interesting.

This year the organizers tried their utmost best to improve the conference in all areas. Great talks, workshops and more available rooms made it possible to have 6 simultaneous learning experiences! Job well done.

 

 

Below are our insights from the presentations we attended:

 

gRPC – a high performance, open-source, universal RPC framework 

Mete Atamel from Google gave us an introduction to gRPC, which is a good alternative to REST or SOAP. Comparing to REST, gRPC offers better performance (HTTP2, Protocol Buffer) and more features (streaming, blocking and not-blocking connection). It supports various languages and platforms. Mete showed us a tutorial how to do a gRPC communication between Spring Boot Java and .NET applications.  

gRPC has many benefits, but there is also one disadvantage. You need to use a specific gRPC code style and the actual gRPC-generated code when using this technology. This may not suit everyone. My conclusion is that due to great performance and used HTTP2, gRPC is perfect for internal service communication, but REST may be better as an external interface. 

Load testing like a pro 

Rob Harrop talked about why load testing is important and how it helps us. It is important to properly set up the load tests and perform them regularly to see any changes in performance. In our current project, we perform load tests every two weeks and monitor various variables. One of them is response time or delay. We should not only look at average or mean delay, but also 95th or 99th percentile of the delay distribution to better understand how our system behaves under specific load (or even whole statistics/histogram). After that we will know that only 1% of operations are slower than the 95th percentile. Our test environment and test cases should be as close as possible to production.  

In short, load testing should give us answers to three basic questions: 

  1. What latency do I see with X concurrent users? 
  2. How many users can I handle before latency exceeds X milliseconds? 
  3. How many users can I handle before my systems are saturated? 

 

Demonic annotations

An interesting talk was given by Jarek Ratajski who described annotations as demons. The original idea behind annotations in Java was just to mark, emphasize something or help the compiler (e.g. @Override, @Immutable or @Deprecated) instead of complex logic. Due to missing advanced language syntax features (like Lambda's features in Java 8), library creators re-used the annotations via reflection for needed configurations and hidden complex logic. However, it is questionable whether using annotations is a real programming or not. Definitely it is not imperative programming, but it may be considered as some kind of declarative functional programming paradigm. For example, Spring config classes look like XML files just rewritten into Java. We experienced several issues with annotations in container-based dependency injection: 

  • Extremely hard to debug; 
  • no constructors; 
  • no threads; 
  • our bean can be auto-wired somewhere else and its state can be changed; 
  • complicated objects lifecycle; 
  • numerous dependencies; 
  • broken encapsulation. 

 

Jshell 

A lot of talks focused on the future of Java 9 and its modular functionality. However, it also comes with one addition which should not be overlooked – Jshell. JShell is a Java read-eval-print loop tool which could be used to evaluate simple Java commands. It supports many interesting features like usage of variables or defining your custom methods. 

In order to use Jshell, the only thing you need is the latest Java 9 JDK installed. Typing command jshell -v inside your JDK bin directory will open the Jshell console and you are good to go. 

Why should you use Jshell? 

Using tools like JShell helps you with testing code snippets rapidly without creating a new project. More interestingly, you could try new Java 9 features as well. Therefore, if you are that type of a developer who is interested in the newest Java 9 features and want to try them out, JShell is a simple way of doing that. 

 

Kotlin – your 2017 Java replacement 

We enjoyed various presentations about Kotlin language - statically typed programming language for modern multi platform applications. We heard in the past about Scala and currently, we use Groovy. Both are similar to Kotlin, however, as of May 2017, Kotlin is also backed up by Google itself. It has become an official language for Android development and that is why we were interested.  

Why should you consider using Kotlin?  

The main reason why Kotlin is better than Java is safety. It helps to avoid NullPointerExceptions with compilation error if variables or parameters are not explicitly defined as nullable. 

var output: String  
output = null // Compilation error  

 

In order for this to work, we have to define variable output as nullable:

var output: String? = “abc” 
output = null 

 

If we decide to call methods on output object, the compiler will report an error, since there is a possibility that variable output is null. In order to avoid it we should use ''safe call operator'' defined as ''?''.

output?.length

 

Safe calls are useful in chained calls as well 

bob?.department?.head?.name 

 

Such a chain will return null if any of those nullable variables are null.  

Of course, for those who want to throw exceptions when values are null, there is an option as well. Operator ‘!!’ will throw NullPointerException (NPE) when the value is NULL. For example: 

val l = b!!.length 

 

Thus, if you want an NPE, you have to define it explicitly. 

There are a lot more safety options which are available in Kotlin, such as safe casts or collections of nullable types. We no longer have to do those checks or filters manually – Kotlin provides those features automatically.

 

Kotlin support in Spring Framework 5.0 

As of version 5.0, Spring framework will introduce dedicated support for Kotlin framework. Support at start.spring.io was already added and more improvements are coming up. One of the interesting features is that you don’t need to declare your bean class as open anymore. 

Until now, all Kotlin classes which were used as @Configuration class, or other CGLIB annotations, needed to be defined with an open keyword. The root cause of this was the fact that all Kotlin classes are final by default.  

Alongside with fun operator overloading, simpler class definitions and much more, we feel that Kotlin is an interesting choice. 

 

 

Other engaging topics

 

Remoting 

The main conference sponsor was CrossOver that specializes on 100% remote work and employs the best talents all over the world. This means they can cover more hours of the day with supporting their products without anyone needing to work overtime. This in an interesting concept which they believe will be a standard in a couple of years. They shared their experience with us and explained how to resolve the issues with remoting. They need to communicate well and they use free or cheap tools for that: skype for 1-to-1, Zoom and Goto meeting for conferencing. 

 

Kafka messaging 

Messaging system Kafka provides a very good performance even for big systems. But compared to ActiveMQ and RapidMQ it supports fewer features, but those can be added by custom implementations. Except for performance, Kafka also provides distributed topics with no global ordering (every topic can be ordered by particular ordering) and persistence. If the recipient was shut down, then undelivered messages can be easily retrieved again. 

 

What type of a developer are you? 

Ted Neward presented some thoughts about polytech careerism. There are two basic types of a developer, "|type" is not motivated to learn new things; this type works on the same project and uses the same technologies. On the other hand, "- type" wants to learn and try new technologies. But the best type is "T type" developer, that is a combination of both. This type recommends us to learn exactly one new thing every year (either language, database, platform, library etc.) to extend our view to something new. But try to find something that is really new or different. Learning C# when you are a Java Developer is not enough, because both are similar. 

  

Fun talks and building relationships 

At the end of the first day, there were a couple of informal "Bird of a Feather" (BOF) discussions. One or more moderators discussed with the audience what they are interested in. I've attended Spring BOF with Josh Long and five more people from Spring and we discussed ... Spring :) Mainly Spring 5 with reactive support, relation to Java 9 and HTTP2. 

Devoxx conference is not only about the presentations and workshops. It also has a lot of other activities to interact with people and get to know each other. We really enjoyed speaking with different companies and learning about their products and ways of working.

 

 

Don't forget to play 

Every year Devoxx tries to bring something exciting and new, this year wasn't different. Every Devoxx attendee was given an access to Devskiller challenge which took up to 5 hours. The best and fastest amongst all developers who participated earned a free ticket for the next year's Devoxx conference. It was a fun way of trying your skills and seeing how fast you can finish the given assignment. No, we did not win it. 

Similarly, as other years, Devoxx Huntly also took place. It is a contest where you must search for hidden QR spots which are distributed across entire building and earn points for scanning them. It was a lot of fun trying to figure out different clues we were given. 

 

Last thoughts

We wish we could tell you more, because Devoxx was full of inspiring topics. Here are some key recommendations that we learnt and that can help us: 

  • Use less annotations. 
  • Periodic Load testing. 
  • Avoid test-ice cream, do a test-pyramid! 
  • Be aware of JVM warm up - the first requests after the restart may be slower. 
  • Start using Spring 5 and JVM9 with HTTP2. 
  • If possible, don't do microservices! 
  • Be a T-type developer. 
  • Learn exactly ONE new thing every year. 

Devoxx gave us a lot to think about and new ideas to explore in detail. We can only encourage you to try it on your own and join us next year. See you there! 

 

Publikované: 26. júl 2017 15:38
  • Michal Braško

    Senior Java Developer

    Michal je ďalším z našej armády Java Developerov. Poteší ho krásne napísaný kód ako báseň a vysoké pokrytie testami. Prišiel k nám z anglického online supermarketu Ocado (niečo ako potravinový Amazon), pre ktorý vyvíjal backend softvér na optimálne riadenie automatizovaného skladu. Mimo práce sa venuje najmä svojim dvom malým deťom, rodine a turistike.

  • Jozef Burgel

    Java Developer

    Jozef pracuje ako Java Developer v žilinskej pobočke Davinci. Jave a objektovému programovaniu sa venuje už niekoľko rokov, pričom získal znalosti z technológií ako Gwt, Hibernate, Spring, Maven či JSF. Programovanie samo o sebe je jeho najväčšou záľubou vďaka tomu, že ponúka veľký priestor kreativite riešenia problémov. Aj napriek nábehu na workoholika je stále dobre naladený. Vo voľnom čase si dobíja baterky spoločenským tancom, športom či stolovými hrami.

We want you

Do you see yourself working with us? Check out our vacancies. Is your ideal vacancy not in the list? Please send an open application. We are interested in new talents, both young and experienced.

Join us