How a Two-Decade-Old Issue Still Haunts Software Scalability by Luca Molteni and Francesco Nigro

Generics in Java can cause scalability issues like cache invalidation and broken stack traces. Learn how to identify and resolve these issues for optimal software performance.

Key takeaways
  • Generics in Java can introduce type checks that invalidate caches, leading to scalability issues.
  • The “secondary super cache” problem arises when the JVM checks whether a type implements an interface, causing cache invalidation.
  • The “broken frame” problem occurs when a profiler incorrectly reports stack traces due to the invalidation of the secondary super cache.
  • The “noisy neighbor” problem refers to the situation where multiple threads or applications running on the same JVM compete for shared resources, causing performance degradation.
  • The “low hanging fluids” problem describes simple and easily fixable performance issues that can have a significant impact on scalability.
  • The “type pollution agent” is a tool that detects and reports instances of type checks that can lead to cache invalidation.
  • The “rule engine” is a programming paradigm that allows developers to define custom logic and rules that can be easily edited and modified.
  • The “OptoPlanner” library is a rule engine that can be used to solve optimization problems.
  • The “DRUS” library is a rule engine that is used by OptoPlanner to evaluate heuristics and generate solutions.
  • The “RITI” data structure is used by DRUS to represent the rules and constraints of an optimization problem.
  • The “true sharing” problem occurs when multiple threads or applications share the same cache line, leading to contention and performance degradation.