Is java good enough?

Is java good enough?

Post by Jon Nov » Sat, 26 May 2001 01:02:27



I've spent the last half year writing java code for a class, and I've
come to like it fairly well.  Now, I'm working at a company that
primarily uses C/C++.  I will be working on a medical system used in
surgery. Part of this program involves some 3D rendering.  The machine
that will run this system is a duel processor 1 GHz machine with 1 GB
of RAM, running the RedHat Linux OS.

My question is, will java and Java3D be "good enough" to take
advantage of this machine's configuration?  I want the 3D to be fairly
"impressive", not in terms of special effects or complex coding, but
in terms of many polygons being rendered.  I also need to take
advantage of 1 GB of ram and two processors.

Can java do this?  Is it appropriate for a large system like this,
with possibly demanding 3D?  Can it take advantage of all that memory
and the duel processors?  I know java isn't as fast (at least with the
VM -- how does compiled code compare?), but I think it's fast enough
for everything I need to do (with the possible exception of 3D, like I
said).

Like I said, I like java much more than C++, but I don't want to
handycap this program by using it.  Any advice would be appreciated.

Thanks,
Jon Novak

 
 
 

Is java good enough?

Post by Jon Skee » Sat, 26 May 2001 01:49:14



> I've spent the last half year writing java code for a class, and I've
> come to like it fairly well.  Now, I'm working at a company that
> primarily uses C/C++.  I will be working on a medical system used in
> surgery. Part of this program involves some 3D rendering.  The machine
> that will run this system is a duel processor 1 GHz machine with 1 GB
> of RAM, running the RedHat Linux OS.

> My question is, will java and Java3D be "good enough" to take
> advantage of this machine's configuration?  I want the 3D to be fairly
> "impressive", not in terms of special effects or complex coding, but
> in terms of many polygons being rendered.  I also need to take
> advantage of 1 GB of ram and two processors.

> Can java do this?  Is it appropriate for a large system like this,
> with possibly demanding 3D?  Can it take advantage of all that memory
> and the duel processors?

You should easily be able to make the most of the memory. Dual
processors - depends on your use of threading, I suspect. I believe
Sun's JVM will use both.

As for demanding 3D - I suggest you download some of the Java3D
demonstrations and have a look.

Quote:> I know java isn't as fast (at least with the
> VM

Actually it's reasonably comparable with C/C++ for most uses these days.

Quote:> -- how does compiled code compare?

Statically compiled Java can be a bit faster or a bit slower, depending
on what you're doing.

Quote:> Like I said, I like java much more than C++, but I don't want to
> handycap this program by using it.  Any advice would be appreciated.

I suggest you mock-up something that tries to use Java3D to display the
right *amount* of data, even if it's completely garbage data - then see
how it does.

Graphics on Linux tend to be quite slow with Java, but I don't know what
it's like for Java3D. You might also want to investigate the JDK1.4 beta
which was released in the last 24 hours - http://java.sun.com/j2se/1.4
I believe the performance of Graphics on X in general should be much
improved by that.

--

http://www.pobox.com/~skeet
If replying to the group, please don't mail me at the same time

 
 
 

Is java good enough?

Post by Stuart D. Gathma » Sat, 26 May 2001 01:55:36



> My question is, will java and Java3D be "good enough" to take
> advantage of this machine's configuration?  I want the 3D to be fairly
> "impressive", not in terms of special effects or complex coding, but
> in terms of many polygons being rendered.  I also need to take
> advantage of 1 GB of ram and two processors.

Java3D uses the same 3D engine that the C++ code would.  The performance
advantage for C++ would be if you needed to extend the API at a low
level.

Java Threads will easily take advantage of multiple processors on JVMs
with native threading (which is all JVMs I know of anymore).  C++
threads are more error prone that Java - but safe threading (that
doesn't deadlock or render data inconsistent) is no picnic for either.

Java has no problem using lots of RAM :-).  (I am more impressed that I
can run small applications such as an encrypted proxy in only 256K.)
The only limitation is that the maximum array index is 2G.  If your
application doesn't use enough RAM at first, using javax.swing should
fix it :-)

Garbage collection overhead is proportional to the number (and to a
lesser extent, the size) of live objects.

--

Business Management Systems Inc.  Phone: 703 591-0911 Fax: 703 591-6154
"Confutatis maledictis, flamis acribus *is" - Mozart background
song for the Microsoft "Where do you want to go from here?" commercial.

 
 
 

Is java good enough?

Post by Chris Smit » Sat, 26 May 2001 02:17:24



Quote:> Graphics on Linux tend to be quite slow with Java, but I don't know what
> it's like for Java3D. You might also want to investigate the JDK1.4 beta
> which was released in the last 24 hours - http://java.sun.com/j2se/1.4
> I believe the performance of Graphics on X in general should be much
> improved by that.

The improvements they mention there tend to be in the 2D graphics pipeline,
and the Java3D API seems to bypass that entirely.  I have *not* measured
this, not even finished downloading the 1.4 beta implementation, but from
what I've read I'm not sure that the improvements will help with this
application.

What *will* help, regardless of the implementation language, is ensuring
that you are running the application on XFree version 4 with a recent stable
version of the DRI infrastructure and a video card for which drivers exist.
This allows you to get very impressive results out of 3D graphics.  Yes,
Java3D will use your graphics card's hardware acceleration.

Chris Smith

 
 
 

Is java good enough?

Post by Phillip Lor » Sat, 26 May 2001 02:42:40


  Jon> I've spent the last half year writing java code for a class,
  Jon> and I've come to like it fairly well.  Now, I'm working at a
  Jon> company that primarily uses C/C++.  I will be working on a
  Jon> medical system used in surgery. Part of this program involves
  Jon> some 3D rendering.  The machine that will run this system is a
  Jon> duel processor 1 GHz machine with 1 GB of RAM, running the
  Jon> RedHat Linux OS.

  Jon> My question is, will java and Java3D be "good enough" to take
  Jon> advantage of this machine's configuration?  I want the 3D to be
  Jon> fairly "impressive", not in terms of special effects or complex
  Jon> coding, but in terms of many polygons being rendered.  I also
  Jon> need to take advantage of 1 GB of ram and two processors.

        Actually I suspect that its pretty irrelevant how much memory
you have. Much much more important is the sort of video card you have,
whether it has 3d support, and whether there are GPL libraries to use
this support.

       My experience with 3d support under redhat is that installing
the kernel driver (for the TNT Riva in my case) increased 3D execution
enormously (from relatively slow, to too fast to follow). In most
cases fairly complex 3D rendering went on without touching either the
memory, or main processor at all. The video card was doing all the
work.

       One thing that I don't know but I suspect that some one else
will, is whether the linux Java 3D libraries are using the GL
libraries. RedHat normally comes with MesaGL which is a software
implementation of GL. The video card drivers replaced these with their
own GL libraries. So you are only going to be using the video card if
Java3D works through the GL libraries. I would have thought that it
does, but I am not sure.

        Phil

 
 
 

Is java good enough?

Post by Roedy Gree » Sat, 26 May 2001 05:49:53



quoted :

Quote:>duel processor

That should read "dual processor".  They do get in each other's way,
but the are not intended to out and out fight.

-
For more detail, please look up the key words mentioned in this post in
the Java Glossary at:
http://mindprod.com/gloss.html or http://209.153.246.39/gloss.html
If you don't see what you were looking for, complain!
or send your contribution for the glossary.
--
Roedy Green, Canadian Mind Products
Custom computer programming since 1963.
Almost ready to take on new work.

 
 
 

Is java good enough?

Post by Roedy Gree » Sat, 26 May 2001 05:58:16


On Thu, 24 May 2001 12:55:36 -0400, "Stuart D. Gathman"

Quote:>Java has no problem using lots of RAM :-).

The modern RAM usage still boggles my mind.  I worked for the electric
Utility that handled all the power in British Columbia, a large
province (state) of Canada.  The mainframe had only 500K, that is half
a megabyte.  We did all the billing and engineering for the entire
province on it.

I remember the day IBM announced RAM was for the first time under $1
million per megabyte on their new 4341 series machines. We were
astounded at the bold price cutting.

I think many of us who lived in the olden days of the 60s and 70s
still can't get over just how cheap RAM is now, and will happily waste
weeks of human time that a few gigs of RAM would easily solve.

For example, I suspect we may be the to the point where most databases
should be designed to be totally ram resident.

-
For more detail, please look up the key words mentioned in this post in
the Java Glossary at:
http://mindprod.com/gloss.html or http://209.153.246.39/gloss.html
If you don't see what you were looking for, complain!
or send your contribution for the glossary.
--
Roedy Green, Canadian Mind Products
Custom computer programming since 1963.
Almost ready to take on new work.

 
 
 

Is java good enough?

Post by Jon Skee » Sat, 26 May 2001 06:49:38




> quoted :

> >duel processor

> That should read "dual processor".  They do get in each other's way,
> but the are not intended to out and out fight.

Pipelines at dawn?

--

http://www.pobox.com/~skeet
If replying to the group, please don't mail me at the same time

 
 
 

Is java good enough?

Post by Peter van der Lind » Sat, 26 May 2001 10:25:44



Quote:>I remember the day IBM announced RAM was for the first time under $1
>million per megabyte on their new 4341 series machines. We were
>astounded at the bold price cutting.

>For example, I suspect we may be the to the point where most databases
>should be designed to be totally ram resident.

I remember when the Daresbury, UK, Physics mainframe got an upgrade to
its second Megabyte of memory (1978).  I was astonished at the profligracy
and wondered how they would ever use that much.   I recall the tremendous
hoopla that announced the dawn of the 64Kb memory chip.

Only ten or twelve years ago, people briefly talked about "3M" machines,
meaning they had 1 million pixels on the screen, 1Mbit ethernet, and
1 Megabyte of memory.  They were the top of the line workstations, briefly!

I am wondering why we don't see more designs where memory is integrated
with the CPU right on the same die.  You could put gigabytes of memory
there and it would be just as fast to reach as level 1 cache is today.
There must be some reason why this isn't a common approach to
computer architecture, but I don't know what it is.  It is going to become
increasingly attractive as micron width drops in the fabs.

 
 
 

Is java good enough?

Post by Anthony Shiple » Sat, 26 May 2001 14:59:29



>The modern RAM usage still boggles my mind.  I worked for the electric
>Utility that handled all the power in British Columbia, a large
>province (state) of Canada.  The mainframe had only 500K, that is half
>a megabyte.  We did all the billing and engineering for the entire
>province on it.

>I remember the day IBM announced RAM was for the first time under $1
>million per megabyte on their new 4341 series machines. We were
>astounded at the bold price cutting.

"Michael: But you try and tell the young people today that... and they
won't believe ya'"

http://www.stone-dead.asn.au/albums-cds/sketches/live-at-city-center/....

anthony shipley

<math> 2 + 2 = 5 for sufficiently large values of 2</math>

 
 
 

Is java good enough?

Post by Jon Skee » Sat, 26 May 2001 16:22:15



> I think many of us who lived in the olden days of the 60s and 70s
> still can't get over just how cheap RAM is now, and will happily waste
> weeks of human time that a few gigs of RAM would easily solve.

> For example, I suspect we may be the to the point where most databases
> should be designed to be totally ram resident.

See http://slashdot.org/articles/99/08/10/1235259.shtml for a hopeful
(okay, possibly overly hopeful) vision of what the future might hold:
2300 *gigabytes* on a PC card sized device.

With that much memory, imagine a traditional garbage collection pause...
<shudder>

--

http://www.pobox.com/~skeet
If replying to the group, please don't mail me at the same time

 
 
 

1. Good Enough to Sleep With but not Good Enough to Marry?

I've touched on this subject a couple of times before, but I just wanted
to drive the point home.

There are many commercial companies out there that are benefitting off of
the use of Open Source Software with their products, especially Linux in
embedded devices.

Linux powers cell phones, PDA's, robots, routers, communications devices,
Pocket PC's, and a whole slew of other specialized devices.

The thing is, where these companies that use embedded Linux are
benefitting and profiting off of using Linux in their products, they
provide little or no support for users of Linux and their products.

I have personally experienced this with three seperate products I own that
are linux powered.

What is this about?  Are these companies hypocrites?  It's ok to reap the
all the benefits of using Linux to drive our products but they are not
willing to make a committment to the community by providing support for
Linux users with their products?

I know that there is of course the financial aspect of it, but it still
seems to be negligent and hypocritical on the part of these companies.

That's my take on it anyway.

--
rapskat  -  1:25am  up 4 days, 11:09,  4 users,  load average: 0.07, 0.04, 0.01
drop the hot to mail me

Shit Happens. -- Forrest Gump (?)

2. Using mouse/touchscreen w/curses?

3. When good enough is good enough

4. Does "old sun-2" file mean anything to linux?

5. Deep thoughts...Good Enough Is Enough

6. Linux Supercomputer !

7. Java, Java, Java, Java, Java, Java .....

8. Mosaic w/ term AND wais support

9. Considering Linux: Is my hardware good enough?

10. GUS ACE: Good enough?

11. What is good enough for the Enterprise?

12. Is my laptop good enough for X?

13. *SIGH* When will linux EVER get good enough?!