DoppioJVM allows running multithreaded Java programs and other JVM languages in the browser. It supports native functionality by mapping JVM operations like file system access, memory, and networking to equivalent Doppio functionality. DoppioJVM implements key JVM features like multithreading using Doppio's thread pool, and stores call stacks and frames as JavaScript objects to enable suspension and resumption of execution.
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
DoppioJVM
1. DoppioJVM
▪ Supports multithreaded programs.
▪ Runs multiple languages that run on top of the JVM.
▪ Supports native functionality that JVM expect.
2. Suspend and resume
▪ The call stack must be stored in JavaScript Object.
▪ The program must periodically check if it should suspend.
▪ ECMAScript 6 ("yield").
5. Segmented execution.
▪ DoppioJVM use Doppio's suspend and resume functionality.
▪ DoppioJVM stack frame is JavaScript object.(Operand stack and local
variables).
6. File System
▪ DOPPIO’s file system implements the Node JS Buffer module in the
browser.
▪ DOPPIO emulates the Node JS file system module, fs, inside the
browser.
▪ DOPPIO’s emulated fs module is only responsible for interacting with
a single root file system
7. Native Methods
▪ Methods corresponding to the file system API use the DOPPIO file
system.
▪ Methods corresponding to unsafe memory operations use the
DOPPIO heap.
▪ Methods corresponding to network connections use DOPPIO
sockets.
8. Class Loading
▪ The DOPPIOJVM class loader uses the DOPPIO file system and its
Buffer module to appropriately download and parse JVM class files.
▪ File system backend launches an asynchronous download request for
the particular file to load it into memory before passing it to the class
loader for further execution.