Extreme Java – Training Courses

Extreme Java - Advanced Topics

During this 2-day course, we will study over 300 slides of advanced Java topics. Each major section is followed by practical hands-on exercises to apply what you have learned. Even the most experienced Java programmer will be stimulated and challenged.

This course is ideally suited to the professional Java programmer with at least 2 years experience, who would like to learn how to truly master the Java Programming Language.

Prerequisites

  • Preferably a formal qualification in computer science or related field.
  • At least two years of professional Java programming.


Extreme Java - Concurrency Performance for Java 8

This course is aimed at the busy Java professional who wants to quickly learn and apply new essentials on core Java topics. All topics have been thoroughly researched by Dr Heinz Kabutz, famous in over 135 countries for his Java Specialists' Newsletter.

During the course we use the new Java 8 syntax for lambdas and streams, making the code more readable. You will learn about threading, performance, compare-and-swap non-blocking constructs, garbage collectors and many other topics that you will be able to quickly apply in your own work. We will also cover all relevant constructs found in Java 8, such as StampedLock, LongAdder, parallel streams and many more. As a side effect, you will get familiar with Java 8 lambdas and streams.

During the training, you will always get a chance to try out what you have learned in carefully thought out exercises. This will help you understand and quickly internalize what you have just learned.

Course content

Day 1

  • Introduction
    • History of concurrency
    • Benefits of threads
    • Risks of threads
    • Threads are everywhere
    • Short Java 7 and 8 Primer
  • Thread Safety
    • Introduction to Thread Safety
    • Atomicity
    • Sharing Objects
    • Designing a thread-safe class
  • Building Blocks
    • Synchronized collections
    • Concurrent collections
    • Blocking queues and the producer-consumer pattern
    • Synchronizers
  • Building Blocks
    • The Executor framework
    • Finding exploitable parallelism
    • Using Parallel Streams (Java 8)
  • Cancellation
    • Cancellation
    • Interruption
    • Responding to interruption
    • Non-interruptible blocking


Day 2

  • Thread Pools
    • Homogenous, independent and thread-agnostic tasks
    • Sizing thread pools
    • Configuring ThreadPoolExecutor
  • Fork/Join
    • Basics
    • Example of a parallel recursive function
    • Managing Tasks
    • Use cases of fork/join
  • Avoiding Liveness Hazards
    • Deadlock
    • Avoiding and Diagnosing
    • Livelock
  • Testing Concurrent Programs
    • Testing for correctness
    • Testing for performance
  • Performance and Scalability
    • Thinking about performance
    • Amdahl's and Little's laws
    • Costs introduced by threads
    • Reducing lock contention
  • Explicit Locks
    • Lock and ReentrantLock
    • Performance considerations
    • Synchronized vs ReentrantLock
    • Read-write locks
    • StampedLock (Java 8)

Day 3

  • Building Custom Synchronizers
    • Managing state dependence
    • Using condition queues
    • Explicit condition objects
  • Atomic Variables and Nonblocking Synchronization
    • Disadvantages of locking
    • Hardware support
    • Atomic variable classes
    • Nonblocking algorithms
  • Performance
    • Java Memory
      • Garbage Collection
      • References
    • Java Optimizations
      • Tuning Process
      • JIT and HotSpot
      • Typical Problem Areas
  • Conclusion
    • Tips on where to learn more
    • Thank you!