Last week during my JavaOne talk titled “One JVM To Monitor Them All” I proposed a new approach to distributed/parallel computation based on thereplication of software execution behavior across one or more processing units in which the simulated played back behavior is augmented with extended software execution behavior.
Execute once. Simulate anywhere. Augment anytime.
Instead of forking asynchronous tasks at particular points in the execution of code, the same thread call stack execution behavior (but not actual class byte code) is replicated to multiple simulating machines in which the asynchronous task, such as a cross cutting concern like auditing, is executed like it was within the same thread execution context (of the simulation). This allows us to program such extensions in a more natural synchronous style but still execute in a distributed asynchronous manner if need be. An added benefit is that we can choose to execute the augmentation of the behavior local or remote, online or offline without changing a single line of code in the extension. This is aspect oriented programming (AOP) on a whole new level in which we alter both the space (location) and time (online, delayed, offline) aspects of a cross cutting concern whilst maintaining the calling context (thread stack) as well possible execution path histories (behavioral change sets). Try to imagine your code executing simultaneous at multiple locations but within each location the triggered behavior associated with such code execution is potentially different and possibly isolated.