@@ -777,6 +777,131 @@ rjsjr
777777
778778
779779
780+ ---------------------------(end of broadcast)---------------------------
781+ TIP 3: if posting/reading through Usenet, please send an appropriate
782+ subscribe-nomail command to majordomo@postgresql.org so that your
783+ message can get through to the mailing list cleanly
784+
785+ From pgsql-general-owner+M14597@postgresql.org Fri Aug 31 23:23:15 2001
786+ Return-path: <pgsql-general-owner+M14597@postgresql.org>
787+ Received: from server1.pgsql.org (server1.pgsql.org [64.39.15.238] (may be forged))
788+ by candle.pha.pa.us (8.11.6/8.10.1) with ESMTP id f813NEF20222
789+ for <pgman@candle.pha.pa.us>; Fri, 31 Aug 2001 23:23:14 -0400 (EDT)
790+ Received: from postgresql.org (webmail.postgresql.org [216.126.85.28])
791+ by server1.pgsql.org (8.11.6/8.11.6) with ESMTP id f813Njq38048;
792+ Fri, 31 Aug 2001 22:23:46 -0500 (CDT)
793+ (envelope-from pgsql-general-owner+M14597@postgresql.org)
794+ Received: from spider.pilosoft.com (p55-222.acedsl.com [160.79.55.222])
795+ by postgresql.org (8.11.3/8.11.4) with ESMTP id f812Yuf42942
796+ for <pgsql-general@postgresql.org>; Fri, 31 Aug 2001 22:35:04 -0400 (EDT)
797+ (envelope-from alex@pilosoft.com)
798+ Received: from localhost (alexmail@localhost)
799+ by spider.pilosoft.com (8.9.3/8.9.3) with ESMTP id WAA20075;
800+ Fri, 31 Aug 2001 22:35:23 -0400 (EDT)
801+ Date: Fri, 31 Aug 2001 22:35:23 -0400 (EDT)
802+ From: Alex Pilosov <alex@pilosoft.com>
803+ To: Alex Knight <knight@phunc.com>
804+ cc: pgsql-general@postgresql.org
805+ Subject: [WAY OT] Re: [GENERAL] PL/java?
806+ In-Reply-To: <MAEFKNDLAHNIFMAIEGHJCEKJCDAA.knight@phunc.com>
807+ Message-ID: <Pine.BSO.4.10.10108312220140.19501-100000@spider.pilosoft.com>
808+ MIME-Version: 1.0
809+ Content-Type: TEXT/PLAIN; charset=US-ASCII
810+ Precedence: bulk
811+ Sender: pgsql-general-owner@postgresql.org
812+ Status: OR
813+
814+ On Fri, 31 Aug 2001, Alex Knight wrote:
815+
816+ > It is generally wiser to split the webservers from the appservers;
817+ > that will save on memory footprints from each respectively. That alone
818+ > can give each machine a specific task to accomplish... generally more
819+ > efficiently. But I would assume you know this.
820+
821+ And it is wise to split database from middleware, and not try to saddle
822+ PostgreSQL with requirements to support Java in-process. _IF_ java stored
823+ procedures are implemented, it should be via something like a) oracle's
824+ extproc (start a separate process to load the function) b) some of perl
825+ java tools (they start a jdk in a separate process and communicate with it
826+ using RMI).
827+
828+
829+ Problem with java-pgsql integration is the threads model: Java really
830+ really wants threads. Postgres doesn't do threads. So if most simple way
831+ is attempted, you will incur overhead of starting up JVM for each backend
832+ (a few seconds as opposed to milliseconds) and non-shared 30M of memory
833+ per backend (as opposed to currently <3 megs of non-shared memory per
834+ backend).
835+
836+ > Using something like WebLogic, WebSphere, or Orion would be a wiser
837+ > approach. For the company with the low budget, Orion is only something
838+ > like $2000, and it has full J2EE support, including EJBs, etc. Try
839+ > finding that kind of richness in Tomcat. Also, Orion takes up only
840+ > 40-50mb at start, which is really fairly reasonable; ram is cheap
841+ > anyways... a server that has to perform complicated algorithms to a
842+ > large audience but has hardly any ram shouldn't be on the internet
843+ > anyways; unless it can handle it.
844+
845+ _ONLY_ 40-50Mb?! Egads, I'm hard pressed to find any other piece of
846+ (non-windows, non-java) software that takes 40-50M just to start up!
847+
848+ I worked with both CrapLogic and CrapSphere. Weblogic takes 20-60 seconds
849+ to start up on P3-800, that, IMHO, is ridiculous.
850+
851+ It is not only issue of memory, its easy to throw memory at the problem,
852+ its an issue of _incremental use_ of memory. As you scale
853+
854+ > I feel that you don't really have enough experience with _java_ to
855+ > judge it accurately. Frankly, the JVM is quite small nowadays,
856+ > considering the amount of base classes that sit in memory much of the
857+ > time. And the JVMs are really much faster these days. Java is still
858+ > slow for 2 reasons: 1) Developers who don't optimize their code as
859+ > they write it, 2) Bytecode interpretation is and probably never will
860+ > be as fast as something like C/C++. But it certainly isn't the JVM
861+ > itself slowing it down because of some "extended memory" that it lives
862+ > in. Any reasonable server should have absolutely no problems if the
863+ > jvm is implemented _properly_ (which many packages do not do), etc. If
864+ > you're comparing Java to perl, yes, certainly it's a bit more of a
865+ > beast, but perl quite simply can't keep up in speed and feature
866+ > richness (when was the last time you secured your perl code in a
867+ > redistributable fashion?)
868+ _WHY_ the heck do all base classes need to be in memory all the time? Why
869+ are they so huge? Libc is _far far_ smaller, and libstdc++ is tiny
870+ compared to all the java standard library.
871+
872+ You know what the answer to it is: Because they are ALL written in java,
873+ as opposed to more sane languages like perl which handcode their "standard
874+ libraries" or the most important pieces of them in C.
875+
876+ Perl is far faster than java in about any practical application I did.
877+ Again, the issue is not speed of JVM versus PP (perl virtual machine), if
878+ you did number crunching in perl and java, they would probably be at par.
879+ Its an issue of standard libraries. They are _horribly slow_. Perl's
880+ hashtables are a very nice piece of optimized C code. Java's hashtables
881+ are written in Java. Need I say more? Java's AWT was a dog. Swing is a dog
882+ and a half, because they reimplemented all the things that are commonly
883+ done in C in Java.
884+
885+ > The only mistake the developers can make is poorly implementing the
886+ > jvm, but most certainly not Java itself. I've been working on
887+ > architecting and building enterprise level sites and applications for
888+ > nearly 8 years now, and I've seen too many people try to implement
889+ > perl cgi websites for enterprise sites and watch them choke and crawl
890+ > to their knees because of poor system resource handling, lack of
891+ > scalability, etc... I most certainly don't consider a single webserver
892+ > with an appserver and tiny database to be enterprise level either (not
893+ > that I'm inferring you said it was).
894+ You cannot compare a perl CGI script and a J2EE server. Its like comparing
895+ a webserver you wrote yourself vs apache! There are application servers
896+ (or more closely, code libraries) for perl that match what J2EE provides.
897+
898+ --
899+ Alex Pilosov | http://www.acedsl.com/home.html
900+ CTO - Acecape, Inc. | AceDSL:The best ADSL in the world
901+ 325 W 38 St. Suite 1005 | (Stealth Marketing Works! :)
902+ New York, NY 10018 |
903+
904+
780905---------------------------(end of broadcast)---------------------------
781906TIP 3: if posting/reading through Usenet, please send an appropriate
782907subscribe-nomail command to majordomo@postgresql.org so that your