You want to improve performance by running your code on multiple threads? Then this training is for you!

This workshop covers the best ways to run code in parallel in Java today. We will deep dive into the concept of a thread pool executor, heavily used over the past 20+ years and present in every major modern Java framework. We'll see how they work, how big should you size them, how to avoid blocking precious threads, as well as pitfalls in exception handling, parallel streams, and Thread Locals.


This is the recording of a 3.5 hours live webinar that took place in December 2020.


Agenda

  • Thread - Fundamentals
  • Why not to manually create threads
  • Thread Pool Executors: deep explanations
  • Sizing a Thread Pool: Goetz Formula
  • CompletableFutures
  • @Async (Spring)
  • Handle HTTP Requests Asynchronously
  • parallelStream Best Practices
  • ForkJoinPool
  • Thread Locals Best Practices
  • Handling Exceptions from other threads


What to expect?

We will solve together a series of exercises in Java (70% of the time) exploring the behavior of the tools we cover, discussing their intended purpose, pros and cons of each in detail. The coding will be backed by explanations of key theoretical concepts and demonstrated whenever via performance benchmarks. We will make some brief reference to the Spring Framework, but all the ideas are directly applicable to any other frameworks in Java: JavaEE, Quarkus and Micronaut.

After following this workshop, you'll acquire a solid knowledge about multithreading and you will take away at least a dozen of key practical techniques that you can apply to any real-life work involving multithreading. Expect an intense experience, as usual!

Disclaimer: Concurrency is a huge topic. The training does NOT cover concurrency control, race bugs, or deadlocks, nor ReactiveX or Akka Actors. Those might become the topic of another a future training.


Target Audience

Any Java developer, ideally with some prior contact with multi-thread code.


Technical Requirements

I would recommend you get yourself a black coffee and you pay close attention to the discussion, stop the recording at any moment and try to reproduce what I'm doing on your own machine. In the resources section you can find the code zipped together with the git history, so you can explore my commits if you get lost. If still can't make it work, please don't hesitate to email me!

To run the project you will need a Java 8+ SDK installed, a decent IDE, and access to GitHub and Maven Central.


Optional Prep

You can find more details about completable futures and parallel streams online, such as these:


P.S.: The content is distilled from my 2-days (16-hours) Performance training. If you are interested in a private dedicated session for your company, please find here my entire curricula and contact details.

Course Curriculum

  Multi-threading in Java
Available in days
days after you enroll

Trainer: Victor Rentea

​Victor Rentea is a Java Champion and Associate Professor at UPB writing code for over two decades in many languages.

Since 2012 he is coaching and teaching others on day-to-day coding topics, having developed by now an extensive curricula that cover most of the software best practices and typical Java-stack development. ​Today, over 40 companies bring him in for consultancy or training sessions. Thousands of developers and students have attended his classes by now and left him many recommendations on LinkedInFacebook, and on victorrentea.ro.

Victor is best known for the enthusiasm and depth of his talks, which you can also enjoy during his courses and webinars. To share his passion for Clean Code and Unit Testing, he founded the Bucharest Software Craftsmanship Community, one of the largest developer communities today in Romania.

Choose a Pricing Option

Frequently Asked Questions


Can I get an invoice for my company (VAT-free)?

To add the VAT code of your company to the checkout page and remove the VAT taxes, follow these simple steps.


Can I ask questions after I watch the recording?

PLEASE DO! Email me your questions, no matter how silly or complex you may think they are. I'd be glad to help, so don't hesitate to contact me.


How long do I have access to the course?

How does lifetime access sound? After enrolling, you have unlimited access to this course for as long as you like - across any and all devices you own.


What if I am unhappy with the course?

We would never want you to be unhappy! If you are unsatisfied with your purchase, contact us in the first 30 days and we will give you a full refund.


Can I have this training for more of my colleagues?

There are two ways I can help you:

  • For 5+ developers, contact me for a discount and a company invoice
  • For 10+ developers or for a longer in-depth session, contact me for a dedicated webinar for your company.