Forum Controls
Spotlight Features

The Rich Engineering Heritage Behind Dependency Injection

Andrew McVeigh takes us on a tour of the rich heritage behind dependency injection, what it represents, and tells us why its here to stay.

NetBeans 6: Matisse Updates

NetBeans 6 delivers great updates to the Matisse GUI builder. Spend a few minutes with Roman Strobl and get an expert briefing on what's new and what has changed.

Introduction to Groovy Part 3

In this, the third and final installation of Andres' Introduction to Groovy series, you learn about how Groovy handles variable numbers of arguments, named parameters, currying, and more about Groovy operators. Including, some new operators.

Easier Custom Components with Swing Fuse

Swing Fuse (actually just Fuse), is a framework designed to make it easier to create your own custom desktop components. In this article, Daniel Spiewak shows you how to get started and provides sample source code you can download.

Benchmark Analysis: Guice vs Spring

Willam Louth shows how he uses JXInsight Probes to investigate probable performance issues with code bases that he is not familiar with. He also highlights possible pitfalls in creating a benchmark, as well as in the analysis of results.
Replies: 198 - Pages: 14   [ 1 2 3 4 5 6 7 8 9 10 | Next ]
  Click to reply to this thread Reply

Multi-tasking Virtual Machine (MVM)

URL: Chet Haase's Blog

At 6:47 AM on Jul 25, 2005, Serge Bureau DeveloperZone Top 100 wrote:

http://weblogs.java.net/blog/chet/archive/2005/06/mmmmmm_vm.html

It is years that we all hope for MVM, and now this guys comes in and try to tell us that it is not really a bad thing so it is not a priority ?

This is the most demanded feature and they try to convince us that we should not wish for it ?

Plus he has the audacity of not liking to be flamed, sorry but I have little respect for people ignoring the users.

What do you people think ?

This guy is just about saying that starting many JVM is preferable. Am I alone pissed off at this ?

They think it ia a niche only for servers ? What a ridiculous assesment, clients needs that much more.

How the hell can we convince people to use JWS in those conditions ?

Incredible.
1 . At 7:01 AM on Jul 25, 2005, Romain Guy DeveloperZone Top 100 wrote:
  Click to reply to this thread Reply

Re: Multi-tasking Virtual Machine (MVM)

Well at leat Chet explains his point of view. You forgot to do that. Instead of just being pissed off, please try to explain why he is wrong.
Romain Guy
Romain Guy's Java Weblog, #ProgX, Jext
2 . At 7:41 AM on Jul 25, 2005, Manjuka Soysa DeveloperZone Top 100 wrote:
  Click to reply to this thread Reply

Re: Multi-tasking Virtual Machine (MVM)

> How the hell can we convince people to use JWS in
> those conditions ?
>

Give them minimum specs for a decent machine.. something like 512MB Ram, 2GHz CPU, and you'll be fine.
3 . At 8:33 AM on Jul 25, 2005, Rob Abbe DeveloperZone Top 100 wrote:
  Click to reply to this thread Reply

Re: Multi-tasking Virtual Machine (MVM)

I doubt Chet was forced to write anything and in many ways I feel he is correct. Running applications from various vendors under the same VM could be problematic. It adds too many variables to test and could be difficult to support.

However, like you I would like to see the MVM released sooner rather than later because occasionally customers will want to run Swing applications on Citrix or on Terminal Server boxes causing a VM to be loaded for each user accessing the application.

My limited understanding of the MVM is that it would allow a single JVM to service many clients in this situation.
4 . At 9:38 AM on Jul 25, 2005, murphee (Werner Schuster) DeveloperZone Top 100 wrote:
  Click to reply to this thread Reply

Re: Multi-tasking Virtual Machine (MVM)

> This guy is just about saying that starting many JVM
> is preferable. Am I alone pissed off at this ?

You're the only one who *wants* to be pissed of at his blog...

> They think it ia a niche only for servers ? What a
> ridiculous assesment, clients needs that much more.

Isolation and something like the MVM is very useful, on both server and client, but it's not going to solve all problems that Java faces on the client.

> How the hell can we convince people to use JWS in
> those conditions ?

How is Webstart connected to the MVM?
The MVM still needs to be launched, so the first app still has a bad startup time. Even if you were to launch it in the background at startup, I'm not sure it would stay there... I'd certainly do a "killall mvm" if I saw a huge process just hanging around in my memory doing nothing (I also don't like the OpenOffice.org preload feature)... and many people are likely to do the same (maybe not killall, but through some OS optimizers that turn off unneeded processes and services).

The MVM is also only really useful on 64 bit systems, as 32 bit systems only have 2 or 3 Gigs of address space available (4 Gig is the max, but no enduser systems are likely to have support for that activated). 2 Gigs of address space is already cramped enough with one app, now try running several apps in there... now imagine having to stuff several applications into that. It's not about the memory use, it's about where to put all the GC heaps, and generations, stacks,...
Sure, it's possible for apps with small heap requirements... but then one app comes along and tries to mmap a 600 MB file (video player, ...) ... and fails because there just isn't a large enough block of continous address space left...
So... running several apps in one address space is only real fun on 64 bit systems.

Oh... and with the MVM, you'd better not use *any* JNI calls, because their performance is bound to be very bad: To maintain stability, JNI calls need to be isolated to another OS address space; you can imagine that using IPC for every single JNI call can't be very fast... and I'm not sure what kind of speed impact this would have on data shared in DirectBuffers (there might be shared memory tricks to solve that).
All this means: no JNI at all. Ie. no JOGL (or any other OpenGL stuff), no JDIC API calls or native Browser component integration, no embedded COM components,... and all the other uses for native code.
(see the comments section of Chets Blog: I posted a link to an old MVM paper detailing the solution for isolating JNI calls).

You also have to keep in mind that you won't get much benefit for large apps. Try launching Netbeans and then Eclipse... big amounts of app specific class files that would all need to get loaded, verified and processed... just the fact that you have the JVM fired up and parts of the rt.jar loaded doesn't help much (not to forget that sharing and loading of rt.jar is already much improved with CDS).

Which brings us to another item: The Native code generated by the Dynamic Compiler... one could say that this could be shared and it would be convenient if one app is already running, because another started app could already benefit from the compiled and optimized native code.
BUT: I suspect that this might give you better load times, but not better performance, because Hotspot might need to generate (or even de-optimize to) code that is more generally usable, but not as fast as it could be.
Why? Lets say one app needs class B1, which is derived from class A and which overrides an abstract method Foo() from class A. Now... Hotspot can inline the Foo() method, as there's only one version of that method in the whole JVM... no need to use the vtable lookup.
However: now you load a 2nd application in the MVM... and this needs classes B1 and another class B2 also derived from class A. Hotspot now needs to fall back to using vtable lookups for the Foo() method, because now there are two versions of Foo(), depending on the receiving object.
What does this mean: the first application will run slower than it *could*. This is not a hypothetical case.

Oh... BTW: sharing app specific classes is promised for a future JVM... either Mustang or Dolphin... can't remember which one.



Now... don't get me wrong: I'd like to have the MVM in the standard Java platform as well; mostly because there are many applications and use cases where my above mentioned arguments and problems don't matter.

*BUT*: You shouldn't think of the MVM as the solution to all your problems.

- Startup time: can be solved BUT only if the MVM is running when your app starts.
- Memory Usage: Well, the only thing shared would be generated native code from the dynamic compiler, and maybe some application specific classes (remember, rt.jar is already shared). BUT: if you have large apps that need lots of resources, you won't gain anything, because they'd still need their memory (if you have to run an app that... for instance, needs 120 MB of resources per instance... how much would you actually save by running several of those instances in the same MVM?)

You do, though, get potential problems:
- Everything runs inside one OS process. If that gets killed or crashes for some reason, then *all* your apps are gone. The source base for the JVM/MVM might well get better and more stable, but that doesn't mean that instable drivers or other things couldn't mess up your MVM (see the trouble DirectX or OpenGL graphics drivers; and those failures woulnd't be contained by JNI isolation, as they'd be run in the same address space as the MVM).
- performance problems: Hotspot might refrain from some optimizations; JNI performance could be very bad; ...
5 . At 9:46 AM on Jul 25, 2005, Dorel Vaida wrote:
  Click to reply to this thread Reply

Re: Multi-tasking Virtual Machine (MVM)

> Incredible.

No. It is just you who is incredible. The guy explained what he thinks about MVM. That is freedom of speech and opinion. He just said what he thinks about MVM. BTW I tend to agree 100% with him but that is not the point.

The point is that you tend to be a communist sometimes and do not accept other's opinions just because they are not similar to yours. You've started lots of flame wars here on Javalobby and they always ended with people correcting you instead of giving you answers because you don't seek answers but you fight with everybody no matter you are right or wrong. Now that is credible !

PS: You are pretty late with this post, he commented about MVM quite a while ago.
6 . At 9:59 AM on Jul 25, 2005, Dorel Vaida wrote:
  Click to reply to this thread Reply

Re: Multi-tasking Virtual Machine (MVM)

> > Incredible.
>
> No. It is just you who is incredible. The guy
> explained what he thinks about MVM. That is freedom
> of speech and opinion. He just said what he thinks
> about MVM. BTW I tend to agree 100% with him but that
> is not the point.
>
> The point is that you tend to be a communist
> sometimes and do not accept other's opinions just
> because they are not similar to yours. You've started
> lots of flame wars here on Javalobby and they always
> ended with people correcting you instead of giving
> you answers because you don't seek answers but you
> fight with everybody no matter you are right or
> wrong. Now that is credible !
>
> PS: You are pretty late with this post, he commented
> about MVM quite a while ago.


Now, just to show what I was talking about I've just got to read your comment to his blog and his reply to your comment:

Your comment:

> You are pretty much out of arguments. What you say is
> ridiculous. Applications running together have no reason
> to crash more than all separetely, plus there is some
> opensource projects doing it. You are volontarely
> slowing the progress of Java. Yes, go loose time on
> ridiculous annotation, and do not give MVM. If I was
> your boss, I would fire you to show so much arrogance
> and ignorance about the user's, it is sickening.

Ouch. It is only me who doesn't find any SUBSTANCE in what you are saying ?

Now his reply:

> Wow - I think you missed the point of the blog by a
> pretty wide margin. If I felt so strongly against doing
> anything in this area, I wouldn't have even bothered to
> write the blog because it wouldn't be worth discussing.
>
> The point of this blog was to bring up some of the items
> that come up in the context of "should we or shouldn't
> we", and to gather feedback and conversation on the pros
> and cons involved. I think a lot of the points raised in
> the comments above are great, and I'm mulling over them
> (along with other people at Sun). Flaming me for
> bringing up the topic and encouraging discussion seems a
> bit silly...

It's only me who notices the plain and simple common sense Chet displays ?
7 . At 10:17 AM on Jul 25, 2005, Christopher Brown DeveloperZone Top 100 wrote:
  Click to reply to this thread Reply

Re: Multi-tasking Virtual Machine (MVM)

I've noticed too.

Did Serge read any of Chet's other blog entries? Have a look at some of the other projects Chet's been involved with, such as subpixel anti-aliasing, graphics acceleration, and a LOT of other stuff? Perhaps Serge wouldn't mind doing without these developments?

I wonder if we could have a troll filter on JavaLobby...
8 . At 10:19 AM on Jul 25, 2005, Serge Bureau DeveloperZone Top 100 wrote:
  Click to reply to this thread Reply

Re: Multi-tasking Virtual Machine (MVM)

> Well at leat Chet explains his point of view. You
> forgot to do that. Instead of just being pissed off,
> please try to explain why he is wrong.

Are you serious ???
You mean that you think that it is also dangerous and is only needed by a niche of uses ?

Why don't we all go to single task OS ?

This as to be the single most important thing that is topping Java on the desktop, not SWING, MVM !!!!

Try to explain to a newcommer that each new programs needs a whole JVM, and then look at it's face ?

His argument's do not hold water.

We do not have it in rev6, how about 7 , probably not, now it will be more than 13 years before seing MVM ????

If he does not see the use for it, he should hide somewhere.
9 . At 10:26 AM on Jul 25, 2005, Serge Bureau DeveloperZone Top 100 wrote:
  Click to reply to this thread Reply

Re: Multi-tasking Virtual Machine (MVM)

> I've noticed too.
>
> Did Serge read any of Chet's other blog entries?
> Have a look at some of the other projects Chet's
> s been involved with, such as subpixel anti-aliasing,
> graphics acceleration, and a LOT of other stuff?
> Perhaps Serge wouldn't mind doing without these
> e developments?
>
> I wonder if we could have a troll filter on
> JavaLobby...


Actually, I would prefer MVM to all those improvements, plus if we had MVM sooner it might have triggered interest in Java on desktop, and have brought more rapid improvements because of the increased interest.
10 . At 10:31 AM on Jul 25, 2005, Jamie Lawrence wrote:
  Click to reply to this thread Reply

Re: Multi-tasking Virtual Machine (MVM)

Serge, why don't you just stop being a Java user? I can't imagine anyone here is going to complain. It's not like you're much of an asset judging by the comments you've previously made (check his profile for previous postings).

Dear JavaLobby administrators: The JavaLobby chat thing was great but it would be more useful if I can hide all posts from trolls like Serge. Thank you.

With regards to MVM, I think Chet is probably right with the cautious approach. MVM technology would be really handy but it also breaks one of the fundamental features of Java (one JVM = one application), which we've all grown up with, and I'm sure there will be plenty of unintended and unimaginable consequences if MVM became the default virtual machine. Having said that, I would like to see it on the desktop as it would probably increase the performance of small Java apps and utilities.
11 . At 10:33 AM on Jul 25, 2005, Serge Bureau DeveloperZone Top 100 wrote:
  Click to reply to this thread Reply

Re: Multi-tasking Virtual Machine (MVM)

> > How the hell can we convince people to use JWS in
> > those conditions ?
> >
>
> Give them minimum specs for a decent machine..
> something like 512MB Ram, 2GHz CPU, and you'll be
> fine.

How are you guys working ?

Use an IDE ? Have a small editor always opened ?

When I work ther is often an IDE, I use also a Java database, I hav a small editor in Java for files not being code, often a Java server , etc...

Now that is 4 or 5 JVM. The rest are native apps, that if they where in Java (I can hope).

So do we need MVM ?

The Chet's argument against's MVM have no real weight, as you would not be forced to use more than one app if you wish at the time, but I use a computer for that, to be able to run multiple program concurrently.

And the sharing has many advantages. Sorry but it is not his choice to make !

They are volontarely posponing what people very often asked, for no good reason.
12 . At 10:41 AM on Jul 25, 2005, Serge Bureau DeveloperZone Top 100 wrote:
  Click to reply to this thread Reply

Re: Multi-tasking Virtual Machine (MVM)

> I doubt Chet was forced to write anything and in many
> ways I feel he is correct. Running applications from
> various vendors under the same VM could be
> problematic. It adds too many variables to test and
> could be difficult to support.

Nobody climed it was simple.
But do tell me that, do not invent all kinds of disadvantages and try to explain that us poor user's do not understand.
Sure it is complicated, but how many years is that been requested ? It is not more complex than a lot of what they already did.

> However, like you I would like to see the MVM
> released sooner rather than later because
> occasionally customers will want to run Swing
> applications on Citrix or on Terminal Server boxes
> causing a VM to be loaded for each user accessing the
> application.

This and also, the desktop would badly need that.

> My limited understanding of the MVM is that it would
> allow a single JVM to service many clients in this
> situation.

Thre is actually ways to do this with your apps, but it implies that you must take care of it, and yes it is not simple, that is why it would be best if directly inside the distribution, plus it would be standard.

I am sure he was not forced to write anything, but the raesons he gives are known since years, we want this, not a little text to say we should be happy that they are not doing it.

I see no excuse for that.
13 . At 10:49 AM on Jul 25, 2005, Serge Bureau DeveloperZone Top 100 wrote:
  Click to reply to this thread Reply

Re: Multi-tasking Virtual Machine (MVM)

> Serge, why don't you just stop being a Java user? I
> can't imagine anyone here is going to complain. It's
> not like you're much of an asset judging by the
> comments you've previously made (check his profile
> for previous postings).

I am pretty sure, that with nobody ever complaining Java would improve much faster.

> Dear JavaLobby administrators: The JavaLobby
> chat thing was great but it would be more useful if I
> can hide all posts from trolls like Serge. Thank
> you.

> With regards to MVM, I think Chet is probably right
> with the cautious approach. MVM technology would be
> really handy but it also breaks one of the
> fundamental features of Java (one JVM = one
> application), which we've all grown up with, and I'm
> sure there will be plenty of unintended and
> unimaginable consequences if MVM became the default
> virtual machine. Having said that, I would like to
> see it on the desktop as it would probably increase
> the performance of small Java apps and utilities.


Sure, why don't we all go back to single tasking OS ?
Or maybe we should get rid of color screens, it is so confusing ?
Don't buid airplanes as they could fall ?

Get the point ?

It is not his call to decide if we wish to run many application in one JVM, plus all the problems he talks about can be the same when you allow dynamic class loading as one class can kill your program.

To have a real desktop in Java you need some form of MVM.

Plus what are you talking about ? Being cautious ?
The JVM is 10 years old, and this has been asked for at least 5, and fromwhat he says we can hope at best for another 3 years. Sorry, but this is much more than cautious.

Can't you see that ?

So I am alone, thinking that ?
14 . At 10:49 AM on Jul 25, 2005, Andrea Aime DeveloperZone Top 100 wrote:
  Click to reply to this thread Reply

Re: Multi-tasking Virtual Machine (MVM)

I too hope to see the MVM soon. But that's for another reason: I want to see Java as an option on cheap hosting ISP.

Now if I want to publish a dynamic site I have to choose between PHP, ASP, ASP.NET sometimes python, never Java.
Java is provided only on dedicated servers. This is because you cannot keep a single tomcat instance for all sites, it will blow up after a few redeploys and a single site can make go every other in out of memory.

So the sad thing is, if I want to put up a dynamic site I'll have to learn ASP.NET or shell out 10 times more to get to the smallest dedicated server. Isn't this ironic?

thread.rss_message