5 ms·
> The JVM is already open source. I can picture Google's lawyers using that in court against Oracle. > then the litigious organization issue might have been t
by ndesaulniers 11y ago
> The JVM is already open source.
I can picture Google's lawyers using that in court against Oracle.
> then the litigious organization issue might have been too
That might is a big MIGHT, the same kind that keeps browser vendors from shipping various media codecs and news companies from using various media streaming protocols.
> WebAssembly doesn't have a GC
The GC all browsers currently have and will not get rid of that I was referring to was the JavaScript VM.
> It also doesn't have ~20 years of performance tuning on different microarchitectures the way the JVM does.
And the JVM doesn't have the start up performance of any JS VM. I would estimate the number of exploits to be significantly higher for the JVM, but worth less.
> Benefits include getting scala, clojure, jython, jruby, and about 30 other languages working client side in the browser for free.
JS is the most compiled to language in existence. Also, my point has been none of this would be free. How do you integrate JVM with DOM? Who's going to rewrite all that? Who's GC cleans up around here?
> Not to mention the languages that have been statically compiled will run way faster than the equivalent JS.
Are you talking about WebAssembly here? Cause it sounds like you are.
- exabrial 11y agoThe startup performance of HotSpot is largely related to the SDK and class library. Remove it and you have a very expedient startup.
- ndesaulniers 11y agoPull an engine out of a car and it gets lighter, too.
- grizzles 11y agoI don't think this is a significant issue because it's a one time cost. It could be done at browser startup. Even for a cold start, Hotspot and V8 are comparable. $ time java com.Hello real 0m0.096s user 0m0.103s sys 0m0.013s $ time node /tmp/hello.js real 0m0.073s user 0m0.067s sys 0m0.007s
- invalidname 11y agoFunny ;-) I actually worked for Sun/Oracle on VM's but on the embedded not hotspot team. The trick is actually simpler and its called MVM, which is something Sun kept avoiding on the desktop/server for some stupid reason but we did do it on mobile and it made startup almost instant. The trick is to share one VM instance between multiple apps. So when the OS starts you start the VM process and then fork with a lot of the JITted code already in place so you get almost instant startup and reasonable process isolation. In mobile where there are some restrictions this is very practical. On the desktop/server this gets a bit tricky with bytecode manipulation, classloaders etc. But this is totally doable. My personal uninformed theory is that Sun or Oracle didn't do this because they didn't care. MVM has two use cases: faster startup/lower overhead on desktops (they don't care about that). Server efficiency in small scale deployments (which they don't care about either). AFAIK Google did some work on MVM for App Engine Java, but those are just rumors.
- quotemstr 11y agoMVM relies on the runtime system to enforce security isolation. In a system like Android that allows unrestricted loading of native code, this scheme can't work, since there's no way to get arbitrary native code to play along with the runtime security model. Personally, I feel much more confident with the kernel enforcing application isolation than I would feel about relying on the Java security model.
- saurik 11y agoAs a sibling comment pointed out, Android already does this. To learn (an insane amount of) more detail about how this works, read this article I wrote a while back on how Process Loading on various systems is optimized. http://www.cydiasubstrate.com/id/727f62ed-69d3-4956-86b2-bc0ffea110c1/ http://www.cydiasubstrate.com/id/727f62ed-69d3-4956-86b2-bc0...
- quotemstr 11y agoIt's not the same thing at all. Android first makes a process template, then takes clippings for each process it wants to run. That's not the same as running different applications in the same process.
- pron 11y ago> I can picture Google's lawyers using that in court against Oracle. Google chose not to use OpenJDK (and they've obviously not complied with its license so far), so it being open source is irrelevant.