Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The real killer app would be the ability to fully containerize all jvm instances running on any given box.

It will be a setup where one jvm instance on the host basically serves the role of "master" in terms of class data and shared object loading while each container instance uses its memory allotment only for running computations specific to the application in that container while sharing memory objects with other containers as much as possible.

It is possible to do something similar at the moment but it requires going through a hodge-podge of painful hacks. A seamless solution to this would basically make the jvm an out of the box poor man's polyglot PaaS platform.



> It will be a setup where one jvm instance on the host basically serves the role of "master" in terms of class data and shared object loading while each container instance uses its memory allotment only for running computations specific to the application in that container while sharing memory objects with other containers as much as possible.

Eclipse OpenJ9 does something like this.

> A seamless solution to this would basically make the jvm an out of the box poor man's polyglot PaaS platform.

Trying to recreate OS resource-allocation guarantees without the the OS has been a bit of a fool's errand, historically. The OS has privileged access to hardware -- it has a view of activity and an ability to enforce guarantees that processes lack.

Add to that the amount of time and effort that has gone into operating systems to cover allocation of so many different kinds of resource under so many different conditions. It is really expensive to re-engineer that capability.

I've seen a lot of attempts at trying to share ostensibly multiuser systems above the OS level and they have mostly been unhappy once there is heavy usage. Databases, queues, the JVM, everything eventually needs to be isolated from unrelated workloads at some point. Containers and VMs are much better at providing that capability.


Aren't you describing every OS since Solaris 2.x that uses shared pages across processes as well as Solaris 2.x did?


My OS internals knowledge is rusty so I am not sure they are quite the same but likely similar.

If you think of a typical jvm application (true for non-jvm apps as well), a significant chunk of class data will be shared since apps are typically using the same libraries (with deltas in versions), allowing easy reuse of class data across all container instances on a host would be a major scalability advance.


There is a java feature called class data sharing that does that since Java 5 but I've never seen it in the wild.[0]

Java 10 will bring AppCDS via JEP 310[1]

[0]https://fosdem.org/2018/schedule/event/class_data_sharing

[1]http://openjdk.java.net/jeps/310


Similar to the goals of the multi-tenant virtual machine (MVM)?

I feel like all this cloud, container stuff is incrementally, painfully evolving towards grid computing and agents. Kinda like reinventing LISP or Prolog like features with your own 'C' runtime, instead of just using LISP or Prolog.


There was a JSR-121 Application Isolation proposal, that sounds similar to what you're talking about. I'm not sure why it didn't gain traction:

http://www.oracle.com/technetwork/articles/javase/mvm-141094... https://www.jcp.org/en/jsr/detail?id=121




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: