4 ms·
Java also has arrays. And on heap/off heap RAM allocation. We deploy all our services as uberjars, we have a single Amazon AMI with JDK 8 installed. It's prett
by Xorlev 12y ago
Java also has arrays. And on heap/off heap RAM allocation.
We deploy all our services as uberjars, we have a single Amazon AMI with JDK 8 installed. It's pretty frictionless. It goes from a simple Gradle project, to a single jar on S3, and pulled from S3 by our AMI. Automatically launches via an upstart script.
I'll give you less RAM usage for sure. But when I'm launching a whole VM for a service anyways, I don't care that much. I tend to lean toward Go when I want a low-footprint coprocess for another service, or other small apps.
- kasey_junk 12y agoComparing Java's off heap allocation to golangs (or the CLRs) structs is pretty misleading isn't it? I mean there are all kinds of things you can do off heap to reduce gc, but the other platforms make it easy.
- vardump 12y agoJava doesn't have Object or any Object derivative arrays. Only elementary types can be arrays. Of which reference type is one. So when you say: Integer[] boxedInts = new Integer[5]; You're allocating an array of references with length of 5, so usually 5 * 4 + 8 bytes. Additionally, each of the referenced Integer Object instance take up 16 bytes. Multiple arrays (or reference fields) can refer to same Object instance. The example was about Integers, but it's basically the same story for FactoryWorkerPersons. Java doesn't have arrays of objects. Only arrays of elementary types, up to 2^31-1 entries.
- vorg 12y agoI see you use both Groovy (for Gradle) and Golang. Do you have any installation problems with version management using "GVM", the name chosen for the popular "Go Version Manager" and then used again for VMWare's "Groovy Version Manager"? The Groovy project managers haven't made clear whether they're going to fix this problem, or even explained why they used a name already in use. That project seems to have lots of issues over choice of names.