Java Performance/Python etc
Simon Bowring
pmmail@rpglink.com
Wed, 20 Sep 2000 14:42:43 +0100 (BST)
On Tue, 19 Sep 2000 10:54:16 -0700, Steve Lamb wrote:
>And that is why 20+ programmers were sitting there in numb shock that
>they were actually being force to program in that explosive diarrhea
discharge
>from Sun's marketing department when they /KNEW/ they could get the job
done
>in 2-3 other languages which are just as fast to develop in, start faster,
run
>just as fast or adequately fast, that they know /NOW/ and were resorted to
>using terms dreamt up by the lead marketer who places his coffee cup in the
>CD-Tray. And if you ever wondered why Java is called Java, that is why!
Nonsense! Every decent programmer that I know who has voluntarily
or otherwise had to work with Java, appreciates at least some of the
features of the platform - many still don't like it, but they
are able to appreciate that it has both genuinely unique and
and useful features not provided in any other single environment.
Java has sparked many "Why can't we have a great class library like
Swing"-type discussions in the C++ newsgroups for example!
One of the very best and most knowedgable Unix/C/C++ programmers I
know (Ian Sheldon) shares this exact sentiment after coding GUIs in
a day, that would have taken him weeks in C++, he still prefers C++ as
a language, but now misses features that are not present in it.
Sure you could counter the arguments of most of the the benefits of
Java by cherry-picking the best bits from *several* other languages,
but not if you compare java against any other single language.
> Impressive? When it does something impressive, let me know.
Now! Java does impressive things - the platform is a remarkable
technical acheivement, sadly the language (syntax etc) isn't, but
it's facilities are unmatched! Also if like me, you really aren't
impressed by the language syntax, you can write "java" in other
languages because JPython, NetRexx, Eiffel and others can all
target the JVM, though they are currently unable to support all
the features that java currently supports!).
Java is far from perfect, but it's the very fisrt environment
that allows truly portable distributed applications (e.g. object
mobility across networks). In a way you can think of it as being
the very first cross-platform implementation of the 30 year
old ISO 7 layer network model, because it's effectively a
platform independant "protocol" that runs all the way from the
bottom (tcp/ip "wire" level) up to the presentation level
(logic and UIs etc). That alone is a remarkable technical
acheivement and a "first". I do however look forward to
whatever becomes the successor to Java (not necessarily from
Sun of course).
The "wake-up" call for Java for us was when a *newbie* VB programmer
turned Java programmer, achieved in 5 days what had taken us several
months and a succession of our best C++ programmers to achieve in C++
under Windows. This was a Java rewrite of a C++ network aware
whiteboard application (a limited netmeeting type of thing). Optimising
the anti-alisaed graphics drawing primitives to be fast enough was what
took most of the time and skill in the C++ version, this was a
no-brainer in Java - built in! Also the GUI was much easier and quicker
to code in Java than MFC - the downside? Oh yes, the Java version
took longer to load (big deal), but then it was also tested as
working on Macs, OS/2 and Solaris (and not just windows like the C++
version).
>So far the only impressive thing it has done is make a mockery of
>programming languages.
Tosh! A mockery like the above?
>> IBM has almost bet it's business on Java, and I'd of thought they'd
>> be very vulnerable if your concerns are that "real".
>
> After their handling of OS/2 (remember when they bet their business on
>that?)
Tosh - IBM never bet the business on OS/2, it did try to use it
to recapture the PC business, which has *never* been where IBM get
it's revenue from (check the figures)! Java has been adopted by every
part of IBM's s/w operation, OS/2 was not.
> 2nd source of JVMs, all of which derive from the spec set forth by Sun
>which can be altered and closed off at any moment.
No they can't - all pre-existing Java apps would stop working, the JVM
can be extended, but it has to remain backwards compatible (you don't
understand much about Java do you?). If Sun broke the compatibility,
one of the main strengths of java would be removed, and organisations could
simply replace their VDMs rather then bend to Sun's lunacy (not that Sun
would do this, it would be suicidal for the entire Java "movement").
>Remember, the JVMs don't matter,
Oh yes they do! (same point as above).
>It is impossible to have a circumstance where it would take a minute under
>the two I've described.
Yes it is, it takes around 20s to get a java app running here apparently
on a less powerful machine(!), without invoking any of the techniques
that I have previously described, about having the JVMs loaded as
part of the OS (as on IBM's OS/400)
>> I have the misfortune to have to produce web apps using PHP (3 not
>> 4 which may have improved) and Java, and PHP is not close to being
>> "performant", though it's much more sutable for small quick-hack type
>> apps, Java is more suitable for large "formal" ones.
>
> *laugh* You know what I use for my examples? The hundreds of sites
that
>use PHP that run smooth and fast as can be and the comparable LACK of Java
>"servlets" (WTF is that? SERVER, not LET, ER. SERVER! APPLICATION,
SERVER!)
>both in number and in performance. I can tell when I am on a Java
"servlet".
>It runs like a dead dog whipped 20 times over. Sure, the whipping moves it
a
>few millimeters but you can't call that running.
I can only repeat that Java servlettes do (currently) outperfrom all
other CGI - servelettes are JIT compiled and end up running as
run-time optimised native code that often out perfroms C++, let
alone PHP!! PHP is purely interpretted and the execution time goes
up as the *length* (not complexity) of the script goes up and goes
up exponentially as concurrent users increase!
Java Serlettes scale up linearly to many thousands of concurrent web
users (only JIT complied for the first intsance, all other instances
use the same precompiled and cached code, only requiring a new thread
to be created for each additional user (actually the best web
server implementations don't even require this much overhead, because
they keep a pool of cached threads ready to dispatch). PHP invokes a
much bigger overhead for each user (and re-interprets the same script
over and over again for each concurrent user).
>We've had two decades of eating crap from Microsoft because of its monopoly
>position. Sun is the underdog which is why they are willing to be as open
as they are with Java.
Agreed (at last - phew)!
>If it ever gains dominance we're right back where we started, a for profit,
>single source that can control everything.
Not true because of the 2nd sourced JVMs and the already released library
code (it cannot be unreleased!). Existing investment in (existing)
Java is protected.
>You think it is going to remain open then? Doubtful.
Whatever - our industry woudn't exist at all if were not for "for
profit" organisations, your distrust of them would be heathly, if
it was not so apparently rabid and out of all proportion At least
in this case)!
For example, Linux (or an alternative free OS of similar capability)
could not have existed if it hadn't of been for the commercial Unixes
that acted as both inspiration and design/spec. It's also possible (I hope
so) that the free s/w movement could come up with a java-type environment
(not talking about compatibility here, merely functionality), but
again only because Java has given them something to "better" that
*never* existed before.
Simon