Dual JVM
From APIDesign
| Line 3: | Line 3: | ||
The initial part of [[Java]] application is [[AOT]] compiled and as such it ''starts blazingly'' fast. At any time it can launch [[HotSpot]] [[JVM]] in the same process and run the remaining parts of the [[Java]] application ''more dynamically'' and [[JIT]] compile them. | The initial part of [[Java]] application is [[AOT]] compiled and as such it ''starts blazingly'' fast. At any time it can launch [[HotSpot]] [[JVM]] in the same process and run the remaining parts of the [[Java]] application ''more dynamically'' and [[JIT]] compile them. | ||
| - | The essential part of the [[Dual JVM]] system | + | The essential part of the [[Dual JVM]] system design includes an ''effective exchange'' of data between those two [[JVM]]s. The system allows '''zero copy''' exchange of data allocated as direct NIO {{JDK|java/nio|Buffer}}''s between those two [[JVM]]s. |
Current revision
A heroic effort was needed to marry the fast start of the Enso engine (to be attributed to AOT compilation) with the need to dynamically load JVM classes. The effort is being called a "dual JVM" (see slides) because there are two Java virtual machines running in the single Enso process communicating effectively with each other.
The initial part of Java application is AOT compiled and as such it starts blazingly fast. At any time it can launch HotSpot JVM in the same process and run the remaining parts of the Java application more dynamically and JIT compile them.
The essential part of the Dual JVM system design includes an effective exchange of data between those two JVMs. The system allows zero copy exchange of data allocated as direct NIO Buffers between those two JVMs.