Re: eRserver (slightly offtopic) - Mailing list pgsql-admin

From Grega Bremec
Subject Re: eRserver (slightly offtopic)
Date
Msg-id 20031201081735.GA7959@elbereth.noviforum.si
Whole thread Raw
In response to eRserver  (Renney Thomas <renneyt@yahoo.com>)
List pgsql-admin
...and on Fri, Nov 28, 2003 at 03:27:56PM -0500, Renney Thomas used the keyboard:
>
> I would like to hear about any issues related to erserver. I was a
> little concerned about its use of Java.  Java is a great tool for
> creating application frameworks for the payroll department, but using it
> for back-end system-level application programming is a bit unnerving.
> Java is generally slow, memory and CPU intensive and doesn't provide for
> tight integration like C/C++ applications.
>
> Thanks

Just a comment on Java, not quite related to your post, Renney. It is by
no means intended as a flamebait, I would just like to remind you all that
the times when Java was a memory and cpu hog are generally almost over.
I see this kind of attitude on a daily basis, and it almost kind of makes
me sad, because the illusion that people accepting such a stance regarding
ANY tool have put upon themselves is really hurting themselves in the end,
as it's usually related to anecdotal and outdated evidence, but most of all,
heresy and lack of real proof (not of slowness in this case, hehe, ANYONE
can write a bad program :)).

The fact you need a 20-30% faster cpu to have Java apps working as smoothly
as they would if one used a C application (and i won't even _attempt_ to
mention C++ here, because it is, in my not-so-humble opinion, far worse than
Java), is contrasted by the massive cut in development time, manpower needed
to do the job and the number of bugs produced during the development period.
Double free() crash due to a missing #ifdef? Eeew. Sorry for you, lad.

As with all development tools, this is mainly a "the right tool for the
right job" issue, no doubt, and I sure as hell wouldn't want to write a
realtime application in Java, but the man doing it has no less to do with
it than the job itself. A good programmer can compensate for the loss in
execution time in far less than the time they'd have used for debugging a
tool developed in C.

There are many performance and optimization documents and books for Java,
but it is not a "tweak" that will make your Java program work fast. You need
to be capable of performing a bit more profound "pirouette" in your mind.
Java programming is quite unlike any C/C++ programming. Sure, you can write
Java programs the way you'd do it in C, but that's never going to get you
far, performance-wise. A Java Virtual Machine is such an advanced beast
that you really need to get to know it better before you can talk about its
"general slowness", and write it off for its "memory and CPU intensiveness"
alone.

There are many design-pattern-level books that make it possible for one to
realize where the true power of both the Java VM and Java as a programming
language is though, and develop fast, scalable and reliable applications in
Java as well. One amongst those definitely worth mentioning would surely be
Doug Lea's "Concurrent programming in Java - Design principles and patterns",
and it coming from the insiders themselves, I can assure you that it really
is worth a look.

One has to decide one's interested and truely wants to find something useful
in a tool though, before one can see its true value.

Hope this helped.
--
    Grega Bremec
    System Administration & Development Support
    grega.bremec-at-noviforum.si
    http://najdi.si/
    http://www.noviforum.si/

Attachment

pgsql-admin by date:

Previous
From: "Armel HERVE"
Date:
Subject: Re: Problem with pg_dump / pg_restore
Next
From: James Cooper
Date:
Subject: Re: eRserver