Talk

Threading lightly with Kotlin

Hands-on Lab
Programming Languages

Most developers have written or used concurrent code during their careers. Those who use Java are probably familiar with the traditional unit of concurrency: the Thread. Kotlin brought first-class support to a different concurrency paradigm, called coroutines. These were created in the sixties... Why are they important again, after 50 years? Let’s find out!

This session intends to demonstrate the differences between concurrency models based on threads and concurrency models based on coroutines. We will discuss what coroutines are and what they are not, and answer questions such as:

  • How different are coroutines and Threads?
  • Are there any new pitfalls that developers should be aware of?
  • Do the traditional synchronization methods available in the JRE still apply?

 

During the session, we'll present several hands-on exercises that allow participants to see with their own eyes the way how coroutines work and experience the differences and similarities between Kotlin and Java concurrency models. We'll discuss the performance, memory usage, and complexity of both models.

At the end of this session, participants will have a good grasp of the paradigm shift that Kotlin coroutines brought to the JVM.

(Pre)requisites

Participants must bring their own laptop for this session.

We expect participants to have some notions of threading, concurrency, parallelism, and synchronization. Participants only need a basic working knowledge of the Kotlin language.

Coroutines
Concurrency
Kotlin

Vasco Veloso

Code Nomads

Vasco Veloso has been developing software for over twenty years. From assembly, through C, C++ and Prolog, to Java, Scala and Kotlin, on big and small computers, from floppy disks to SSDs, on-premises and cloud, he's been there, done that and used it. He loves to learn how things work and then show others what he found: even disassembled his grandfather's watch as a kid. Then grew up to (dis)assemble not only software but also hardware in the form of embedded systems. His current challenges come from his work as a a Senior Software Developer / Architect at Code Nomads in Amsterdam. He brings teams together to produce well-crafted software. He still enjoys to share knowledge by teaching and learning, and continues to design software and connected devices. In his spare time, he’s discovering the city of Amsterdam, loves photography and is very much interested in the aviation industry. Has flown ultralight aircraft and truly believes in the focus necessary to keep flying, reach the destination and still enjoy the scenery along the way.

Riccardo Felipe Taddei Mascarenhas

Code Nomads

Riccardo is a passionate and ambitious senior full-stack developer with 9+ years of experience. He likes to work on both the backend and frontend. Worked extensively with Java, Kotlin, and almost all features of the Spring framework on the backend. His frontend skills are considered good while he's familiar with its technologies, like Angular and AngularJS, NgRx, Karma, Jest, Codecept.js, Cypress.io, and Jasmine. But his real knowledge lies on the backend side, where he likes a lot of modern architectural approaches, like Domain-Driven Design, CQRS, and microservices architecture. He is a perfectionist, who genuinely cares about proper testing and code quality - TDD is the way to go! Riccardo is experienced with testing tools, like Junit, Mockito, REST Assured, and Cucumber. He's worked with multiple types of databases in his careers, such as MongoDB, PostgreSQL, and Oracle. Besides that, he also is experienced with JDBC, and he knows his way in tools like Maven, Git, and Docker. Following courses and learning about new technologies are his hobbies. Mastering all aspects of software development, both backend and frontend, is his goal. In his spare time, he likes to play videogames and have a beer with his friends. Of course, he only has time for that, if he's not following an online course…