|
|
|
|
|
by brabel
882 days ago
|
|
Exactly... the JVM is incredibly dynamic. It's gone totally out of fashion because of security and complexity, but I used to enjoy using OSGi to load just about any Java library into the runtime by typing its Maven coordinates, then immediately start using the library from a shell... and then just remove that lib if I didn't "like it" and it would be gone as if it never existed... I don't think a lot of people realize you can quite easily do that kind of thing on the JVM. |
|
That said, make no mistake, an OSGI module can easily fall into that sweet spot of compiling and reloading fast enough to fall within the cognitive loop of effectively being “instant”.
And if you organize your code well, other parts of the overall app are (mostly) unaware something has changed. Java can be quite dynamic but has not formalized things like dynamic class change lifecycle. OSGI does expose that, and lets the rest of the code tap into that so it can handle change more robustly.