pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
PL/java?
69+ messages / 30 participants
[nested] [flat]

* PL/java?
@ 2001-08-25 23:37  Dr. Evil <drevil@sidereal.kz>
  0 siblings, 3 replies; 69+ messages in thread

From: Dr. Evil @ 2001-08-25 23:37 UTC (permalink / raw)
  To: pgsql-general


What do you think of having java as a procedural language available in
PG?  It seems like java has many advantages.

I'm just wondering if people have thoughts or ideas on this, and if
someone is actually working on it, that would be cool.



^ permalink  raw  reply  [nested|flat] 69+ messages in thread

* RE: PL/java?
@ 2001-08-26 00:08  Gowey, Geoffrey <ggowey@rxhope.com>
  0 siblings, 6 replies; 69+ messages in thread

From: Gowey, Geoffrey @ 2001-08-26 00:08 UTC (permalink / raw)
  To: 'Dr. Evil' <drevil@sidereal.kz>; pgsql-general

probably a bad idea.  From what I've heard the speed of your java program is
wholely dependent on the speed of your vm (and most aren't that quick).
Although it would be nice to have just to say we have it and mysql doesn't
(then again mysql doesn't have a whole lot of things that pgsql already
has).

Geoff

-----Original Message-----
From: Dr. Evil [mailto:drevil@sidereal.kz]
Sent: Saturday, August 25, 2001 7:38 PM
To: pgsql-general@postgresql.org
Subject: [GENERAL] PL/java?



What do you think of having java as a procedural language available in
PG?  It seems like java has many advantages.

I'm just wondering if people have thoughts or ideas on this, and if
someone is actually working on it, that would be cool.

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly



^ permalink  raw  reply  [nested|flat] 69+ messages in thread

* Re: PL/java?
@ 2001-08-26 00:22  Sean Chittenden <sean@chittenden.org>
  parent: Dr. Evil <drevil@sidereal.kz>
  2 siblings, 0 replies; 69+ messages in thread

From: Sean Chittenden @ 2001-08-26 00:22 UTC (permalink / raw)
  To: Dr. Evil <drevil@sidereal.kz>; +Cc: pgsql-general

> I'm just wondering if people have thoughts or ideas on this, and if
> someone is actually working on it, that would be cool.

	Why would that be cool?  Because it's an OO language?  If that's
the criteria for cool, check out pl/Ruby.  It's a pure OO language (java
isn't) and is a joy to work with, but YMMV.  -sc

-- 
Sean Chittenden

^ permalink  raw  reply  [nested|flat] 69+ messages in thread

* Re: PL/java?
@ 2001-08-26 01:29  Sean Chittenden <sean-pgsql-general@chittenden.org>
  parent: Dr. Evil <drevil@sidereal.kz>
  2 siblings, 0 replies; 69+ messages in thread

From: Sean Chittenden @ 2001-08-26 01:29 UTC (permalink / raw)
  To: pgsql-general

> I'm just wondering if people have thoughts or ideas on this, and if
> someone is actually working on it, that would be cool.

        Why would that be cool?  Because it's an OO language?  If that's
the criteria for cool, check out pl/Ruby.  It's a pure OO language (java
isn't) and is a joy to work with, but YMMV.  -sc

-- 
Sean Chittenden

^ permalink  raw  reply  [nested|flat] 69+ messages in thread

* Re: PL/java?
@ 2001-08-26 01:41  Doug McNaught <doug@wireboard.com>
  parent: Gowey, Geoffrey <ggowey@rxhope.com>
  5 siblings, 0 replies; 69+ messages in thread

From: Doug McNaught @ 2001-08-26 01:41 UTC (permalink / raw)
  To: Gowey, Geoffrey <ggowey@rxhope.com>; +Cc: 'Dr. Evil' <drevil@sidereal.kz>; pgsql-general

"Gowey, Geoffrey" <ggowey@rxhope.com> writes:

> probably a bad idea.  From what I've heard the speed of your java program is
> wholely dependent on the speed of your vm (and most aren't that quick).
> Although it would be nice to have just to say we have it and mysql doesn't
> (then again mysql doesn't have a whole lot of things that pgsql already
> has).

Well, compiled Java code can't be that much slower than PL/pgSQL code
or TCL. both of which work fine for lots of people...

I've though about doing this.  It's definitely doable, but here are
some gotchas:

* The JVM is multithreaded, while backends are single-threaded.  This
  could open up a big can of worms if you're not careful.  On
  platforms with different libc's for threaded/nonthreaded code, you'd 
  have to get the linking right. 

* In order to be useful, you'd need to write a JNI wrapper for the SPI 
  libraries.  Again, threading issues may apply.

It's an interesting project, but not one I've had time to look at yet.

-Doug
-- 
Free Dmitry Sklyarov! 
http://www.freesklyarov.org/ 

We will return to our regularly scheduled signature shortly.



^ permalink  raw  reply  [nested|flat] 69+ messages in thread

* Re: PL/java?
@ 2001-08-26 02:50  Bruce Momjian <pgman@candle.pha.pa.us>
  parent: Dr. Evil <drevil@sidereal.kz>
  2 siblings, 0 replies; 69+ messages in thread

From: Bruce Momjian @ 2001-08-26 02:50 UTC (permalink / raw)
  To: Dr. Evil <drevil@sidereal.kz>; +Cc: pgsql-general


See the TODO list under Java.  There are some emails discussing the
issues:

	http://candle.pha.pa.us/cgi-bin/pgtodo?java

> 
> What do you think of having java as a procedural language available in
> PG?  It seems like java has many advantages.
> 
> I'm just wondering if people have thoughts or ideas on this, and if
> someone is actually working on it, that would be cool.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026



^ permalink  raw  reply  [nested|flat] 69+ messages in thread

* Re: PL/java?
@ 2001-08-26 02:53  Bruce Momjian <pgman@candle.pha.pa.us>
  parent: Gowey, Geoffrey <ggowey@rxhope.com>
  5 siblings, 1 reply; 69+ messages in thread

From: Bruce Momjian @ 2001-08-26 02:53 UTC (permalink / raw)
  To: Gowey, Geoffrey <ggowey@rxhope.com>; +Cc: 'Dr. Evil' <drevil@sidereal.kz>; pgsql-general

> probably a bad idea.  From what I've heard the speed of your java program is
> wholely dependent on the speed of your vm (and most aren't that quick).
> Although it would be nice to have just to say we have it and mysql doesn't
> (then again mysql doesn't have a whole lot of things that pgsql already
> has).

Can someone explain why the addition of a stored procedural language for
MySQL made it as a Slashdot headline?  Do our new features make it
there?

	http://slashdot.org/article.pl?sid=01/08/24/1253228&mode=nested  

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026



^ permalink  raw  reply  [nested|flat] 69+ messages in thread

* Re: PL/java?
@ 2001-08-26 02:59  Bruce Momjian <pgman@candle.pha.pa.us>
  parent: Gowey, Geoffrey <ggowey@rxhope.com>
  5 siblings, 0 replies; 69+ messages in thread

From: Bruce Momjian @ 2001-08-26 02:59 UTC (permalink / raw)
  To: Gowey, Geoffrey <ggowey@rxhope.com>; +Cc: 'Dr. Evil' <drevil@sidereal.kz>; pgsql-general

> probably a bad idea.  From what I've heard the speed of your java program is
> wholely dependent on the speed of your vm (and most aren't that quick).
> Although it would be nice to have just to say we have it and mysql doesn't
> (then again mysql doesn't have a whole lot of things that pgsql already
> has).

Has anyone seen this page on Mysql.org comparing PostgreSQL to MySQL:

	http://www.mysql.com/doc/M/y/MySQL-PostgreSQL_features.html

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026



^ permalink  raw  reply  [nested|flat] 69+ messages in thread

* Re: PL/java?
@ 2001-08-26 03:08  Doug McNaught <doug@wireboard.com>
  parent: Bruce Momjian <pgman@candle.pha.pa.us>
  0 siblings, 0 replies; 69+ messages in thread

From: Doug McNaught @ 2001-08-26 03:08 UTC (permalink / raw)
  To: Bruce Momjian <pgman@candle.pha.pa.us>; +Cc: Gowey, Geoffrey <ggowey@rxhope.com>; 'Dr. Evil' <drevil@sidereal.kz>; pgsql-general

Bruce Momjian <pgman@candle.pha.pa.us> writes:

> Can someone explain why the addition of a stored procedural language for
> MySQL made it as a Slashdot headline?  

Probably because /. uses MySQL (poor benighted fools ;)

-Doug
-- 
Free Dmitry Sklyarov! 
http://www.freesklyarov.org/ 

We will return to our regularly scheduled signature shortly.



^ permalink  raw  reply  [nested|flat] 69+ messages in thread

* Re: PL/java?
@ 2001-08-26 04:17  Dr. Evil <drevil@sidereal.kz>
  parent: Gowey, Geoffrey <ggowey@rxhope.com>
  5 siblings, 0 replies; 69+ messages in thread

From: Dr. Evil @ 2001-08-26 04:17 UTC (permalink / raw)
  To: pgsql-general

> probably a bad idea.  From what I've heard the speed of your java
> program is wholely dependent on the speed of your vm (and most
> aren't that quick).  Although it would be nice to have just to say
> we have it and mysql doesn't (then again mysql doesn't have a whole
> lot of things that pgsql already has).

PG has no competition from MySQL.  MySQL finally got a procedural
language, but it's perl!  perl is in many ways a terrible PL.
Basically, if you are using a database for any kind of real stuff
where data integrity and reliability are important, you need a
strongly-typed language.  PL/pgsql is actually a greal language for
this.  Far better than perl.

Anyway... yeah, I have heard that a lot of java vms are not fast, but
a lot of the time fast isn't as important as solid and correct, and
java lends itself to solid, correct programming better than most other
languages.



^ permalink  raw  reply  [nested|flat] 69+ messages in thread

* Re: PL/java?
@ 2001-08-26 20:02  Dr. Evil <drevil@sidereal.kz>
  parent: Alex Knight <knight@righteous.net>
  1 sibling, 1 reply; 69+ messages in thread

From: Dr. Evil @ 2001-08-26 20:02 UTC (permalink / raw)
  To: pgsql-general


> If you can afford to learn another language, and get some time to put it =
> to
> practical use, I suggest that you take a closer look at Java... or IMHO, =
> atleast
> don't knock it until you have substancial reasoning.

I agree.  java is a great language.  The biggest problem with java?
Lack of portability!  Yes, that's right, it's not portable!  If you
are using Linux or a commercial OS of some kind, you have great java
support, but under FreeBSD or OpenBSD?  Good luck getting Java 2 to
work!

But it's still a great language and I'm moving all my stuff from PHP
to Java.



^ permalink  raw  reply  [nested|flat] 69+ messages in thread

* Re: PL/java?
@ 2001-08-26 20:07  Alex Knight <knight@righteous.net>
  parent: Gowey, Geoffrey <ggowey@rxhope.com>
  5 siblings, 2 replies; 69+ messages in thread

From: Alex Knight @ 2001-08-26 20:07 UTC (permalink / raw)
  To: Gowey, Geoffrey <ggowey@rxhope.com>; 'Dr. Evil' <drevil@sidereal.kz>; pgsql-general

I keep hearing all this talk about Java being slow, and how compiled Java is
nearly as slow as interpreted languages... If Java was _that_ slow, do you
think it would be powering a majority of the Enterprise level sites out there?
Java is really more than just hype. Surely it isn't nearly as fast as native
optimized C/C++. But there are numerous advantages to the language.

If you can afford to learn another language, and get some time to put it to
practical use, I suggest that you take a closer look at Java... or IMHO, atleast
don't knock it until you have substancial reasoning.

-Kevin

-----Original Message-----
From: pgsql-general-owner@postgresql.org
[mailto:pgsql-general-owner@postgresql.org]On Behalf Of Gowey, Geoffrey
Sent: Saturday, August 25, 2001 5:09 PM
To: 'Dr. Evil'; pgsql-general@postgresql.org
Subject: RE: [GENERAL] PL/java?


probably a bad idea.  From what I've heard the speed of your java program is
wholely dependent on the speed of your vm (and most aren't that quick).
Although it would be nice to have just to say we have it and mysql doesn't
(then again mysql doesn't have a whole lot of things that pgsql already
has).

Geoff

-----Original Message-----
From: Dr. Evil [mailto:drevil@sidereal.kz]
Sent: Saturday, August 25, 2001 7:38 PM
To: pgsql-general@postgresql.org
Subject: [GENERAL] PL/java?



What do you think of having java as a procedural language available in
PG?  It seems like java has many advantages.

I'm just wondering if people have thoughts or ideas on this, and if
someone is actually working on it, that would be cool.

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html




^ permalink  raw  reply  [nested|flat] 69+ messages in thread

* RE: PL/java?
@ 2001-08-26 20:26  Alex Knight <knight@phunc.com>
  parent: Dr. Evil <drevil@sidereal.kz>
  0 siblings, 1 reply; 69+ messages in thread

From: Alex Knight @ 2001-08-26 20:26 UTC (permalink / raw)
  To: Dr. Evil <drevil@sidereal.kz>; pgsql-general

You make a good point about Java not being "portable" (the JVM not being
fully portable anyways). That could certainly be enough reason to not
benefit the PostgreSQL community as a whole. It _is_ a shame that Java 2
hasn't made it over to other platforms yet.

Although, I haven't thought about it much, but I'm not sure I see any
advantages of using Java over PG/plsql. Other than streamlining _some_
development since developers in a Java shop would know Java, I don't
see any language-specific advantages.

(Oh by the way, my two previous posts have been delayed since I sent them
from the wrong email address)

-Knight

-----Original Message-----
From: pgsql-general-owner@postgresql.org
[mailto:pgsql-general-owner@postgresql.org]On Behalf Of Dr. Evil
Sent: Sunday, August 26, 2001 1:03 PM
To: pgsql-general@postgresql.org
Subject: Re: [GENERAL] PL/java?



> If you can afford to learn another language, and get some time to put it =
> to
> practical use, I suggest that you take a closer look at Java... or IMHO, =
> atleast
> don't knock it until you have substancial reasoning.

I agree.  java is a great language.  The biggest problem with java?
Lack of portability!  Yes, that's right, it's not portable!  If you
are using Linux or a commercial OS of some kind, you have great java
support, but under FreeBSD or OpenBSD?  Good luck getting Java 2 to
work!

But it's still a great language and I'm moving all my stuff from PHP
to Java.

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster




^ permalink  raw  reply  [nested|flat] 69+ messages in thread

* Re: PL/java?
@ 2001-08-26 23:51  Dr. Evil <drevil@sidereal.kz>
  parent: Alex Knight <knight@phunc.com>
  0 siblings, 1 reply; 69+ messages in thread

From: Dr. Evil @ 2001-08-26 23:51 UTC (permalink / raw)
  To: pgsql-general

> You make a good point about Java not being "portable" (the JVM not
> being fully portable anyways). That could certainly be enough reason
> to not benefit the PostgreSQL community as a whole. It _is_ a shame
> that Java 2 hasn't made it over to other platforms yet.

It will make it to the other platforms eventually, I hope.  It's a
shame that Sun's "write once, compile once, run everywhere" promise is
just marketing to some extent.

> Although, I haven't thought about it much, but I'm not sure I see
> any advantages of using Java over PG/plsql. Other than streamlining
> _some_ development since developers in a Java shop would know Java,
> I don't see any language-specific advantages.

pl/pgsql is a great language, I agree.  However, java has some
tremendous advantages.  The big one is its classes.  I needed to do
some DES encryption within the PG database.  Well, there's no DES
function in PG, or in pl/pgsql, so I had to write it as a C function
and then link it in.  Sure, that works, but the point is, if we had
pl/java, I would just call java.security.encryption.des() (or whatever
it is) and it would be there.  Right now I need to do some public key
stuff.  I could try to link that all in in C, but that would be a huge
pain.  The java standard classes do just about everything.  pl/pgsql
will never come close to that.

Also, java is object oriented and more convenient for writing larger
things.




^ permalink  raw  reply  [nested|flat] 69+ messages in thread

* RE: PL/java?
@ 2001-08-27 00:22  Alex Knight <knight@phunc.com>
  parent: Dr. Evil <drevil@sidereal.kz>
  0 siblings, 0 replies; 69+ messages in thread

From: Alex Knight @ 2001-08-27 00:22 UTC (permalink / raw)
  To: Dr. Evil <drevil@sidereal.kz>; pgsql-general

I agree that there could be quite a few circumstances where you would
want to utilize the class libraries. I'm doing a lot of PKI myself,
and I could see how painful it would be to waste time trying in C,
when Java _does_ really offer a lot.

-Kevin

-----Original Message-----
From: pgsql-general-owner@postgresql.org
[mailto:pgsql-general-owner@postgresql.org]On Behalf Of Dr. Evil
Sent: Sunday, August 26, 2001 4:52 PM
To: pgsql-general@postgresql.org
Subject: Re: [GENERAL] PL/java?


> You make a good point about Java not being "portable" (the JVM not
> being fully portable anyways). That could certainly be enough reason
> to not benefit the PostgreSQL community as a whole. It _is_ a shame
> that Java 2 hasn't made it over to other platforms yet.

It will make it to the other platforms eventually, I hope.  It's a
shame that Sun's "write once, compile once, run everywhere" promise is
just marketing to some extent.

> Although, I haven't thought about it much, but I'm not sure I see
> any advantages of using Java over PG/plsql. Other than streamlining
> _some_ development since developers in a Java shop would know Java,
> I don't see any language-specific advantages.

pl/pgsql is a great language, I agree.  However, java has some
tremendous advantages.  The big one is its classes.  I needed to do
some DES encryption within the PG database.  Well, there's no DES
function in PG, or in pl/pgsql, so I had to write it as a C function
and then link it in.  Sure, that works, but the point is, if we had
pl/java, I would just call java.security.encryption.des() (or whatever
it is) and it would be there.  Right now I need to do some public key
stuff.  I could try to link that all in in C, but that would be a huge
pain.  The java standard classes do just about everything.  pl/pgsql
will never come close to that.

Also, java is object oriented and more convenient for writing larger
things.


---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html




^ permalink  raw  reply  [nested|flat] 69+ messages in thread

* Re: PL/java?
@ 2001-08-30 18:51  Marshall Spight <marshall@meetstheeye.com>
  parent: Gowey, Geoffrey <ggowey@rxhope.com>
  5 siblings, 2 replies; 69+ messages in thread

From: Marshall Spight @ 2001-08-30 18:51 UTC (permalink / raw)
  To: pgsql-general

>> -----Original Message-----
>> From: Dr. Evil [mailto:drevil@sidereal.kz]
>> Sent: Saturday, August 25, 2001 7:38 PM
>> To: pgsql-general@postgresql.org
>> Subject: [GENERAL] PL/java?
>>
>>
>> What do you think of having java as a procedural language available in
>> PG?  It seems like java has many advantages.
>>
>> I'm just wondering if people have thoughts or ideas on this, and if
>> someone is actually working on it, that would be cool.

>""Gowey, Geoffrey"" <ggowey@rxhope.com> wrote in message
news:E15F4B031E17D5118B18009027F67927DAC0@SERVER...
> probably a bad idea.  From what I've heard the speed of your java program
is
> wholely dependent on the speed of your vm (and most aren't that quick).
> Although it would be nice to have just to say we have it and mysql doesn't
> (then again mysql doesn't have a whole lot of things that pgsql already
> has).
>
> Geoff

This was a major issue in 1996. It's been solved for several years now, but
the perception of Java having a speed problem remains.

Java stored procedures are the #1 most-desired-by-me feature for PostgreSQL.
Oracle and Sybase are examples of databases that have this feature already.
(Strangely, Microsoft's database doesn't have it :-)


Marshall Spight






^ permalink  raw  reply  [nested|flat] 69+ messages in thread

* Re: PL/java?
@ 2001-08-31 16:27  Shaun Thomas <sthomas@townnews.com>
  parent: Alex Knight <knight@righteous.net>
  1 sibling, 2 replies; 69+ messages in thread

From: Shaun Thomas @ 2001-08-31 16:27 UTC (permalink / raw)
  To: Alex Knight <knight@righteous.net>; +Cc: Gowey, Geoffrey <ggowey@rxhope.com>; 'Dr. Evil' <drevil@sidereal.kz>; pgsql-general

On Sun, 26 Aug 2001, Alex Knight wrote:

> I keep hearing all this talk about Java being slow, and how compiled Java is
> nearly as slow as interpreted languages... If Java was _that_ slow, do you
> think it would be powering a majority of the Enterprise level sites out there?

Have you ever actually used Java on an enterprise-level application?  Ever
see the Tomcat webserver?  It uses 100MB of memory, drives the load on our
server up to 8, and doesn't serve nearly as fast apache.  Do you really
want that in your database?

It isn't slow just because of the interpretation, or the byte-code, or the
structure, or even the overhead.  It's slow because every application must
have a hulking JVM sitting in memory, bringing even fast machines to their
knees in short order.  Not even perl, with everything it does, is that
big, nor does it affect a machine so adversely.  Ever wonder why most
JVM's stay in memory after they start?

Compare the speed of Oracle 8 with 8i if you don't believe me.  The
stability is also much worse.  Ever see a JVM on any platform that didn't
crash if you looked at it cockeyed?  Ever really trust the garbage
collection?  I don't.  I've found a memory leak in IBM developed java
libraries.  Gotta restart that app every once in a while to reclaim
system resources it gobbled up and never gave back.

Merits of the language notwithstanding, I'd rather not have a buggy, still
under development (depreciating everything under the sun with every new
iteration) JVM parasite in my DB.

So... you want a larger, slower, memory leaking, more crash-prone DB just
to have java support?

Personally, I hope the Postgres developers don't make the same mistake as
the Oracle developers.  Yuck.

-- 
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+
| Shaun M. Thomas                INN Database Programmer              |
| Phone: (309) 743-0812          Fax  : (309) 743-0830                |
| Email: sthomas@townnews.com    AIM  : trifthen                      |
| Web  : hamster.lee.net                                              |
|                                                                     |
|     "Most of our lives are about proving something, either to       |
|      ourselves or to someone else."                                 |
|                                           -- Anonymous              |
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+





^ permalink  raw  reply  [nested|flat] 69+ messages in thread

* Re: PL/java?
@ 2001-08-31 18:47  Alex Pilosov <alex@pilosoft.com>
  parent: Marshall Spight <marshall@meetstheeye.com>
  1 sibling, 1 reply; 69+ messages in thread

From: Alex Pilosov @ 2001-08-31 18:47 UTC (permalink / raw)
  To: Marshall Spight <marshall@meetstheeye.com>; +Cc: pgsql-general

On Thu, 30 Aug 2001, Marshall Spight wrote:

> This was a major issue in 1996. It's been solved for several years now, but
> the perception of Java having a speed problem remains.
> 
> Java stored procedures are the #1 most-desired-by-me feature for PostgreSQL.
> Oracle and Sybase are examples of databases that have this feature already.
> (Strangely, Microsoft's database doesn't have it :-)
Its not a perception. Java is still a dog.

Again, see my mail message of few days ago regarding faking PL/java using
pl/perl ;)

-alex





^ permalink  raw  reply  [nested|flat] 69+ messages in thread

* Re: PL/java?
@ 2001-08-31 23:15  Robert J. Sanford, Jr. <rsanford@nolimitsystems.com>
  parent: Shaun Thomas <sthomas@townnews.com>
  1 sibling, 2 replies; 69+ messages in thread

From: Robert J. Sanford, Jr. @ 2001-08-31 23:15 UTC (permalink / raw)
  To: pgsql-general

have you ever seen/benchmarked the orion application
server? it's a java web and appserver and their
benchmarks have it outperforming ASP code which runs
natively inside of win2k.

also take a look at jetty which is a beautiful and
tiny web server designed for embedding in java apps
that also runs servlets and jsps.

both are 100% pure java.

just because tomcat doesn't cut the mustard doesn't
mean that _nothing_ else does.

rjsjr

> -----Original Message-----
> From: pgsql-general-owner@postgresql.org
> [mailto:pgsql-general-owner@postgresql.org]On Behalf Of Shaun Thomas
> Sent: Friday, August 31, 2001 11:28 AM
> To: Alex Knight
> Cc: Gowey, Geoffrey; 'Dr. Evil'; pgsql-general@postgresql.org
> Subject: Re: [GENERAL] PL/java?
>
>
> On Sun, 26 Aug 2001, Alex Knight wrote:
>
> > I keep hearing all this talk about Java being slow, and
> how compiled Java is
> > nearly as slow as interpreted languages... If Java was
> _that_ slow, do you
> > think it would be powering a majority of the Enterprise
> level sites out there?
>
> Have you ever actually used Java on an enterprise-level
> application?  Ever
> see the Tomcat webserver?  It uses 100MB of memory, drives
> the load on our
> server up to 8, and doesn't serve nearly as fast apache.
> Do you really
> want that in your database?
>
> It isn't slow just because of the interpretation, or the
> byte-code, or the
> structure, or even the overhead.  It's slow because every
> application must
> have a hulking JVM sitting in memory, bringing even fast
> machines to their
> knees in short order.  Not even perl, with everything it
> does, is that
> big, nor does it affect a machine so adversely.  Ever
> wonder why most
> JVM's stay in memory after they start?
>
> Compare the speed of Oracle 8 with 8i if you don't believe me.  The
> stability is also much worse.  Ever see a JVM on any
> platform that didn't
> crash if you looked at it cockeyed?  Ever really trust the garbage
> collection?  I don't.  I've found a memory leak in IBM
> developed java
> libraries.  Gotta restart that app every once in a while to reclaim
> system resources it gobbled up and never gave back.
>
> Merits of the language notwithstanding, I'd rather not have
> a buggy, still
> under development (depreciating everything under the sun
> with every new
> iteration) JVM parasite in my DB.
>
> So... you want a larger, slower, memory leaking, more
> crash-prone DB just
> to have java support?
>
> Personally, I hope the Postgres developers don't make the
> same mistake as
> the Oracle developers.  Yuck.
>
> --
> +-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> =-=-=-=-=-+
> | Shaun M. Thomas                INN Database Programmer
>           |
> | Phone: (309) 743-0812          Fax  : (309) 743-0830
>           |
> | Email: sthomas@townnews.com    AIM  : trifthen
>           |
> | Web  : hamster.lee.net
>           |
> |
>           |
> |     "Most of our lives are about proving something,
> either to       |
> |      ourselves or to someone else."
>           |
> |                                           -- Anonymous
>           |
> +-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> =-=-=-=-=-+
>
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to
> majordomo@postgresql.org
>




^ permalink  raw  reply  [nested|flat] 69+ messages in thread

* Re: PL/java?
@ 2001-09-01 01:10  Alex Knight <knight@phunc.com>
  parent: Marshall Spight <marshall@meetstheeye.com>
  1 sibling, 2 replies; 69+ messages in thread

From: Alex Knight @ 2001-09-01 01:10 UTC (permalink / raw)
  To: Marshall Spight <marshall@meetstheeye.com>; pgsql-general

Even when compiled into bytecode, Java is much slower than C/C++ when
bechmarked... However, Java does what I need it to. But just to clarify,
the "myth" continues on about "slowness."

-----Original Message-----
From: pgsql-general-owner@postgresql.org
[mailto:pgsql-general-owner@postgresql.org]On Behalf Of Marshall Spight
Sent: Thursday, August 30, 2001 11:52 AM
To: pgsql-general@postgresql.org
Subject: Re: [GENERAL] PL/java?


>> -----Original Message-----
>> From: Dr. Evil [mailto:drevil@sidereal.kz]
>> Sent: Saturday, August 25, 2001 7:38 PM
>> To: pgsql-general@postgresql.org
>> Subject: [GENERAL] PL/java?
>>
>>
>> What do you think of having java as a procedural language available in
>> PG?  It seems like java has many advantages.
>>
>> I'm just wondering if people have thoughts or ideas on this, and if
>> someone is actually working on it, that would be cool.

>""Gowey, Geoffrey"" <ggowey@rxhope.com> wrote in message
news:E15F4B031E17D5118B18009027F67927DAC0@SERVER...
> probably a bad idea.  From what I've heard the speed of your java program
is
> wholely dependent on the speed of your vm (and most aren't that quick).
> Although it would be nice to have just to say we have it and mysql doesn't
> (then again mysql doesn't have a whole lot of things that pgsql already
> has).
>
> Geoff

This was a major issue in 1996. It's been solved for several years now, but
the perception of Java having a speed problem remains.

Java stored procedures are the #1 most-desired-by-me feature for PostgreSQL.
Oracle and Sybase are examples of databases that have this feature already.
(Strangely, Microsoft's database doesn't have it :-)


Marshall Spight




---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html




^ permalink  raw  reply  [nested|flat] 69+ messages in thread

* Re: PL/java?
@ 2001-09-01 01:21  Thomas Lockhart <lockhart@fourpalms.org>
  parent: Alex Knight <knight@phunc.com>
  1 sibling, 1 reply; 69+ messages in thread

From: Thomas Lockhart @ 2001-09-01 01:21 UTC (permalink / raw)
  To: Alex Knight <knight@phunc.com>; +Cc: Marshall Spight <marshall@meetstheeye.com>; pgsql-general

...
> Java stored procedures are the #1 most-desired-by-me feature for PostgreSQL.
> Oracle and Sybase are examples of databases that have this feature already.
...

How does java manage its resources when it is an embedded component?
When it is standalone, the Sun JDK seems to want to have a fixed maximum
amount of memory, as an example. I'd hate to have a nice 10MB PostgreSQL
backend calling a 256MB jvm to execute a simple small program.

The other embedded languages we have start small and can grow
dynamically. But I don't know what is possible in this regard for
Java...

                       - Thomas



^ permalink  raw  reply  [nested|flat] 69+ messages in thread

* Re: PL/java?
@ 2001-09-01 01:42  Alex Knight <knight@phunc.com>
  parent: Shaun Thomas <sthomas@townnews.com>
  1 sibling, 2 replies; 69+ messages in thread

From: Alex Knight @ 2001-09-01 01:42 UTC (permalink / raw)
  To: Shaun Thomas <sthomas@townnews.com>; Alex Knight <knight@righteous.net>; +Cc: Gowey, Geoffrey <ggowey@rxhope.com>; 'Dr. Evil' <drevil@sidereal.kz>; pgsql-general

I'm very sorry that you've had bad experiences with Java. Apparently they
seem
tainted. Part of your problem is that you were using inexpensive java
application
servers (tomcat) that, IMHO, need plenty of optimization and fine tuning
before
they can be used to successfully deploy an enterprise application. Apps like
tomcat
are _great_ for development, but anything more than that, and you will most
definately run into situations like you described. Ofcourse, there are
probably
those that slip through the cracks, and still have a successful deployment
of these lower-end app servers and still survive with hundreds of thousands
of hits
per day.

It is generally wiser to split the webservers from the appservers; that will
save on memory footprints from each respectively. That alone can give each
machine a specific task to accomplish... generally more efficiently. But I
would assume you know this.

Using something like WebLogic, WebSphere, or Orion would be a wiser
approach.
For the company with the low budget, Orion is only something like $2000, and
it has full J2EE support, including EJBs, etc. Try finding that kind of
richness in Tomcat. Also, Orion takes up only 40-50mb at start, which is
really
fairly reasonable; ram is cheap anyways... a server that has to perform
complicated algorithms to a large audience but has hardly any ram shouldn't
be
on the internet anyways; unless it can handle it.

I feel that you don't really have enough experience with _java_ to judge it
accurately. Frankly, the JVM is quite small nowadays, considering the amount
of
base classes that sit in memory much of the time. And the JVMs are really
much
faster these days. Java is still slow for 2 reasons: 1) Developers who don't
optimize their code as they write it, 2) Bytecode interpretation is and
probably
never will be as fast as something like C/C++. But it certainly isn't the
JVM itself
slowing it down because of some "extended memory" that it lives in. Any
reasonable
server should have absolutely no problems if the jvm is implemented
_properly_
(which many packages do not do), etc. If you're comparing Java to perl, yes,
certainly it's a bit more of a beast, but perl quite simply can't keep up
in speed and feature richness (when was the last time you secured your perl
code
in a redistributable fashion?)

Oracle 8 and Oracle 8i are really two different dbs. I've personally seen
much
improvement with 8i, and in comparisons between legacy oracle8 dbs versus
oracle8i
containing the same live database structure and data (10 million+ rows)
we've seen
IMPROVEMENT in our query timings. It isn't java affecting 8i in a negative
way
unless ofcourse you are actually embedding java code, in which case, could
easily
be your code affecting the db if not watched carefully.

The only time garbage collection has been a problem, is when software
companies
start tampering with the jvm or create their own pseudo garbage collection,
like
IBM does with WebSphere (*cough*). WebSphere can be truely dangerous.

Adding java support in postgresql does not mean that it will affect users in
any
way that, by default, will not even compile in support for it. How will that
affect
users who feel no need for it? Furthermore, I strongly disagree that adding
Java
support will make it "larger, slower, memory leaking, more crash-prone".
Like any
products, languages, or even situation, there are well written devices, and
poorly
written devices. Your bad experiences with Tomcat have surely stained you
against
java. If you have the time, I suggest you go download a free copy of Orion
(orionserver.com) and see how incredible true enterprise J2EE can be.

The only mistake the developers can make is poorly implementing the jvm, but
most
certainly not Java itself. I've been working on architecting and building
enterprise level sites and applications for nearly 8 years now, and I've
seen too
many people try to implement perl cgi websites for enterprise sites and
watch
them choke and crawl to their knees because of poor system resource
handling,
lack of scalability, etc... I most certainly don't consider a single
webserver with an appserver and tiny database to be enterprise level either
(not that I'm inferring you said it was).

-Knight


-----Original Message-----
From: Shaun Thomas [mailto:sthomas@townnews.com]
Sent: Friday, August 31, 2001 9:28 AM
To: Alex Knight
Cc: Gowey, Geoffrey; 'Dr. Evil'; pgsql-general@postgresql.org
Subject: Re: [GENERAL] PL/java?


On Sun, 26 Aug 2001, Alex Knight wrote:

> I keep hearing all this talk about Java being slow, and how compiled Java
is
> nearly as slow as interpreted languages... If Java was _that_ slow, do you
> think it would be powering a majority of the Enterprise level sites out
there?

Have you ever actually used Java on an enterprise-level application?  Ever
see the Tomcat webserver?  It uses 100MB of memory, drives the load on our
server up to 8, and doesn't serve nearly as fast apache.  Do you really
want that in your database?

It isn't slow just because of the interpretation, or the byte-code, or the
structure, or even the overhead.  It's slow because every application must
have a hulking JVM sitting in memory, bringing even fast machines to their
knees in short order.  Not even perl, with everything it does, is that
big, nor does it affect a machine so adversely.  Ever wonder why most
JVM's stay in memory after they start?

Compare the speed of Oracle 8 with 8i if you don't believe me.  The
stability is also much worse.  Ever see a JVM on any platform that didn't
crash if you looked at it cockeyed?  Ever really trust the garbage
collection?  I don't.  I've found a memory leak in IBM developed java
libraries.  Gotta restart that app every once in a while to reclaim
system resources it gobbled up and never gave back.

Merits of the language notwithstanding, I'd rather not have a buggy, still
under development (depreciating everything under the sun with every new
iteration) JVM parasite in my DB.

So... you want a larger, slower, memory leaking, more crash-prone DB just
to have java support?

Personally, I hope the Postgres developers don't make the same mistake as
the Oracle developers.  Yuck.

--
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+
| Shaun M. Thomas                INN Database Programmer              |
| Phone: (309) 743-0812          Fax  : (309) 743-0830                |
| Email: sthomas@townnews.com    AIM  : trifthen                      |
| Web  : hamster.lee.net                                              |
|                                                                     |
|     "Most of our lives are about proving something, either to       |
|      ourselves or to someone else."                                 |
|                                           -- Anonymous              |
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+






^ permalink  raw  reply  [nested|flat] 69+ messages in thread

* Re: PL/java?
@ 2001-09-01 01:46  Alex Knight <knight@phunc.com>
  parent: Robert J. Sanford, Jr. <rsanford@nolimitsystems.com>
  1 sibling, 0 replies; 69+ messages in thread

From: Alex Knight @ 2001-09-01 01:46 UTC (permalink / raw)
  To: Robert J. Sanford, Jr. <rsanford@nolimitsystems.com>; pgsql-general

Well spoken...

-Knight

-----Original Message-----
From: pgsql-general-owner@postgresql.org
[mailto:pgsql-general-owner@postgresql.org]On Behalf Of Robert J.
Sanford, Jr.
Sent: Friday, August 31, 2001 4:15 PM
To: pgsql-general@postgresql.org
Subject: Re: [GENERAL] PL/java?


have you ever seen/benchmarked the orion application
server? it's a java web and appserver and their
benchmarks have it outperforming ASP code which runs
natively inside of win2k.

also take a look at jetty which is a beautiful and
tiny web server designed for embedding in java apps
that also runs servlets and jsps.

both are 100% pure java.

just because tomcat doesn't cut the mustard doesn't
mean that _nothing_ else does.

rjsjr

> -----Original Message-----
> From: pgsql-general-owner@postgresql.org
> [mailto:pgsql-general-owner@postgresql.org]On Behalf Of Shaun Thomas
> Sent: Friday, August 31, 2001 11:28 AM
> To: Alex Knight
> Cc: Gowey, Geoffrey; 'Dr. Evil'; pgsql-general@postgresql.org
> Subject: Re: [GENERAL] PL/java?
>
>
> On Sun, 26 Aug 2001, Alex Knight wrote:
>
> > I keep hearing all this talk about Java being slow, and
> how compiled Java is
> > nearly as slow as interpreted languages... If Java was
> _that_ slow, do you
> > think it would be powering a majority of the Enterprise
> level sites out there?
>
> Have you ever actually used Java on an enterprise-level
> application?  Ever
> see the Tomcat webserver?  It uses 100MB of memory, drives
> the load on our
> server up to 8, and doesn't serve nearly as fast apache.
> Do you really
> want that in your database?
>
> It isn't slow just because of the interpretation, or the
> byte-code, or the
> structure, or even the overhead.  It's slow because every
> application must
> have a hulking JVM sitting in memory, bringing even fast
> machines to their
> knees in short order.  Not even perl, with everything it
> does, is that
> big, nor does it affect a machine so adversely.  Ever
> wonder why most
> JVM's stay in memory after they start?
>
> Compare the speed of Oracle 8 with 8i if you don't believe me.  The
> stability is also much worse.  Ever see a JVM on any
> platform that didn't
> crash if you looked at it cockeyed?  Ever really trust the garbage
> collection?  I don't.  I've found a memory leak in IBM
> developed java
> libraries.  Gotta restart that app every once in a while to reclaim
> system resources it gobbled up and never gave back.
>
> Merits of the language notwithstanding, I'd rather not have
> a buggy, still
> under development (depreciating everything under the sun
> with every new
> iteration) JVM parasite in my DB.
>
> So... you want a larger, slower, memory leaking, more
> crash-prone DB just
> to have java support?
>
> Personally, I hope the Postgres developers don't make the
> same mistake as
> the Oracle developers.  Yuck.
>
> --
> +-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> =-=-=-=-=-+
> | Shaun M. Thomas                INN Database Programmer
>           |
> | Phone: (309) 743-0812          Fax  : (309) 743-0830
>           |
> | Email: sthomas@townnews.com    AIM  : trifthen
>           |
> | Web  : hamster.lee.net
>           |
> |
>           |
> |     "Most of our lives are about proving something,
> either to       |
> |      ourselves or to someone else."
>           |
> |                                           -- Anonymous
>           |
> +-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> =-=-=-=-=-+
>
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to
> majordomo@postgresql.org
>


---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster




^ permalink  raw  reply  [nested|flat] 69+ messages in thread

* [WAY OT] Re: PL/java?
@ 2001-09-01 02:35  Alex Pilosov <alex@pilosoft.com>
  parent: Alex Knight <knight@phunc.com>
  1 sibling, 2 replies; 69+ messages in thread

From: Alex Pilosov @ 2001-09-01 02:35 UTC (permalink / raw)
  To: Alex Knight <knight@phunc.com>; +Cc: pgsql-general

On Fri, 31 Aug 2001, Alex Knight wrote:

> It is generally wiser to split the webservers from the appservers;
> that will save on memory footprints from each respectively. That alone
> can give each machine a specific task to accomplish... generally more
> efficiently. But I would assume you know this.

And it is wise to split database from middleware, and not try to saddle
PostgreSQL with requirements to support Java in-process. _IF_ java stored
procedures are implemented, it should be via something like a) oracle's
extproc (start a separate process to load the function) b) some of perl
java tools (they start a jdk in a separate process and communicate with it
using RMI).


Problem with java-pgsql integration is the threads model: Java really
really wants threads. Postgres doesn't do threads. So if most simple way
is attempted, you will incur overhead of starting up JVM for each backend
(a few seconds as opposed to milliseconds) and non-shared 30M of memory
per backend (as opposed to currently <3 megs of non-shared memory per
backend).

> Using something like WebLogic, WebSphere, or Orion would be a wiser
> approach. For the company with the low budget, Orion is only something
> like $2000, and it has full J2EE support, including EJBs, etc. Try
> finding that kind of richness in Tomcat. Also, Orion takes up only
> 40-50mb at start, which is really fairly reasonable; ram is cheap
> anyways... a server that has to perform complicated algorithms to a
> large audience but has hardly any ram shouldn't be on the internet
> anyways; unless it can handle it.

_ONLY_ 40-50Mb?! Egads, I'm hard pressed to find any other piece of
(non-windows, non-java) software that takes 40-50M just to start up!

I worked with both CrapLogic and CrapSphere. Weblogic takes 20-60 seconds
to start up on P3-800, that, IMHO, is ridiculous. 

It is not only issue of memory, its easy to throw memory at the problem,
its an issue of _incremental use_ of memory. As you scale 

> I feel that you don't really have enough experience with _java_ to
> judge it accurately. Frankly, the JVM is quite small nowadays,
> considering the amount of base classes that sit in memory much of the
> time. And the JVMs are really much faster these days. Java is still
> slow for 2 reasons: 1) Developers who don't optimize their code as
> they write it, 2) Bytecode interpretation is and probably never will
> be as fast as something like C/C++. But it certainly isn't the JVM
> itself slowing it down because of some "extended memory" that it lives
> in. Any reasonable server should have absolutely no problems if the
> jvm is implemented _properly_ (which many packages do not do), etc. If
> you're comparing Java to perl, yes, certainly it's a bit more of a
> beast, but perl quite simply can't keep up in speed and feature
> richness (when was the last time you secured your perl code in a
> redistributable fashion?)
_WHY_ the heck do all base classes need to be in memory all the time? Why
are they so huge? Libc is _far far_ smaller, and libstdc++ is tiny
compared to all the java standard library. 

You know what the answer to it is: Because they are ALL written in java,
as opposed to more sane languages like perl which handcode their "standard
libraries" or the most important pieces of them in C. 

Perl is far faster than java in about any practical application I did.
Again, the issue is not speed of JVM versus PP (perl virtual machine), if
you did number crunching in perl and java, they would probably be at par.
Its an issue of standard libraries. They are _horribly slow_. Perl's
hashtables are a very nice piece of optimized C code. Java's hashtables
are written in Java. Need I say more? Java's AWT was a dog. Swing is a dog
and a half, because they reimplemented all the things that are commonly
done in C in Java.

> The only mistake the developers can make is poorly implementing the
> jvm, but most certainly not Java itself. I've been working on
> architecting and building enterprise level sites and applications for
> nearly 8 years now, and I've seen too many people try to implement
> perl cgi websites for enterprise sites and watch them choke and crawl
> to their knees because of poor system resource handling, lack of
> scalability, etc... I most certainly don't consider a single webserver
> with an appserver and tiny database to be enterprise level either (not
> that I'm inferring you said it was).
You cannot compare a perl CGI script and a J2EE server. Its like comparing
a webserver you wrote yourself vs apache! There are application servers
(or more closely, code libraries) for perl that match what J2EE provides. 

--
Alex Pilosov            | http://www.acedsl.com/home.html
CTO - Acecape, Inc.     | AceDSL:The best ADSL in the world
325 W 38 St. Suite 1005 | (Stealth Marketing Works! :)
New York, NY 10018      |




^ permalink  raw  reply  [nested|flat] 69+ messages in thread

* Re: [WAY OT] Re: PL/java?
@ 2001-09-01 02:45  Alex Knight <knight@phunc.com>
  parent: Alex Pilosov <alex@pilosoft.com>
  1 sibling, 3 replies; 69+ messages in thread

From: Alex Knight @ 2001-09-01 02:45 UTC (permalink / raw)
  To: Alex Pilosov <alex@pilosoft.com>; +Cc: pgsql-general

Not really.

Yes, AWT sucks. Yes, Swing sucks. Java's gui code can be INCREDIBLY lame.
But for server-side situations, Java can be incredibly scalable.

I wasn't comparing a perl CGI script and a J2EE server, other than saying
perl simply doesn't offer what J2EE does. Furthermore, I've seen more
newbies
write perl cgi scripts in an enterprise environment and break the site
the minute traffic picks up.

IMHO, scalability is incredibly important, and perl leaves that out often.
Even with Fast-CGI style servers, perl sucks. Perl is great for admin
interfaces, or low to medium traffic sites.

-----Original Message-----
From: Alex Pilosov [mailto:alex@pilosoft.com]
Sent: Friday, August 31, 2001 7:35 PM
To: Alex Knight
Cc: pgsql-general@postgresql.org
Subject: [WAY OT] Re: [GENERAL] PL/java?


On Fri, 31 Aug 2001, Alex Knight wrote:

> It is generally wiser to split the webservers from the appservers;
> that will save on memory footprints from each respectively. That alone
> can give each machine a specific task to accomplish... generally more
> efficiently. But I would assume you know this.

And it is wise to split database from middleware, and not try to saddle
PostgreSQL with requirements to support Java in-process. _IF_ java stored
procedures are implemented, it should be via something like a) oracle's
extproc (start a separate process to load the function) b) some of perl
java tools (they start a jdk in a separate process and communicate with it
using RMI).


Problem with java-pgsql integration is the threads model: Java really
really wants threads. Postgres doesn't do threads. So if most simple way
is attempted, you will incur overhead of starting up JVM for each backend
(a few seconds as opposed to milliseconds) and non-shared 30M of memory
per backend (as opposed to currently <3 megs of non-shared memory per
backend).

> Using something like WebLogic, WebSphere, or Orion would be a wiser
> approach. For the company with the low budget, Orion is only something
> like $2000, and it has full J2EE support, including EJBs, etc. Try
> finding that kind of richness in Tomcat. Also, Orion takes up only
> 40-50mb at start, which is really fairly reasonable; ram is cheap
> anyways... a server that has to perform complicated algorithms to a
> large audience but has hardly any ram shouldn't be on the internet
> anyways; unless it can handle it.

_ONLY_ 40-50Mb?! Egads, I'm hard pressed to find any other piece of
(non-windows, non-java) software that takes 40-50M just to start up!

I worked with both CrapLogic and CrapSphere. Weblogic takes 20-60 seconds
to start up on P3-800, that, IMHO, is ridiculous.

It is not only issue of memory, its easy to throw memory at the problem,
its an issue of _incremental use_ of memory. As you scale

> I feel that you don't really have enough experience with _java_ to
> judge it accurately. Frankly, the JVM is quite small nowadays,
> considering the amount of base classes that sit in memory much of the
> time. And the JVMs are really much faster these days. Java is still
> slow for 2 reasons: 1) Developers who don't optimize their code as
> they write it, 2) Bytecode interpretation is and probably never will
> be as fast as something like C/C++. But it certainly isn't the JVM
> itself slowing it down because of some "extended memory" that it lives
> in. Any reasonable server should have absolutely no problems if the
> jvm is implemented _properly_ (which many packages do not do), etc. If
> you're comparing Java to perl, yes, certainly it's a bit more of a
> beast, but perl quite simply can't keep up in speed and feature
> richness (when was the last time you secured your perl code in a
> redistributable fashion?)
_WHY_ the heck do all base classes need to be in memory all the time? Why
are they so huge? Libc is _far far_ smaller, and libstdc++ is tiny
compared to all the java standard library.

You know what the answer to it is: Because they are ALL written in java,
as opposed to more sane languages like perl which handcode their "standard
libraries" or the most important pieces of them in C.

Perl is far faster than java in about any practical application I did.
Again, the issue is not speed of JVM versus PP (perl virtual machine), if
you did number crunching in perl and java, they would probably be at par.
Its an issue of standard libraries. They are _horribly slow_. Perl's
hashtables are a very nice piece of optimized C code. Java's hashtables
are written in Java. Need I say more? Java's AWT was a dog. Swing is a dog
and a half, because they reimplemented all the things that are commonly
done in C in Java.

> The only mistake the developers can make is poorly implementing the
> jvm, but most certainly not Java itself. I've been working on
> architecting and building enterprise level sites and applications for
> nearly 8 years now, and I've seen too many people try to implement
> perl cgi websites for enterprise sites and watch them choke and crawl
> to their knees because of poor system resource handling, lack of
> scalability, etc... I most certainly don't consider a single webserver
> with an appserver and tiny database to be enterprise level either (not
> that I'm inferring you said it was).
You cannot compare a perl CGI script and a J2EE server. Its like comparing
a webserver you wrote yourself vs apache! There are application servers
(or more closely, code libraries) for perl that match what J2EE provides.

--
Alex Pilosov            | http://www.acedsl.com/home.html
CTO - Acecape, Inc.     | AceDSL:The best ADSL in the world
325 W 38 St. Suite 1005 | (Stealth Marketing Works! :)
New York, NY 10018      |





^ permalink  raw  reply  [nested|flat] 69+ messages in thread

* Re: [WAY OT] Re: PL/java?
@ 2001-09-01 02:46  Alex Knight <knight@phunc.com>
  parent: Alex Pilosov <alex@pilosoft.com>
  1 sibling, 0 replies; 69+ messages in thread

From: Alex Knight @ 2001-09-01 02:46 UTC (permalink / raw)
  To: Alex Pilosov <alex@pilosoft.com>; +Cc: pgsql-general

Also, if we should remove "middleware" from the database, I think we
better remove PG/PLSQL, C, and all the other various api's we support.
The ability to support Java doesn't turn the database into a middleware
whore, it already IS.

-----Original Message-----
From: pgsql-general-owner@postgresql.org
[mailto:pgsql-general-owner@postgresql.org]On Behalf Of Alex Pilosov
Sent: Friday, August 31, 2001 7:35 PM
To: Alex Knight
Cc: pgsql-general@postgresql.org
Subject: [WAY OT] Re: [GENERAL] PL/java?


On Fri, 31 Aug 2001, Alex Knight wrote:

> It is generally wiser to split the webservers from the appservers;
> that will save on memory footprints from each respectively. That alone
> can give each machine a specific task to accomplish... generally more
> efficiently. But I would assume you know this.

And it is wise to split database from middleware, and not try to saddle
PostgreSQL with requirements to support Java in-process. _IF_ java stored
procedures are implemented, it should be via something like a) oracle's
extproc (start a separate process to load the function) b) some of perl
java tools (they start a jdk in a separate process and communicate with it
using RMI).


Problem with java-pgsql integration is the threads model: Java really
really wants threads. Postgres doesn't do threads. So if most simple way
is attempted, you will incur overhead of starting up JVM for each backend
(a few seconds as opposed to milliseconds) and non-shared 30M of memory
per backend (as opposed to currently <3 megs of non-shared memory per
backend).

> Using something like WebLogic, WebSphere, or Orion would be a wiser
> approach. For the company with the low budget, Orion is only something
> like $2000, and it has full J2EE support, including EJBs, etc. Try
> finding that kind of richness in Tomcat. Also, Orion takes up only
> 40-50mb at start, which is really fairly reasonable; ram is cheap
> anyways... a server that has to perform complicated algorithms to a
> large audience but has hardly any ram shouldn't be on the internet
> anyways; unless it can handle it.

_ONLY_ 40-50Mb?! Egads, I'm hard pressed to find any other piece of
(non-windows, non-java) software that takes 40-50M just to start up!

I worked with both CrapLogic and CrapSphere. Weblogic takes 20-60 seconds
to start up on P3-800, that, IMHO, is ridiculous. 

It is not only issue of memory, its easy to throw memory at the problem,
its an issue of _incremental use_ of memory. As you scale 

> I feel that you don't really have enough experience with _java_ to
> judge it accurately. Frankly, the JVM is quite small nowadays,
> considering the amount of base classes that sit in memory much of the
> time. And the JVMs are really much faster these days. Java is still
> slow for 2 reasons: 1) Developers who don't optimize their code as
> they write it, 2) Bytecode interpretation is and probably never will
> be as fast as something like C/C++. But it certainly isn't the JVM
> itself slowing it down because of some "extended memory" that it lives
> in. Any reasonable server should have absolutely no problems if the
> jvm is implemented _properly_ (which many packages do not do), etc. If
> you're comparing Java to perl, yes, certainly it's a bit more of a
> beast, but perl quite simply can't keep up in speed and feature
> richness (when was the last time you secured your perl code in a
> redistributable fashion?)
_WHY_ the heck do all base classes need to be in memory all the time? Why
are they so huge? Libc is _far far_ smaller, and libstdc++ is tiny
compared to all the java standard library. 

You know what the answer to it is: Because they are ALL written in java,
as opposed to more sane languages like perl which handcode their "standard
libraries" or the most important pieces of them in C. 

Perl is far faster than java in about any practical application I did.
Again, the issue is not speed of JVM versus PP (perl virtual machine), if
you did number crunching in perl and java, they would probably be at par.
Its an issue of standard libraries. They are _horribly slow_. Perl's
hashtables are a very nice piece of optimized C code. Java's hashtables
are written in Java. Need I say more? Java's AWT was a dog. Swing is a dog
and a half, because they reimplemented all the things that are commonly
done in C in Java.

> The only mistake the developers can make is poorly implementing the
> jvm, but most certainly not Java itself. I've been working on
> architecting and building enterprise level sites and applications for
> nearly 8 years now, and I've seen too many people try to implement
> perl cgi websites for enterprise sites and watch them choke and crawl
> to their knees because of poor system resource handling, lack of
> scalability, etc... I most certainly don't consider a single webserver
> with an appserver and tiny database to be enterprise level either (not
> that I'm inferring you said it was).
You cannot compare a perl CGI script and a J2EE server. Its like comparing
a webserver you wrote yourself vs apache! There are application servers
(or more closely, code libraries) for perl that match what J2EE provides. 

--
Alex Pilosov            | http://www.acedsl.com/home.html
CTO - Acecape, Inc.     | AceDSL:The best ADSL in the world
325 W 38 St. Suite 1005 | (Stealth Marketing Works! :)
New York, NY 10018      |


---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly




^ permalink  raw  reply  [nested|flat] 69+ messages in thread

* Re: PL/java?
@ 2001-09-01 04:02  Robert J. Sanford, Jr. <rsanford@nolimitsystems.com>
  parent: Alex Knight <knight@phunc.com>
  1 sibling, 1 reply; 69+ messages in thread

From: Robert J. Sanford, Jr. @ 2001-09-01 04:02 UTC (permalink / raw)
  To: pgsql-general

note - i don't work for any of the companies whose products
are mentioned below. i have performed evaluations of these
products and the support provided when attempting to determine
what platform my company's systems should run on. unfortunately,
i did not choose orion and i am suffering for it now...

some goober blathered thusly:
> Have you ever actually used Java on an enterprise-level 
> application?  Ever see the Tomcat webserver?  It uses
> 100MB of memory, drives the load on our server up to 8,
> and doesn't serve nearly as fast apache. Do you really
> want that in your database?

first - don't complain about java because you or someone
in your group/department/company made a poor decision on
what tools to use. that's like complaining about mexican
food when the only experience you have is eating an out-
dated frozen burrito from the 7-11 freezer.

when looking at the performance of java you have to take
a look at two things - first you have to compare various
java implementations against each other and then you have
to compare the best java implementations against native
c/c++ code. the following link does that. the java tests
include tomcat, orion, websphere, and resin. jrun and
weblogic were originally included in the testing but
were both removed at their companies' request.

the tests also compare orion vs microsoft asp running on
win2k and iis5. all tests run on the same hardware.

what i believe these tests clearly demonstrate is that
java is not the problem, the implementation applications
based on java is. i also do not believe that tomcat is
a fair representation of java performance in that it is
intended to be a reference implementation. as such, the
code base should sacrifice performance for clarity.

http://www.orionserver.com/benchmarks/benchmark.html


while not in the benchmark i would also like to
recommend jetty as an app server. it is an opensource,
100% java web and application server. in its base form
it is "just" a web, servlet, and jsp engine. it does,
however, have contributed code providing integration
with other j2ee opensource projects such as the JBoss
EJB engine.

you can find the jetty home page at:
   http://jetty.mortbay.com/

and then they blathered some more:
> Compare the speed of Oracle 8 with 8i if you don't
> believe me.  The stability is also much worse.  Ever
> see a JVM on any platform that didn't crash if you
> looked at it cockeyed?  Ever really trust the garbage
> collection?  I don't.  I've found a memory leak in IBM 
> developed java libraries.  Gotta restart that app
> every once in a while to reclaim system resources it
> gobbled up and never gave back.

some mention was made regarding the performance of
the oracle8i application server. well, oracle has
realized that their performance was sub-optimal and
rectified the situation by licensing the orion server
for oracle9i. while money and politics most certainly
play a part in any licensing arrangement they must
also realize that making customers happy through the
performance of their applications will lead to more
money. the link to the press release is below.

http://www.oracle.com/corporate/press/index.html?759347.html

all of that being said...

i don't think that the person that started this thread
did anything wrong by making the request they did. that
is what opensource is all about - contributions, even
just contributions of ideas, are welcomed. even so, there
are several options that i see for getting it implemented:
1) its an open source project so implement it yourself.
   while i have never worked on modifying the code base
   i am extremely confident that the current developers
   will be more than willing to give you advice and
   pointers.
2) if #1 is not feasible either because you don't have
   the time, the inclination, or the experience then
   you can write a contract that will pay one of the
   postgres developers to implement it for you.
3) if that isn't feasible you can try to get a volunteer
   to do so.
4) if that isn't feasible then you either have to live
   with what you have, go elsewhere, or be quiet.

to the person that blathered thusly in response to the
request for java:
> Merits of the language notwithstanding, I'd rather
> not have a buggy, still under development
> (depreciating everything under the sun with every
> new iteration) JVM parasite in my DB.

informed and intelligent debate is good. given that i
believe such to be true, i would request that you
refrain from blathering such vitriol and uninformed
nonsense. not only is it for the good of the people
on the list who don't want to hear it but it will
also do you good by not telling everyone out there
that you are a very silly person that doesn't deal
with logic and/or facts.

to everyone else on the list - if we all contribute
a penny we could probably buy enough burritos from
7-11 to make sure that his hands and mouth are busy
for a good long while.

rjsjr





^ permalink  raw  reply  [nested|flat] 69+ messages in thread

* Re: [WAY OT] Re: PL/java?
@ 2001-09-01 06:25  Daniel Kalchev <daniel@digsys.bg>
  parent: Alex Knight <knight@phunc.com>
  2 siblings, 1 reply; 69+ messages in thread

From: Daniel Kalchev @ 2001-09-01 06:25 UTC (permalink / raw)
  To: Alex Knight <knight@phunc.com>; +Cc: Alex Pilosov <alex@pilosoft.com>; pgsql-general

Well,

mod_perl is not exactly slow... and I believe any JAVA program will be slower 
than the respective PERL program (there are newbie books for both languages :)

But, perhaps you talk WINDOWS? If so, any software on WINDOWS can be slower 
than any other software on WINDOWS... just because they happen to link so some 
weird DLL.

Daniel

>>>"Alex Knight" said:
 > Not really.
 > 
 > Yes, AWT sucks. Yes, Swing sucks. Java's gui code can be INCREDIBLY lame.
 > But for server-side situations, Java can be incredibly scalable.
 > 
 > I wasn't comparing a perl CGI script and a J2EE server, other than saying
 > perl simply doesn't offer what J2EE does. Furthermore, I've seen more
 > newbies
 > write perl cgi scripts in an enterprise environment and break the site
 > the minute traffic picks up.
 > 
 > IMHO, scalability is incredibly important, and perl leaves that out often.
 > Even with Fast-CGI style servers, perl sucks. Perl is great for admin
 > interfaces, or low to medium traffic sites.
 > 
 > -----Original Message-----
 > From: Alex Pilosov [mailto:alex@pilosoft.com]
 > Sent: Friday, August 31, 2001 7:35 PM
 > To: Alex Knight
 > Cc: pgsql-general@postgresql.org
 > Subject: [WAY OT] Re: [GENERAL] PL/java?
 > 
 > 
 > On Fri, 31 Aug 2001, Alex Knight wrote:
 > 
 > > It is generally wiser to split the webservers from the appservers;
 > > that will save on memory footprints from each respectively. That alone
 > > can give each machine a specific task to accomplish... generally more
 > > efficiently. But I would assume you know this.
 > 
 > And it is wise to split database from middleware, and not try to saddle
 > PostgreSQL with requirements to support Java in-process. _IF_ java stored
 > procedures are implemented, it should be via something like a) oracle's
 > extproc (start a separate process to load the function) b) some of perl
 > java tools (they start a jdk in a separate process and communicate with it
 > using RMI).
 > 
 > 
 > Problem with java-pgsql integration is the threads model: Java really
 > really wants threads. Postgres doesn't do threads. So if most simple way
 > is attempted, you will incur overhead of starting up JVM for each backend
 > (a few seconds as opposed to milliseconds) and non-shared 30M of memory
 > per backend (as opposed to currently <3 megs of non-shared memory per
 > backend).
 > 
 > > Using something like WebLogic, WebSphere, or Orion would be a wiser
 > > approach. For the company with the low budget, Orion is only something
 > > like $2000, and it has full J2EE support, including EJBs, etc. Try
 > > finding that kind of richness in Tomcat. Also, Orion takes up only
 > > 40-50mb at start, which is really fairly reasonable; ram is cheap
 > > anyways... a server that has to perform complicated algorithms to a
 > > large audience but has hardly any ram shouldn't be on the internet
 > > anyways; unless it can handle it.
 > 
 > _ONLY_ 40-50Mb?! Egads, I'm hard pressed to find any other piece of
 > (non-windows, non-java) software that takes 40-50M just to start up!
 > 
 > I worked with both CrapLogic and CrapSphere. Weblogic takes 20-60 seconds
 > to start up on P3-800, that, IMHO, is ridiculous.
 > 
 > It is not only issue of memory, its easy to throw memory at the problem,
 > its an issue of _incremental use_ of memory. As you scale
 > 
 > > I feel that you don't really have enough experience with _java_ to
 > > judge it accurately. Frankly, the JVM is quite small nowadays,
 > > considering the amount of base classes that sit in memory much of the
 > > time. And the JVMs are really much faster these days. Java is still
 > > slow for 2 reasons: 1) Developers who don't optimize their code as
 > > they write it, 2) Bytecode interpretation is and probably never will
 > > be as fast as something like C/C++. But it certainly isn't the JVM
 > > itself slowing it down because of some "extended memory" that it lives
 > > in. Any reasonable server should have absolutely no problems if the
 > > jvm is implemented _properly_ (which many packages do not do), etc. If
 > > you're comparing Java to perl, yes, certainly it's a bit more of a
 > > beast, but perl quite simply can't keep up in speed and feature
 > > richness (when was the last time you secured your perl code in a
 > > redistributable fashion?)
 > _WHY_ the heck do all base classes need to be in memory all the time? Why
 > are they so huge? Libc is _far far_ smaller, and libstdc++ is tiny
 > compared to all the java standard library.
 > 
 > You know what the answer to it is: Because they are ALL written in java,
 > as opposed to more sane languages like perl which handcode their "standard
 > libraries" or the most important pieces of them in C.
 > 
 Perl is far faster than java in about any practical application I did.
 > Again, the issue is not speed of JVM versus PP (perl virtual machine), if
 > you did number crunching in perl and java, they would probably be at par.
 > Its an issue of standard libraries. They are _horribly slow_. Perl's
 > hashtables are a very nice piece of optimized C code. Java's hashtables
 > are written in Java. Need I say more? Java's AWT was a dog. Swing is a dog
 > and a half, because they reimplemented all the things that are commonly
 > done in C in Java.
 > 
 > > The only mistake the developers can make is poorly implementing the
 > > jvm, but most certainly not Java itself. I've been working on
 > > architecting and building enterprise level sites and applications for
 > > nearly 8 years now, and I've seen too many people try to implement
 > > perl cgi websites for enterprise sites and watch them choke and crawl
 > > to their knees because of poor system resource handling, lack of
 > > scalability, etc... I most certainly don't consider a single webserver
 > > with an appserver and tiny database to be enterprise level either (not
 > > that I'm inferring you said it was).
 > You cannot compare a perl CGI script and a J2EE server. Its like comparing
 > a webserver you wrote yourself vs apache! There are application servers
 > (or more closely, code libraries) for perl that match what J2EE provides.
 > 
 > --
 > Alex Pilosov            | http://www.acedsl.com/home.html
 > CTO - Acecape, Inc.     | AceDSL:The best ADSL in the world
 > 325 W 38 St. Suite 1005 | (Stealth Marketing Works! :)
 > New York, NY 10018      |
 > 
 > 
 > 
 > ---------------------------(end of broadcast)---------------------------
 > TIP 3: if posting/reading through Usenet, please send an appropriate
 > subscribe-nomail command to majordomo@postgresql.org so that your
 > message can get through to the mailing list cleanly





^ permalink  raw  reply  [nested|flat] 69+ messages in thread

* Re: PL/java?
@ 2001-09-01 09:56  Gunnar Rønning <gunnar@polygnosis.com>
  parent: Alex Pilosov <alex@pilosoft.com>
  0 siblings, 1 reply; 69+ messages in thread

From: Gunnar Rønning @ 2001-09-01 09:56 UTC (permalink / raw)
  To: Alex Pilosov <alex@pilosoft.com>; +Cc: Marshall Spight <marshall@meetstheeye.com>; pgsql-general

* Alex Pilosov <alex@pilosoft.com> wrote:
|
| Its not a perception. Java is still a dog.

Back it up or back out please. 

The most scalable and stable enterprise solutions out there are today 
running Java. In Java you actually get more time to concentrate on 
removing the real performance bottlenecks of your application. 


-- 
Gunnar Rønning - gunnar@polygnosis.com
Senior Consultant, Polygnosis AS, http://www.polygnosis.com/



^ permalink  raw  reply  [nested|flat] 69+ messages in thread

* Re: PL/java?
@ 2001-09-01 10:12  Gunnar Rønning <gunnar@polygnosis.com>
  parent: Alex Knight <knight@phunc.com>
  1 sibling, 0 replies; 69+ messages in thread

From: Gunnar Rønning @ 2001-09-01 10:12 UTC (permalink / raw)
  To: Alex Knight <knight@phunc.com>; +Cc: Marshall Spight <marshall@meetstheeye.com>; pgsql-general

* "Alex Knight" <knight@phunc.com> wrote:
|
| Even when compiled into bytecode, Java is much slower than C/C++ when

Well, compiling into bytecode is what you always do on the Java platform. 
There are some native compilers as well for the Java _language_, 
but these do not produce faster code than what you get with the best 
of breed just in time compilers.


| bechmarked... However, Java does what I need it to. But just to clarify,
| the "myth" continues on about "slowness."

Feel free to live in the dark. 

Why do you think IBM jumped on the Java wagon ? Because they needed 
some cute applets on their desktops ? 

http://www-1.ibm.com/servers/eserver/iseries/news/05jun2000.htm


-- 
Gunnar Rønning - gunnar@polygnosis.com
Senior Consultant, Polygnosis AS, http://www.polygnosis.com/



^ permalink  raw  reply  [nested|flat] 69+ messages in thread

* Re: PL/java?
@ 2001-09-01 10:14  Gunnar Rønning <gunnar@polygnosis.com>
  parent: Thomas Lockhart <lockhart@fourpalms.org>
  0 siblings, 1 reply; 69+ messages in thread

From: Gunnar Rønning @ 2001-09-01 10:14 UTC (permalink / raw)
  To: lockhart@fourpalms.org; +Cc: Alex Knight <knight@phunc.com>; Marshall Spight <marshall@meetstheeye.com>; pgsql-general

* Thomas Lockhart <lockhart@fourpalms.org> wrote:
|
| 
| The other embedded languages we have start small and can grow
| dynamically. But I don't know what is possible in this regard for
| Java...

The Sun JDK has these argument. I think the IBM JDK got similar
arguments. 

        -mx <size>              Maximum heap size
        -ms <size>              Initial heap size


-- 
Gunnar Rønning - gunnar@polygnosis.com
Senior Consultant, Polygnosis AS, http://www.polygnosis.com/



^ permalink  raw  reply  [nested|flat] 69+ messages in thread

* Re: PL/java?
@ 2001-09-01 10:17  Gunnar Rønning <gunnar@polygnosis.com>
  parent: Robert J. Sanford, Jr. <rsanford@nolimitsystems.com>
  1 sibling, 0 replies; 69+ messages in thread

From: Gunnar Rønning @ 2001-09-01 10:17 UTC (permalink / raw)
  To: Robert J. Sanford, Jr. <rsanford@nolimitsystems.com>; +Cc: pgsql-general

* "Robert J. Sanford, Jr." <rsanford@nolimitsystems.com> wrote:
|
| also take a look at jetty which is a beautiful and
| tiny web server designed for embedding in java apps
| that also runs servlets and jsps.

Tomcat is well known performance dog. Resin is one of the most 
popular servlet engine and JSP implementations. 

-- 
Gunnar Rønning - gunnar@polygnosis.com
Senior Consultant, Polygnosis AS, http://www.polygnosis.com/



^ permalink  raw  reply  [nested|flat] 69+ messages in thread

* Re: [WAY OT] Re: PL/java?
@ 2001-09-01 10:29  Gunnar Rønning <gunnar@polygnosis.com>
  parent: Alex Knight <knight@phunc.com>
  2 siblings, 0 replies; 69+ messages in thread

From: Gunnar Rønning @ 2001-09-01 10:29 UTC (permalink / raw)
  To: Alex Knight <knight@phunc.com>; +Cc: Alex Pilosov <alex@pilosoft.com>; pgsql-general

* "Alex Knight" <knight@phunc.com> wrote:
|
| IMHO, scalability is incredibly important, and perl leaves that out often.
| Even with Fast-CGI style servers, perl sucks. Perl is great for admin
| interfaces, or low to medium traffic sites.

We got a contract last december with a customer that were having some
performance problems with a perl web application. The customer has
access to the best perl programmers money can buy, but they could not
fix the performance problem.

We came in to make version 2.0 of the system. In one month we had an 
implementation in Java that outperformed the perl application by a factor 
of 10. The customer could stop the leasing of three of the Sun E450 servers
they were previously using to run the perl application.

We've had similar experiences in other projects. Every migration
we've done from Perl->Java has resulted in massive savings.

-- 
Gunnar Rønning - gunnar@polygnosis.com
Senior Consultant, Polygnosis AS, http://www.polygnosis.com/



^ permalink  raw  reply  [nested|flat] 69+ messages in thread

* Re: PL/java?
@ 2001-09-01 14:35  Thomas Lockhart <lockhart@fourpalms.org>
  parent: Gunnar Rønning <gunnar@polygnosis.com>
  0 siblings, 1 reply; 69+ messages in thread

From: Thomas Lockhart @ 2001-09-01 14:35 UTC (permalink / raw)
  To: Gunnar Rønning <gunnar@polygnosis.com>; +Cc: Alex Knight <knight@phunc.com>; Marshall Spight <marshall@meetstheeye.com>; pgsql-general

> | The other embedded languages we have start small and can grow
> | dynamically. But I don't know what is possible in this regard for
> | Java...
> The Sun JDK has these argument. I think the IBM JDK got similar
> arguments.
>         -mx <size>              Maximum heap size
>         -ms <size>              Initial heap size

Right. So in an embedded environment, we would need to set these maximum
sizes beforehand, and hitting the upper limit would cause the
application to fail I suppose...

                     - Thomas



^ permalink  raw  reply  [nested|flat] 69+ messages in thread

* Re: PL/java?
@ 2001-09-02 01:37  Gunnar Rønning <gunnar@polygnosis.com>
  parent: Thomas Lockhart <lockhart@fourpalms.org>
  0 siblings, 0 replies; 69+ messages in thread

From: Gunnar Rønning @ 2001-09-02 01:37 UTC (permalink / raw)
  To: lockhart@fourpalms.org; +Cc: Alex Knight <knight@phunc.com>; Marshall Spight <marshall@meetstheeye.com>; pgsql-general

* Thomas Lockhart <lockhart@fourpalms.org> wrote:
|
| Right. So in an embedded environment, we would need to set these maximum
| sizes beforehand, and hitting the upper limit would cause the
| application to fail I suppose...

Yup, or rather run out of memory. You could code your application to free 
more memory when it is running short, e.g. purge caches etc.

-- 
Gunnar Rønning - gunnar@polygnosis.com
Senior Consultant, Polygnosis AS, http://www.polygnosis.com/



^ permalink  raw  reply  [nested|flat] 69+ messages in thread

* Re: [WAY OT] Re: PL/java?
@ 2001-09-02 08:07  Lincoln Yeoh <lyeoh@pop.jaring.my>
  parent: Alex Knight <knight@phunc.com>
  2 siblings, 2 replies; 69+ messages in thread

From: Lincoln Yeoh @ 2001-09-02 08:07 UTC (permalink / raw)
  To: Gunnar Rønning <gunnar@polygnosis.com>; Alex Knight <knight@phunc.com>; +Cc: Alex Pilosov <alex@pilosoft.com>; pgsql-general

Just curious about one thing.

How was the perl app implemented?

It seems Solaris doesn't do/fork processes very well which is why Sun
pushes threads.

Whereas *BSD and Linux do processes about as well as Solaris does threads.

Postgresql doesn't do so well on our Solaris 2GB box as it does on a 128MB
Linux x86 box.

I haven't compared MySQL (threaded) on Solaris vs Linux.

Cheerio,
Link.

At 12:29 PM 9/1/01 +0200, Gunnar Rønning wrote:
>* "Alex Knight" <knight@phunc.com> wrote:
>|
>| IMHO, scalability is incredibly important, and perl leaves that out often.
>| Even with Fast-CGI style servers, perl sucks. Perl is great for admin
>| interfaces, or low to medium traffic sites.
>
>We got a contract last december with a customer that were having some
>performance problems with a perl web application. The customer has
>access to the best perl programmers money can buy, but they could not
>fix the performance problem.
>
>We came in to make version 2.0 of the system. In one month we had an 
>implementation in Java that outperformed the perl application by a factor 
>of 10. The customer could stop the leasing of three of the Sun E450 servers
>they were previously using to run the perl application.
>
>We've had similar experiences in other projects. Every migration
>we've done from Perl->Java has resulted in massive savings.
>
>-- 
>Gunnar Rønning - gunnar@polygnosis.com
>Senior Consultant, Polygnosis AS, http://www.polygnosis.com/
>
>---------------------------(end of broadcast)---------------------------
>TIP 6: Have you searched our list archives?
>
>http://www.postgresql.org/search.mpl
>
>




^ permalink  raw  reply  [nested|flat] 69+ messages in thread

* Re: PL/java?
@ 2001-09-03 13:42  Andrew Snow <andrew@modulus.org>
  parent: Gunnar Rønning <gunnar@polygnosis.com>
  0 siblings, 1 reply; 69+ messages in thread

From: Andrew Snow @ 2001-09-03 13:42 UTC (permalink / raw)
  To: 'Gunnar Rønning' <gunnar@polygnosis.com>; +Cc: pgsql-general



> | Its not a perception. Java is still a dog.
> 
> Back it up or back out please. 
> 
> The most scalable and stable enterprise solutions out there are today 
> running Java. In Java you actually get more time to concentrate on 
> removing the real performance bottlenecks of your application. 

Hehe OK, imagine if the whole of PostgreSQL was written in Java.  Yeah,
we'd be able to really remove its performance bottlenecks then. Really,
I think we're all convinced on that one ;-)

Having said that if people want PL/Java then let them write it.  Its
just another option and that can't hurt...


- Andrew




^ permalink  raw  reply  [nested|flat] 69+ messages in thread

* Re: [WAY OT] Re: PL/java?
@ 2001-09-03 19:37  Alex Knight <knight@phunc.com>
  parent: Daniel Kalchev <daniel@digsys.bg>
  0 siblings, 3 replies; 69+ messages in thread

From: Alex Knight @ 2001-09-03 19:37 UTC (permalink / raw)
  To: Daniel Kalchev <daniel@digsys.bg>; +Cc: Alex Pilosov <alex@pilosoft.com>; pgsql-general

Daniel, thank you kindly for your input.

However, mod_perl is absolutely slower than most any j2ee application.
If all you are doing is keeping a session variable to count number of hits
on a web page, then sure, perl is more than sufficient, possibly faster.
But when you start doing anything of importance, enterprise level stuff,
you need something scalable in ways java can go, but perl just doesn't
seem to have _easy_ or sometimes _existant_ ways to implement.

How would you go about synchronizing session data on 10 application servers
running mod_perl _without_ using the database to "mirror" that data in
memory? It's not very difficult to do it in Java. (Ofcourse, any smart
architect would use content switches generally to keep a remote user
associated with the initial app server to reduce the necessity of such
"replication" technologies).

Not sure how you are associating me with windows, but no, all my server
stuff is always *nix. My answer on awt and swing was in reference to
someone else who was basing their opinion of java on awt/swing's
capabilities. Regardless, "applets" using awt/swing can be easily run
under Linux Mozilla or Netscape, or HotJava, etc. So you can't really
say that's enough to assume we're talking about windows.

-Knight

-----Original Message-----
From: Daniel Kalchev [mailto:daniel@digsys.bg]
Sent: Friday, August 31, 2001 11:25 PM
To: Alex Knight
Cc: Alex Pilosov; pgsql-general@postgresql.org
Subject: Re: [WAY OT] Re: [GENERAL] PL/java?


Well,

mod_perl is not exactly slow... and I believe any JAVA program will be
slower
than the respective PERL program (there are newbie books for both languages
:)

But, perhaps you talk WINDOWS? If so, any software on WINDOWS can be slower
than any other software on WINDOWS... just because they happen to link so
some
weird DLL.

Daniel

>>>"Alex Knight" said:
 > Not really.
 >
 > Yes, AWT sucks. Yes, Swing sucks. Java's gui code can be INCREDIBLY lame.
 > But for server-side situations, Java can be incredibly scalable.
 >
 > I wasn't comparing a perl CGI script and a J2EE server, other than saying
 > perl simply doesn't offer what J2EE does. Furthermore, I've seen more
 > newbies
 > write perl cgi scripts in an enterprise environment and break the site
 > the minute traffic picks up.
 >
 > IMHO, scalability is incredibly important, and perl leaves that out
often.
 > Even with Fast-CGI style servers, perl sucks. Perl is great for admin
 > interfaces, or low to medium traffic sites.
 >
 > -----Original Message-----
 > From: Alex Pilosov [mailto:alex@pilosoft.com]
 > Sent: Friday, August 31, 2001 7:35 PM
 > To: Alex Knight
 > Cc: pgsql-general@postgresql.org
 > Subject: [WAY OT] Re: [GENERAL] PL/java?
 >
 >
 > On Fri, 31 Aug 2001, Alex Knight wrote:
 >
 > > It is generally wiser to split the webservers from the appservers;
 > > that will save on memory footprints from each respectively. That alone
 > > can give each machine a specific task to accomplish... generally more
 > > efficiently. But I would assume you know this.
 >
 > And it is wise to split database from middleware, and not try to saddle
 > PostgreSQL with requirements to support Java in-process. _IF_ java stored
 > procedures are implemented, it should be via something like a) oracle's
 > extproc (start a separate process to load the function) b) some of perl
 > java tools (they start a jdk in a separate process and communicate with
it
 > using RMI).
 >
 >
 > Problem with java-pgsql integration is the threads model: Java really
 > really wants threads. Postgres doesn't do threads. So if most simple way
 > is attempted, you will incur overhead of starting up JVM for each backend
 > (a few seconds as opposed to milliseconds) and non-shared 30M of memory
 > per backend (as opposed to currently <3 megs of non-shared memory per
 > backend).
 >
 > > Using something like WebLogic, WebSphere, or Orion would be a wiser
 > > approach. For the company with the low budget, Orion is only something
 > > like $2000, and it has full J2EE support, including EJBs, etc. Try
 > > finding that kind of richness in Tomcat. Also, Orion takes up only
 > > 40-50mb at start, which is really fairly reasonable; ram is cheap
 > > anyways... a server that has to perform complicated algorithms to a
 > > large audience but has hardly any ram shouldn't be on the internet
 > > anyways; unless it can handle it.
 >
 > _ONLY_ 40-50Mb?! Egads, I'm hard pressed to find any other piece of
 > (non-windows, non-java) software that takes 40-50M just to start up!
 >
 > I worked with both CrapLogic and CrapSphere. Weblogic takes 20-60 seconds
 > to start up on P3-800, that, IMHO, is ridiculous.
 >
 > It is not only issue of memory, its easy to throw memory at the problem,
 > its an issue of _incremental use_ of memory. As you scale
 >
 > > I feel that you don't really have enough experience with _java_ to
 > > judge it accurately. Frankly, the JVM is quite small nowadays,
 > > considering the amount of base classes that sit in memory much of the
 > > time. And the JVMs are really much faster these days. Java is still
 > > slow for 2 reasons: 1) Developers who don't optimize their code as
 > > they write it, 2) Bytecode interpretation is and probably never will
 > > be as fast as something like C/C++. But it certainly isn't the JVM
 > > itself slowing it down because of some "extended memory" that it lives
 > > in. Any reasonable server should have absolutely no problems if the
 > > jvm is implemented _properly_ (which many packages do not do), etc. If
 > > you're comparing Java to perl, yes, certainly it's a bit more of a
 > > beast, but perl quite simply can't keep up in speed and feature
 > > richness (when was the last time you secured your perl code in a
 > > redistributable fashion?)
 > _WHY_ the heck do all base classes need to be in memory all the time? Why
 > are they so huge? Libc is _far far_ smaller, and libstdc++ is tiny
 > compared to all the java standard library.
 >
 > You know what the answer to it is: Because they are ALL written in java,
 > as opposed to more sane languages like perl which handcode their
"standard
 > libraries" or the most important pieces of them in C.
 >
 Perl is far faster than java in about any practical application I did.
 > Again, the issue is not speed of JVM versus PP (perl virtual machine), if
 > you did number crunching in perl and java, they would probably be at par.
 > Its an issue of standard libraries. They are _horribly slow_. Perl's
 > hashtables are a very nice piece of optimized C code. Java's hashtables
 > are written in Java. Need I say more? Java's AWT was a dog. Swing is a
dog
 > and a half, because they reimplemented all the things that are commonly
 > done in C in Java.
 >
 > > The only mistake the developers can make is poorly implementing the
 > > jvm, but most certainly not Java itself. I've been working on
 > > architecting and building enterprise level sites and applications for
 > > nearly 8 years now, and I've seen too many people try to implement
 > > perl cgi websites for enterprise sites and watch them choke and crawl
 > > to their knees because of poor system resource handling, lack of
 > > scalability, etc... I most certainly don't consider a single webserver
 > > with an appserver and tiny database to be enterprise level either (not
 > > that I'm inferring you said it was).
 > You cannot compare a perl CGI script and a J2EE server. Its like
comparing
 > a webserver you wrote yourself vs apache! There are application servers
 > (or more closely, code libraries) for perl that match what J2EE provides.
 >
 > --
 > Alex Pilosov            | http://www.acedsl.com/home.html
 > CTO - Acecape, Inc.     | AceDSL:The best ADSL in the world
 > 325 W 38 St. Suite 1005 | (Stealth Marketing Works! :)
 > New York, NY 10018      |
 >
 >
 >
 > ---------------------------(end of broadcast)---------------------------
 > TIP 3: if posting/reading through Usenet, please send an appropriate
 > subscribe-nomail command to majordomo@postgresql.org so that your
 > message can get through to the mailing list cleanly






^ permalink  raw  reply  [nested|flat] 69+ messages in thread

* Re: PL/java?
@ 2001-09-03 19:54  Alex Knight <knight@phunc.com>
  parent: Andrew Snow <andrew@modulus.org>
  0 siblings, 0 replies; 69+ messages in thread

From: Alex Knight @ 2001-09-03 19:54 UTC (permalink / raw)
  To: Andrew Snow <andrew@modulus.org>; 'Gunnar Rønning' <gunnar@polygnosis.com>; +Cc: pgsql-general

The problem with this discussion on Java versus Pick_Your_Favorite_Skript
ing_Language is that many of the people participating don't have experience
with Java, or even understand Java's place in the programming world. I
don't look at this discussion as a flame war, but as a good thread about
the practicality of adding Java support to PostgreSQL.

Java's strengths have proven to be for server-side J2EE based applications
(not _really_ for pure java server applications like a database server).
Yes, there are java apps/servers that have slipped through and are very
powerful but for the most part, tend to suck(NetBeans for example, is fairly
impressive if you look closely at some of the capabilities is has... like
the speed of the window refresh is NEARLY that of a native app). Something
like PostgreSQL will ALWAYS be faster built under something like C and
platform
specific assembly.

So really, you can't base the entire basis of a programming language based
on
the purpose of an entirely different language. For example, have you ever
developed "cgi" applications using C? A long long time ago, _I_ did. It was
a mess, and it still is a mess. Wouldn't that say something about C's
likeliness to not be meant for cgi? Let's compare apples and apples from now
on...

I would also be very interested to see some "negative" comments from people
who _have_ had enough experience developing j2ee and general java, versus
"negative" comments from people who've heard about java. No offense, let's
just not cloud the discussion with imaginary facts.

-Knight

-----Original Message-----
From: pgsql-general-owner@postgresql.org
[mailto:pgsql-general-owner@postgresql.org]On Behalf Of Andrew Snow
Sent: Monday, September 03, 2001 6:42 AM
To: 'Gunnar Rønning'
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] PL/java?




> | Its not a perception. Java is still a dog.
>
> Back it up or back out please.
>
> The most scalable and stable enterprise solutions out there are today
> running Java. In Java you actually get more time to concentrate on
> removing the real performance bottlenecks of your application.

Hehe OK, imagine if the whole of PostgreSQL was written in Java.  Yeah,
we'd be able to really remove its performance bottlenecks then. Really,
I think we're all convinced on that one ;-)

Having said that if people want PL/Java then let them write it.  Its
just another option and that can't hurt...


- Andrew


---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://www.postgresql.org/search.mpl




^ permalink  raw  reply  [nested|flat] 69+ messages in thread

* Re: [WAY OT] Re: PL/java?
@ 2001-09-03 20:37  Randal L. Schwartz <merlyn@stonehenge.com>
  parent: Alex Knight <knight@phunc.com>
  2 siblings, 1 reply; 69+ messages in thread

From: merlyn@stonehenge.com @ 2001-09-03 20:37 UTC (permalink / raw)
  To: Alex Knight <knight@phunc.com>; +Cc: Daniel Kalchev <daniel@digsys.bg>; Alex Pilosov <alex@pilosoft.com>; pgsql-general

>>>>> "Alex" == Alex Knight <knight@phunc.com> writes:

Alex> However, mod_perl is absolutely slower than most any j2ee application.
Alex> If all you are doing is keeping a session variable to count number of hits
Alex> on a web page, then sure, perl is more than sufficient, possibly faster.
Alex> But when you start doing anything of importance, enterprise level stuff,
Alex> you need something scalable in ways java can go, but perl just doesn't
Alex> seem to have _easy_ or sometimes _existant_ ways to implement.

I can't let this stand.  This is not a universal opinion or
observation.  Obviously, *I* have an agenda to promote as well, but
what I'm quoting here is not the only truth availablel, so test it out
yourself, or get an independant opinion.

Alex> How would you go about synchronizing session data on 10
Alex> application servers running mod_perl _without_ using the
Alex> database to "mirror" that data in memory? It's not very
Alex> difficult to do it in Java.

Whatever you can do in Java here, you can do in mod_perl.  Perl is
close enough to the metal to get at anything Java can reach, and I'd
argue even closer, since it's trivial to link C (or even Java) with
Perl. :)

Can we stop bickering now?

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/;
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!



^ permalink  raw  reply  [nested|flat] 69+ messages in thread

* Re: [WAY OT] Re: PL/java?
@ 2001-09-04 00:21  Alex Knight <knight@phunc.com>
  parent: Randal L. Schwartz <merlyn@stonehenge.com>
  0 siblings, 1 reply; 69+ messages in thread

From: Alex Knight @ 2001-09-04 00:21 UTC (permalink / raw)
  To: Randal L. Schwartz <merlyn@stonehenge.com>; +Cc: Daniel Kalchev <daniel@digsys.bg>; Alex Pilosov <alex@pilosoft.com>; pgsql-general

No offense, but I've been developing under your language since nearly
it's public conception... and perl is _great_.

Frankly, I don't want to argue with you, because you'll simply defend
your own creation without reasonably evaluating the situation.

But I think everyone needs to remember that we shouldn't make a decision
about this because of everyone's political stances behind languages,
especially if they haven't had development experience with it.

-Knight
-----Original Message-----
From: Randal L. Schwartz [mailto:merlyn@stonehenge.com]
Sent: Monday, September 03, 2001 1:37 PM
To: Alex Knight
Cc: Daniel Kalchev; Alex Pilosov; pgsql-general@postgresql.org
Subject: Re: [WAY OT] Re: [GENERAL] PL/java?


>>>>> "Alex" == Alex Knight <knight@phunc.com> writes:

Alex> However, mod_perl is absolutely slower than most any j2ee application.
Alex> If all you are doing is keeping a session variable to count number of
hits
Alex> on a web page, then sure, perl is more than sufficient, possibly
faster.
Alex> But when you start doing anything of importance, enterprise level
stuff,
Alex> you need something scalable in ways java can go, but perl just doesn't
Alex> seem to have _easy_ or sometimes _existant_ ways to implement.

I can't let this stand.  This is not a universal opinion or
observation.  Obviously, *I* have an agenda to promote as well, but
what I'm quoting here is not the only truth availablel, so test it out
yourself, or get an independant opinion.

Alex> How would you go about synchronizing session data on 10
Alex> application servers running mod_perl _without_ using the
Alex> database to "mirror" that data in memory? It's not very
Alex> difficult to do it in Java.

Whatever you can do in Java here, you can do in mod_perl.  Perl is
close enough to the metal to get at anything Java can reach, and I'd
argue even closer, since it's trivial to link C (or even Java) with
Perl. :)

Can we stop bickering now?

--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/;
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl
training!




^ permalink  raw  reply  [nested|flat] 69+ messages in thread

* Re: [WAY OT] Re: PL/java?
@ 2001-09-04 01:01  Robert J. Sanford, Jr. <rsanford@nolimitsystems.com>
  parent: Alex Knight <knight@phunc.com>
  0 siblings, 1 reply; 69+ messages in thread

From: Robert J. Sanford, Jr. @ 2001-09-04 01:01 UTC (permalink / raw)
  To: pgsql-general; +Cc: Randal L. Schwartz <merlyn@stonehenge.com>

> No offense, but I've been developing under your language 
> since nearly it's public conception... and perl is _great_.
> 
> Frankly, I don't want to argue with you, because you'll 
> simply defend your own creation without reasonably
> evaluating the situation.
> 
> But I think everyone needs to remember that we shouldn't 
> make a decision about this because of everyone's political
> stances behind languages, especially if they haven't had
> development experience with it.

i think that you missed the point that mr. schwartz is trying to
make - anything you can do in java, you _can_ do in perl. in my
opinion, he isn't trying to say that you _should_ do it in perl.
he might do it in perl but, after all, there is more than one
way to get things done :)

one of the things that i find refreshing about perl is its lack
of corporate attitude. perl doesn't have any aspirations to be
anything other than what it is. it isn't being driven by 
corporate marketing forcing it to beat someone else. the only
thing that is driving it is the needs and desires of its
developers to evolve it to meet the needs of its users.

and i do almost all of my server-side development in java!

> Alex> How would you go about synchronizing session data on 10
> Alex> application servers running mod_perl _without_ using the
> Alex> database to "mirror" that data in memory? It's not very
> Alex> difficult to do it in Java.

are you saying that it isn't very difficult for you to go out
and write this yourself in java or are you saying that it isn't
difficult for you to use what someone else has already written?

if the former and if you want to do something like this in perl
you can start with reading the section in the camel book on tcp
clients and servers. if you feel that tcp has too high of an
overhead then you can read the section on udp clients and servers.

if the latter, look on cpan and if what you want isn't there then
you can step and contribute.

ohmigod, i'm defending perl and guess what? i _still_ do almost
all of my server-side development in java!

> Alex> However, mod_perl is absolutely slower than most any 
> Alex> > j2ee application. If all you are doing is keeping
> Alex> a session variable to count number of hits on a web
> Alex> page, then sure, perl is more than sufficient,
> Alex> possibly faster. But when you start doing anything
> Alex> of importance, enterprise level stuff, you need
> Alex> something scalable in ways java can go, but perl
> Alex> just doesn't seem to have _easy_ or sometimes
> Alex> _existant_ ways to implement.

i don't like language bigots. i just don't. most languages are
quite capable and anyone that denies the viability of one
language is generally uninformed. just because perl doesn't get
the four-color glossy press that java gets doesn't mean that it
isn't capable it just means it doesn't get the four-color glossy
press. just because you don't see something arrive in your box
every day trumpeting perl doesn't mean it can't do what you want
and do it well. it just means that there isn't anyone out there
blowing the horn in your ear.

we have already seen on this topic someone spouting off that
java was way too slow, that c++ was sooo much better, that
having a jvm included in the distribution would make postgres
hog memory and crash unexpectedly. all of this without any
links to nice evidence. all of this while degrading java based
on the performance of one application (tomcat) that pretty much
everyone agrees is a dog.

personally, i see a _lot_ of similarities between his issues with
java and your issues with perl. 7-11 burritos.

rjsjr




^ permalink  raw  reply  [nested|flat] 69+ messages in thread

* Re: [WAY OT] Re: PL/java?
@ 2001-09-04 01:18  Alex Knight <knight@phunc.com>
  parent: Robert J. Sanford, Jr. <rsanford@nolimitsystems.com>
  0 siblings, 0 replies; 69+ messages in thread

From: Alex Knight @ 2001-09-04 01:18 UTC (permalink / raw)
  To: Robert J. Sanford, Jr. <rsanford@nolimitsystems.com>; pgsql-general; +Cc: Randal L. Schwartz <merlyn@stonehenge.com>

OK. If I find some time, I'm going to attempt to do some things
that java does well, that I think perl can not do easily.

-Knight

-----Original Message-----
From: pgsql-general-owner@postgresql.org
[mailto:pgsql-general-owner@postgresql.org]On Behalf Of Robert J.
Sanford, Jr.
Sent: Monday, September 03, 2001 6:02 PM
To: pgsql-general@postgresql.org
Cc: Randal L. Schwartz
Subject: Re: [WAY OT] Re: [GENERAL] PL/java?


> No offense, but I've been developing under your language 
> since nearly it's public conception... and perl is _great_.
> 
> Frankly, I don't want to argue with you, because you'll 
> simply defend your own creation without reasonably
> evaluating the situation.
> 
> But I think everyone needs to remember that we shouldn't 
> make a decision about this because of everyone's political
> stances behind languages, especially if they haven't had
> development experience with it.

i think that you missed the point that mr. schwartz is trying to
make - anything you can do in java, you _can_ do in perl. in my
opinion, he isn't trying to say that you _should_ do it in perl.
he might do it in perl but, after all, there is more than one
way to get things done :)

one of the things that i find refreshing about perl is its lack
of corporate attitude. perl doesn't have any aspirations to be
anything other than what it is. it isn't being driven by 
corporate marketing forcing it to beat someone else. the only
thing that is driving it is the needs and desires of its
developers to evolve it to meet the needs of its users.

and i do almost all of my server-side development in java!

> Alex> How would you go about synchronizing session data on 10
> Alex> application servers running mod_perl _without_ using the
> Alex> database to "mirror" that data in memory? It's not very
> Alex> difficult to do it in Java.

are you saying that it isn't very difficult for you to go out
and write this yourself in java or are you saying that it isn't
difficult for you to use what someone else has already written?

if the former and if you want to do something like this in perl
you can start with reading the section in the camel book on tcp
clients and servers. if you feel that tcp has too high of an
overhead then you can read the section on udp clients and servers.

if the latter, look on cpan and if what you want isn't there then
you can step and contribute.

ohmigod, i'm defending perl and guess what? i _still_ do almost
all of my server-side development in java!

> Alex> However, mod_perl is absolutely slower than most any 
> Alex> > j2ee application. If all you are doing is keeping
> Alex> a session variable to count number of hits on a web
> Alex> page, then sure, perl is more than sufficient,
> Alex> possibly faster. But when you start doing anything
> Alex> of importance, enterprise level stuff, you need
> Alex> something scalable in ways java can go, but perl
> Alex> just doesn't seem to have _easy_ or sometimes
> Alex> _existant_ ways to implement.

i don't like language bigots. i just don't. most languages are
quite capable and anyone that denies the viability of one
language is generally uninformed. just because perl doesn't get
the four-color glossy press that java gets doesn't mean that it
isn't capable it just means it doesn't get the four-color glossy
press. just because you don't see something arrive in your box
every day trumpeting perl doesn't mean it can't do what you want
and do it well. it just means that there isn't anyone out there
blowing the horn in your ear.

we have already seen on this topic someone spouting off that
java was way too slow, that c++ was sooo much better, that
having a jvm included in the distribution would make postgres
hog memory and crash unexpectedly. all of this without any
links to nice evidence. all of this while degrading java based
on the performance of one application (tomcat) that pretty much
everyone agrees is a dog.

personally, i see a _lot_ of similarities between his issues with
java and your issues with perl. 7-11 burritos.

rjsjr


---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)




^ permalink  raw  reply  [nested|flat] 69+ messages in thread

* Re: PL/java?
@ 2001-09-04 10:21  Gilles DAROLD <gilles@darold.net>
  parent: Alex Knight <knight@phunc.com>
  2 siblings, 1 reply; 69+ messages in thread

From: Gilles DAROLD @ 2001-09-04 10:21 UTC (permalink / raw)
  To: pgsql-general

Hi Alex,

Saying that mod_perl is slower than any java apps is purely marketing
for java. An other guy told me that one day, I just bench it to show him
how java developper just talk marketing. So the result was that with small
users the performance was the same and with many user mod_perl is
really speediest. Secondly mod_perl doesn't crash the system, under Linux
using Java is a waste of time and a leak of memory ! Marketing is probably
why daniel talk about Win$

When first Java was out it was called the "Perl killer", so after many years
Perl is most uses than Java, ask you why ???

For your other words what you do in Java can be done in perl more quickly
more efficiently and with writing many less lines !

An other example is the Oracle XML/SQL Servlet that it was plan to use
in my company. After hearing too many marketing words I write the same
in perl in 3 days and extend the possibility with no limits. Now they're using
Perl, ask you why ? This is use in the entreprise commercial application that
I think you call entreprise level !

At this time Perl is the only really portable language over any OS.

In my opinion PL/Java is purely a waste of time but some have time so why not !

Sorry but I can not let you say words like that, we are not newbe :-(

In your way I can tell you that before using Perl I also preach for Java :-)
But
after rewritten many time the same apps with the differents versions of Java
and the OS where it should work it ended to decide me: no more Java !

Regards

Gilles Darold

Alex Knight wrote:

> Daniel, thank you kindly for your input.
>
> However, mod_perl is absolutely slower than most any j2ee application.
> If all you are doing is keeping a session variable to count number of hits
> on a web page, then sure, perl is more than sufficient, possibly faster.
> But when you start doing anything of importance, enterprise level stuff,
> you need something scalable in ways java can go, but perl just doesn't
> seem to have _easy_ or sometimes _existant_ ways to implement.
>
> How would you go about synchronizing session data on 10 application servers
> running mod_perl _without_ using the database to "mirror" that data in
> memory? It's not very difficult to do it in Java. (Ofcourse, any smart
> architect would use content switches generally to keep a remote user
> associated with the initial app server to reduce the necessity of such
> "replication" technologies).
>
> Not sure how you are associating me with windows, but no, all my server
> stuff is always *nix. My answer on awt and swing was in reference to
> someone else who was basing their opinion of java on awt/swing's
> capabilities. Regardless, "applets" using awt/swing can be easily run
> under Linux Mozilla or Netscape, or HotJava, etc. So you can't really
> say that's enough to assume we're talking about windows.
>
> -Knight




^ permalink  raw  reply  [nested|flat] 69+ messages in thread

* Re: PL/java?
@ 2001-09-04 11:35  Adam Manock <abmanock@planetcable.net>
  parent: Alex Knight <knight@phunc.com>
  2 siblings, 1 reply; 69+ messages in thread

From: Adam Manock @ 2001-09-04 11:35 UTC (permalink / raw)
  To: pgsql-general

After having seen this Perl / Java debate go back and forth...
I can't help myself...

<RANT>
The answer is Python !!!
For the best middleware you're ever likely to integrate with Postgresql :
http://www.zope.org

To see its "enterprise scalability":
http://www.zope.org/About

To see it taking LOTS of hits:
http://ns1.zope.org:82/

To see it NOT using much memory at all:
http://ns1.zope.org:82/cgi-bin/zope-track.pl
(this one loads kinda slow, maybe cause it's done in Perl?)
</RANT>

The real point here is that programmers are religious about their choice of 
language,
and highly resistant to changing, which is why Postgres supports so many 
languages!

I happen to prefer python, but that's just me. http://www.python.org if 
you're curious

Adam


At 06:21 AM 9/4/01, you wrote:
>Hi Alex,
>
>Saying that mod_perl is slower than any java apps is purely marketing
>for java. An other guy told me that one day, I just bench it to show him
>how java developper just talk marketing. So the result was that with small
>users the performance was the same and with many user mod_perl is
>really speediest. Secondly mod_perl doesn't crash the system, under Linux
>using Java is a waste of time and a leak of memory ! Marketing is probably
>why daniel talk about Win$
>
>When first Java was out it was called the "Perl killer", so after many years
>Perl is most uses than Java, ask you why ???
>
>For your other words what you do in Java can be done in perl more quickly
>more efficiently and with writing many less lines !
>
>An other example is the Oracle XML/SQL Servlet that it was plan to use
>in my company. After hearing too many marketing words I write the same
>in perl in 3 days and extend the possibility with no limits. Now they're using
>Perl, ask you why ? This is use in the entreprise commercial application that
>I think you call entreprise level !
>
>At this time Perl is the only really portable language over any OS.
>
>In my opinion PL/Java is purely a waste of time but some have time so why 
>not !
>
>Sorry but I can not let you say words like that, we are not newbe :-(
>
>In your way I can tell you that before using Perl I also preach for Java :-)
>But
>after rewritten many time the same apps with the differents versions of Java
>and the OS where it should work it ended to decide me: no more Java !
>
>Regards
>
>Gilles Darold
>
>Alex Knight wrote:
>
> > Daniel, thank you kindly for your input.
> >
> > However, mod_perl is absolutely slower than most any j2ee application.
> > If all you are doing is keeping a session variable to count number of hits
> > on a web page, then sure, perl is more than sufficient, possibly faster.
> > But when you start doing anything of importance, enterprise level stuff,
> > you need something scalable in ways java can go, but perl just doesn't
> > seem to have _easy_ or sometimes _existant_ ways to implement.
> >
> > How would you go about synchronizing session data on 10 application servers
> > running mod_perl _without_ using the database to "mirror" that data in
> > memory? It's not very difficult to do it in Java. (Ofcourse, any smart
> > architect would use content switches generally to keep a remote user
> > associated with the initial app server to reduce the necessity of such
> > "replication" technologies).
> >
> > Not sure how you are associating me with windows, but no, all my server
> > stuff is always *nix. My answer on awt and swing was in reference to
> > someone else who was basing their opinion of java on awt/swing's
> > capabilities. Regardless, "applets" using awt/swing can be easily run
> > under Linux Mozilla or Netscape, or HotJava, etc. So you can't really
> > say that's enough to assume we're talking about windows.
> >
> > -Knight
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 4: Don't 'kill -9' the postmaster




^ permalink  raw  reply  [nested|flat] 69+ messages in thread

* Re: [WAY OT] Re: PL/java?
@ 2001-09-04 16:15  Bruce Momjian <pgman@candle.pha.pa.us>
  parent: Lincoln Yeoh <lyeoh@pop.jaring.my>
  1 sibling, 2 replies; 69+ messages in thread

From: Bruce Momjian @ 2001-09-04 16:15 UTC (permalink / raw)
  To: Lincoln Yeoh <lyeoh@pop.jaring.my>; +Cc: Gunnar Rønning <gunnar@polygnosis.com>; Alex Knight <knight@phunc.com>; Alex Pilosov <alex@pilosoft.com>; pgsql-general


This is a valid concern for Solaris and I wish we had an answer.  I am
going to contact some Sun people to see if I can figure out a
workaround.


> Just curious about one thing.
> 
> How was the perl app implemented?
> 
> It seems Solaris doesn't do/fork processes very well which is why Sun
> pushes threads.
> 
> Whereas *BSD and Linux do processes about as well as Solaris does threads.
> 
> Postgresql doesn't do so well on our Solaris 2GB box as it does on a 128MB
> Linux x86 box.
> 
> I haven't compared MySQL (threaded) on Solaris vs Linux.
> 
> Cheerio,
> Link.
> 
> At 12:29 PM 9/1/01 +0200, Gunnar R?nning wrote:
> >* "Alex Knight" <knight@phunc.com> wrote:
> >|
> >| IMHO, scalability is incredibly important, and perl leaves that out often.
> >| Even with Fast-CGI style servers, perl sucks. Perl is great for admin
> >| interfaces, or low to medium traffic sites.
> >
> >We got a contract last december with a customer that were having some
> >performance problems with a perl web application. The customer has
> >access to the best perl programmers money can buy, but they could not
> >fix the performance problem.
> >
> >We came in to make version 2.0 of the system. In one month we had an 
> >implementation in Java that outperformed the perl application by a factor 
> >of 10. The customer could stop the leasing of three of the Sun E450 servers
> >they were previously using to run the perl application.
> >
> >We've had similar experiences in other projects. Every migration
> >we've done from Perl->Java has resulted in massive savings.
> >
> >-- 
> >Gunnar R?nning - gunnar@polygnosis.com
> >Senior Consultant, Polygnosis AS, http://www.polygnosis.com/
> >
> >---------------------------(end of broadcast)---------------------------
> >TIP 6: Have you searched our list archives?
> >
> >http://www.postgresql.org/search.mpl
> >
> >
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
> 

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026



^ permalink  raw  reply  [nested|flat] 69+ messages in thread

* Re: PL/java?
@ 2001-09-04 16:35  Robert J. Sanford, Jr. <rsanford@nolimitsystems.com>
  parent: Robert J. Sanford, Jr. <rsanford@nolimitsystems.com>
  0 siblings, 0 replies; 69+ messages in thread

From: Robert J. Sanford, Jr. @ 2001-09-04 16:35 UTC (permalink / raw)
  To: pgsql-general

fellow list members:

please accept my apologies for the following post that i
am responsible for. the post below ended with a personal
attack towards the person i was responding to rather than
keeping with what i felt were the well-reasoned arguments
that i started with.

such attacks have no place on this list and i apologize
for my behaviour to both the original author and to the
other members of the community.

sincerely,

rjsjr

> -----Original Message-----
> From: pgsql-general-owner@postgresql.org
> [mailto:pgsql-general-owner@postgresql.org]On Behalf Of Robert J.
> Sanford, Jr.
> Sent: Friday, August 31, 2001 11:02 PM
> To: pgsql-general@postgresql.org
> Subject: Re: [GENERAL] PL/java?
> 
> 
> note - i don't work for any of the companies whose products
> are mentioned below. i have performed evaluations of these
> products and the support provided when attempting to determine
> what platform my company's systems should run on. unfortunately,
> i did not choose orion and i am suffering for it now...
> 
> some goober blathered thusly:
> > Have you ever actually used Java on an enterprise-level 
> > application?  Ever see the Tomcat webserver?  It uses
> > 100MB of memory, drives the load on our server up to 8,
> > and doesn't serve nearly as fast apache. Do you really
> > want that in your database?
> 
> first - don't complain about java because you or someone
> in your group/department/company made a poor decision on
> what tools to use. that's like complaining about mexican
> food when the only experience you have is eating an out-
> dated frozen burrito from the 7-11 freezer.
> 
> when looking at the performance of java you have to take
> a look at two things - first you have to compare various
> java implementations against each other and then you have
> to compare the best java implementations against native
> c/c++ code. the following link does that. the java tests
> include tomcat, orion, websphere, and resin. jrun and
> weblogic were originally included in the testing but
> were both removed at their companies' request.
> 
> the tests also compare orion vs microsoft asp running on
> win2k and iis5. all tests run on the same hardware.
> 
> what i believe these tests clearly demonstrate is that
> java is not the problem, the implementation applications
> based on java is. i also do not believe that tomcat is
> a fair representation of java performance in that it is
> intended to be a reference implementation. as such, the
> code base should sacrifice performance for clarity.
> 
> http://www.orionserver.com/benchmarks/benchmark.html
> 
> 
> while not in the benchmark i would also like to
> recommend jetty as an app server. it is an opensource,
> 100% java web and application server. in its base form
> it is "just" a web, servlet, and jsp engine. it does,
> however, have contributed code providing integration
> with other j2ee opensource projects such as the JBoss
> EJB engine.
> 
> you can find the jetty home page at:
>    http://jetty.mortbay.com/
> 
> and then they blathered some more:
> > Compare the speed of Oracle 8 with 8i if you don't
> > believe me.  The stability is also much worse.  Ever
> > see a JVM on any platform that didn't crash if you
> > looked at it cockeyed?  Ever really trust the garbage
> > collection?  I don't.  I've found a memory leak in IBM 
> > developed java libraries.  Gotta restart that app
> > every once in a while to reclaim system resources it
> > gobbled up and never gave back.
> 
> some mention was made regarding the performance of
> the oracle8i application server. well, oracle has
> realized that their performance was sub-optimal and
> rectified the situation by licensing the orion server
> for oracle9i. while money and politics most certainly
> play a part in any licensing arrangement they must
> also realize that making customers happy through the
> performance of their applications will lead to more
> money. the link to the press release is below.
> 
> http://www.oracle.com/corporate/press/index.html?759347.html
> 
> all of that being said...
> 
> i don't think that the person that started this thread
> did anything wrong by making the request they did. that
> is what opensource is all about - contributions, even
> just contributions of ideas, are welcomed. even so, there
> are several options that i see for getting it implemented:
> 1) its an open source project so implement it yourself.
>    while i have never worked on modifying the code base
>    i am extremely confident that the current developers
>    will be more than willing to give you advice and
>    pointers.
> 2) if #1 is not feasible either because you don't have
>    the time, the inclination, or the experience then
>    you can write a contract that will pay one of the
>    postgres developers to implement it for you.
> 3) if that isn't feasible you can try to get a volunteer
>    to do so.
> 4) if that isn't feasible then you either have to live
>    with what you have, go elsewhere, or be quiet.
> 
> to the person that blathered thusly in response to the
> request for java:
> > Merits of the language notwithstanding, I'd rather
> > not have a buggy, still under development
> > (depreciating everything under the sun with every
> > new iteration) JVM parasite in my DB.
> 
> informed and intelligent debate is good. given that i
> believe such to be true, i would request that you
> refrain from blathering such vitriol and uninformed
> nonsense. not only is it for the good of the people
> on the list who don't want to hear it but it will
> also do you good by not telling everyone out there
> that you are a very silly person that doesn't deal
> with logic and/or facts.
> 
> to everyone else on the list - if we all contribute
> a penny we could probably buy enough burritos from
> 7-11 to make sure that his hands and mouth are busy
> for a good long while.
> 
> rjsjr
> 
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
> 



^ permalink  raw  reply  [nested|flat] 69+ messages in thread

* Re: [WAY OT] Re: PL/java?
@ 2001-09-04 17:05  Tony Grant <tony@animaproductions.com>
  parent: Bruce Momjian <pgman@candle.pha.pa.us>
  1 sibling, 0 replies; 69+ messages in thread

From: Tony Grant @ 2001-09-04 17:05 UTC (permalink / raw)
  To: pgsql-general

Hi,

I have been following this noisy thread from a distance. I have had
mixed experiences with perl and databases. Most have been bad. A few
have been good. I have seen perl choke an NT server to death with very
few requests for example (the database was SQL server). I also run a
perl database for one of my clients using dbman. It works very well for
their needs.

I would not say either way that perl or Java are bad news. But I will
say that discovering JSP has turned me away from perl because I can make
them work without handcoding.

I am now putting a lot of my logic in SQL code stored in Postgresql and
calling the functions from JSP. If I really need some heavy duty stuff I
would probably put it in beans that i would have programmed by an
expert.

We have the chance to have many languages to choose from. Use the one
that works best (or works best for you). Share the tips and techniques.
And please stop shouting at each other, the real enemy is not within the
Postgresql camp...

<end of calming down rant>

Cheers

Tony Grant


-- 
RedHat Linux on Sony Vaio C1XD/S
http://www.animaproductions.com/linux2.html
Macromedia UltraDev with PostgreSQL
http://www.animaproductions.com/ultra.html




^ permalink  raw  reply  [nested|flat] 69+ messages in thread

* Re: PL/java?
@ 2001-09-04 21:01  Alex Knight <knight@phunc.com>
  parent: Gilles DAROLD <gilles@darold.net>
  0 siblings, 1 reply; 69+ messages in thread

From: Alex Knight @ 2001-09-04 21:01 UTC (permalink / raw)
  To: gilles@darold.net; pgsql-general

Hi Gilles,

You did not read what I wrote very well. First, I said that mod_perl was
slower than "most any j2ee application". If you knew what j2ee was,
you'd know that it's generally limited to server-side internet apps
like servlets, jsps, etc... Not to mention, I do try to give perl credit
where due. If java crashes your server, that's because either the vendor
that has the jvm incorporated sucks, or your program was written poorly.
I have _never_ crashed a system or eaten up memory when everything is
properly installed. Java is NOT a cure all language. I honestly feel
that because of the way the interpreter is packaged, it can not be used
for every single situation, like C could for example. But I feel java
would be incredibly appropriate in postgresql.

I see it this way. All the people who really know Java's capabilities,
and know that it can be used without problem, will want Java in the db.
All the others who think "java is _always_ slow" or "java leaks memory"
or "java is a waste of time" won't be using the java extensions ANYWAYS.

As for perl, I probably came off a little wrong. In a reply to Randal,
I did state that I liked perl very much, and I've been developing with
it forever. Perl _is_ amazing, and there is no limit to what you can do
with it. However, in some cases, Java does things better (just like
perl does things faster than Java in certain situations). But perl has
had the "most uses" for so many years because it is easy to learn,
not truely object oriented (atleast the past few years have been that
way), does not require compiling to simplify the execution process
(i.e. fully interpreted), etc.

Expand on your "enterprise application". A true enterprise application
takes more than 3 days time to design and implement. Most "real"
enterprise applications have multiple layers of logic, etc. I don't
consider a script that queries a database for a password by 100,000
people a day to really be considered as Enterprise either.

If I was new to programming, and I started "preaching Java" right off
the bat, this conversation wouldn't be warranted. In fact, I run into
these types of Java developers who go around saying they think Java
is the best language ever, etc etc but don't really have the experience
to make that claim.

Anyways, I really didn't want this to get into "my language is better
than yours", and let's drop that immediately. My entire purpose here
was to help defend the idea of implementing Java as a PL in PGSQL.

Anyone else have any comments about the java implementation?

-Knight

-----Original Message-----
From: pgsql-general-owner@postgresql.org
[mailto:pgsql-general-owner@postgresql.org]On Behalf Of Gilles DAROLD
Sent: Tuesday, September 04, 2001 3:22 AM
To: pgsql-general@postgresql.org
Subject: Re: [GENERAL] PL/java?


Hi Alex,

Saying that mod_perl is slower than any java apps is purely marketing
for java. An other guy told me that one day, I just bench it to show him
how java developper just talk marketing. So the result was that with small
users the performance was the same and with many user mod_perl is
really speediest. Secondly mod_perl doesn't crash the system, under Linux
using Java is a waste of time and a leak of memory ! Marketing is probably
why daniel talk about Win$

When first Java was out it was called the "Perl killer", so after many years
Perl is most uses than Java, ask you why ???

For your other words what you do in Java can be done in perl more quickly
more efficiently and with writing many less lines !

An other example is the Oracle XML/SQL Servlet that it was plan to use
in my company. After hearing too many marketing words I write the same
in perl in 3 days and extend the possibility with no limits. Now they're
using
Perl, ask you why ? This is use in the entreprise commercial application
that
I think you call entreprise level !

At this time Perl is the only really portable language over any OS.

In my opinion PL/Java is purely a waste of time but some have time so why
not !

Sorry but I can not let you say words like that, we are not newbe :-(

In your way I can tell you that before using Perl I also preach for Java :-)
But
after rewritten many time the same apps with the differents versions of Java
and the OS where it should work it ended to decide me: no more Java !

Regards

Gilles Darold

Alex Knight wrote:

> Daniel, thank you kindly for your input.
>
> However, mod_perl is absolutely slower than most any j2ee application.
> If all you are doing is keeping a session variable to count number of hits
> on a web page, then sure, perl is more than sufficient, possibly faster.
> But when you start doing anything of importance, enterprise level stuff,
> you need something scalable in ways java can go, but perl just doesn't
> seem to have _easy_ or sometimes _existant_ ways to implement.
>
> How would you go about synchronizing session data on 10 application
servers
> running mod_perl _without_ using the database to "mirror" that data in
> memory? It's not very difficult to do it in Java. (Ofcourse, any smart
> architect would use content switches generally to keep a remote user
> associated with the initial app server to reduce the necessity of such
> "replication" technologies).
>
> Not sure how you are associating me with windows, but no, all my server
> stuff is always *nix. My answer on awt and swing was in reference to
> someone else who was basing their opinion of java on awt/swing's
> capabilities. Regardless, "applets" using awt/swing can be easily run
> under Linux Mozilla or Netscape, or HotJava, etc. So you can't really
> say that's enough to assume we're talking about windows.
>
> -Knight


---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster




^ permalink  raw  reply  [nested|flat] 69+ messages in thread

* Re: PL/java?
@ 2001-09-04 21:05  Alex Knight <knight@phunc.com>
  parent: Adam Manock <abmanock@planetcable.net>
  0 siblings, 0 replies; 69+ messages in thread

From: Alex Knight @ 2001-09-04 21:05 UTC (permalink / raw)
  To: Adam Manock <abmanock@planetcable.net>; pgsql-general

Python is a great language too. For scripts, I tend to write more python
scripts than perl these days, simply because python better suits my needs
and the base class library seems larger than perl's after install,
not that adding libs aren't easy. But I can write compact scripts without
cryptoblinding the user reading the script...

Zope is quite powerful too. But Zope still has a long way to travel until
it can make it to the Enterprise arena. I know a lot of the Zope developers,
and zope.org specifically gets lots of hits, but it's not getting nearly
as many as a Bankofamerica.com would get.

-Knight

-----Original Message-----
From: pgsql-general-owner@postgresql.org
[mailto:pgsql-general-owner@postgresql.org]On Behalf Of Adam Manock
Sent: Tuesday, September 04, 2001 4:35 AM
To: pgsql-general@postgresql.org
Subject: Re: [GENERAL] PL/java?


After having seen this Perl / Java debate go back and forth...
I can't help myself...

<RANT>
The answer is Python !!!
For the best middleware you're ever likely to integrate with Postgresql :
http://www.zope.org

To see its "enterprise scalability":
http://www.zope.org/About

To see it taking LOTS of hits:
http://ns1.zope.org:82/

To see it NOT using much memory at all:
http://ns1.zope.org:82/cgi-bin/zope-track.pl
(this one loads kinda slow, maybe cause it's done in Perl?)
</RANT>

The real point here is that programmers are religious about their choice of
language,
and highly resistant to changing, which is why Postgres supports so many
languages!

I happen to prefer python, but that's just me. http://www.python.org if
you're curious

Adam


At 06:21 AM 9/4/01, you wrote:
>Hi Alex,
>
>Saying that mod_perl is slower than any java apps is purely marketing
>for java. An other guy told me that one day, I just bench it to show him
>how java developper just talk marketing. So the result was that with small
>users the performance was the same and with many user mod_perl is
>really speediest. Secondly mod_perl doesn't crash the system, under Linux
>using Java is a waste of time and a leak of memory ! Marketing is probably
>why daniel talk about Win$
>
>When first Java was out it was called the "Perl killer", so after many
years
>Perl is most uses than Java, ask you why ???
>
>For your other words what you do in Java can be done in perl more quickly
>more efficiently and with writing many less lines !
>
>An other example is the Oracle XML/SQL Servlet that it was plan to use
>in my company. After hearing too many marketing words I write the same
>in perl in 3 days and extend the possibility with no limits. Now they're
using
>Perl, ask you why ? This is use in the entreprise commercial application
that
>I think you call entreprise level !
>
>At this time Perl is the only really portable language over any OS.
>
>In my opinion PL/Java is purely a waste of time but some have time so why
>not !
>
>Sorry but I can not let you say words like that, we are not newbe :-(
>
>In your way I can tell you that before using Perl I also preach for Java
:-)
>But
>after rewritten many time the same apps with the differents versions of
Java
>and the OS where it should work it ended to decide me: no more Java !
>
>Regards
>
>Gilles Darold
>
>Alex Knight wrote:
>
> > Daniel, thank you kindly for your input.
> >
> > However, mod_perl is absolutely slower than most any j2ee application.
> > If all you are doing is keeping a session variable to count number of
hits
> > on a web page, then sure, perl is more than sufficient, possibly faster.
> > But when you start doing anything of importance, enterprise level stuff,
> > you need something scalable in ways java can go, but perl just doesn't
> > seem to have _easy_ or sometimes _existant_ ways to implement.
> >
> > How would you go about synchronizing session data on 10 application
servers
> > running mod_perl _without_ using the database to "mirror" that data in
> > memory? It's not very difficult to do it in Java. (Ofcourse, any smart
> > architect would use content switches generally to keep a remote user
> > associated with the initial app server to reduce the necessity of such
> > "replication" technologies).
> >
> > Not sure how you are associating me with windows, but no, all my server
> > stuff is always *nix. My answer on awt and swing was in reference to
> > someone else who was basing their opinion of java on awt/swing's
> > capabilities. Regardless, "applets" using awt/swing can be easily run
> > under Linux Mozilla or Netscape, or HotJava, etc. So you can't really
> > say that's enough to assume we're talking about windows.
> >
> > -Knight
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 4: Don't 'kill -9' the postmaster


---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org




^ permalink  raw  reply  [nested|flat] 69+ messages in thread

* Re: [WAY OT] Re: PL/java?
@ 2001-09-04 21:24  Alex Knight <knight@phunc.com>
  parent: Bruce Momjian <pgman@candle.pha.pa.us>
  1 sibling, 0 replies; 69+ messages in thread

From: Alex Knight @ 2001-09-04 21:24 UTC (permalink / raw)
  To: Bruce Momjian <pgman@candle.pha.pa.us>; Lincoln Yeoh <lyeoh@pop.jaring.my>; +Cc: Gunnar Ronning <gunnar@polygnosis.com>; Alex Pilosov <alex@pilosoft.com>; pgsql-general

I'm interested to see the results,

Cheers.

-----Original Message-----
From: Bruce Momjian [mailto:pgman@candle.pha.pa.us]
Sent: Tuesday, September 04, 2001 9:16 AM
To: Lincoln Yeoh
Cc: Gunnar Ronning; Alex Knight; Alex Pilosov;
pgsql-general@postgresql.org
Subject: Re: [GENERAL] [WAY OT] Re: PL/java?



This is a valid concern for Solaris and I wish we had an answer.  I am
going to contact some Sun people to see if I can figure out a
workaround.


> Just curious about one thing.
>
> How was the perl app implemented?
>
> It seems Solaris doesn't do/fork processes very well which is why Sun
> pushes threads.
>
> Whereas *BSD and Linux do processes about as well as Solaris does threads.
>
> Postgresql doesn't do so well on our Solaris 2GB box as it does on a 128MB
> Linux x86 box.
>
> I haven't compared MySQL (threaded) on Solaris vs Linux.
>
> Cheerio,
> Link.
>
> At 12:29 PM 9/1/01 +0200, Gunnar R?nning wrote:
> >* "Alex Knight" <knight@phunc.com> wrote:
> >|
> >| IMHO, scalability is incredibly important, and perl leaves that out
often.
> >| Even with Fast-CGI style servers, perl sucks. Perl is great for admin
> >| interfaces, or low to medium traffic sites.
> >
> >We got a contract last december with a customer that were having some
> >performance problems with a perl web application. The customer has
> >access to the best perl programmers money can buy, but they could not
> >fix the performance problem.
> >
> >We came in to make version 2.0 of the system. In one month we had an
> >implementation in Java that outperformed the perl application by a factor
> >of 10. The customer could stop the leasing of three of the Sun E450
servers
> >they were previously using to run the perl application.
> >
> >We've had similar experiences in other projects. Every migration
> >we've done from Perl->Java has resulted in massive savings.
> >
> >--
> >Gunnar R?nning - gunnar@polygnosis.com
> >Senior Consultant, Polygnosis AS, http://www.polygnosis.com/
> >
> >---------------------------(end of broadcast)---------------------------
> >TIP 6: Have you searched our list archives?
> >
> >http://www.postgresql.org/search.mpl
> >
> >
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
>

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026




^ permalink  raw  reply  [nested|flat] 69+ messages in thread

* Re: PL/java?
@ 2001-09-04 21:28  Randal L. Schwartz <merlyn@stonehenge.com>
  parent: Alex Knight <knight@phunc.com>
  0 siblings, 2 replies; 69+ messages in thread

From: merlyn@stonehenge.com @ 2001-09-04 21:28 UTC (permalink / raw)
  To: Alex Knight <knight@phunc.com>; +Cc: pgsql-general

>>>>> "Alex" == Alex Knight <knight@phunc.com> writes:

Alex> You did not read what I wrote very well. First, I said that mod_perl was
Alex> slower than "most any j2ee application". If you knew what j2ee was,
Alex> you'd know that it's generally limited to server-side internet apps
Alex> like servlets, jsps, etc... 

If you'd just stop saying things that can't be backed up, I wouldn't
have to keep responding.

Where is your proof that mod_perl is "slower than most any j2ee
application"?

Alex> However, in some cases, Java does things better (just like
Alex> perl does things faster than Java in certain situations).

I'm still waiting for "Java does things better" to be demonstrated.

Alex> But perl has had the "most uses" for so many years because it is
Alex> easy to learn, not truely object oriented

Perl is a hybrid OO language, just like Java.  Now if you compare both
of them to Smalltalk, I see your point.  But Java has primitive types
that cannot be subclassed or extended, just like Perl.  There's really
no difference.  Perhaps you've not read "Object Oriented Perl" by
Damian Conway, to see just how rich Perl's object model is, even
compared to Java and others.

Alex>  (atleast the past few
Alex> years have been that way), does not require compiling to
Alex> simplify the execution process (i.e. fully interpreted), etc.

Perl is no more interpreted than Java.  Perl's compiler translates the
entire program down to bytecodes, and the bytecodes are then executed
by the Perl Virtual Machine, just like Java.  (I won't bring up any
benchmarks here... it's unfair to Java. :)

See... it's the nonsense you keep spouting that makes me want to slap
you silly.  Get a clue.  Perl is a serious, mission-critical language,
being actively developed by hundreds of people who depend on it to
remain stable, fast, and useful.

I've seen both.  Java has its place.  Perl has its place.  Stop
dissing Perl, because you are apparently unaware of what is actually
going on.  I guess that would make you a language bigot.

Alex> Expand on your "enterprise application". A true enterprise application
Alex> takes more than 3 days time to design and implement. Most "real"
Alex> enterprise applications have multiple layers of logic, etc. I don't
Alex> consider a script that queries a database for a password by 100,000
Alex> people a day to really be considered as Enterprise either.

And many "enterprise applications" are completely in Perl.
cbs.sportsline.com is 90% Perl.  Etoys.com was 100% Perl.  imdb.com is
100% perl.  valueclick.com is 100% Perl.  Amazon.com does all their
backend processing in Perl.  Boeing uses Perl in every step of their
cad/cam process... every number defining the 777 airplane was passed
through Perl.

Alex> If I was new to programming, and I started "preaching Java"
Alex> right off the bat, this conversation wouldn't be warranted. In
Alex> fact, I run into these types of Java developers who go around
Alex> saying they think Java is the best language ever, etc etc but
Alex> don't really have the experience to make that claim.

You smell a bit like that now though, mostly through your ignorance of
Perl.  Maybe you're not "unfounded pro Java", but you are "unfounded
anti Perl".  And I won't allow that here.  I'll certainly permit Perl
to lose on its technical merits, but I won't let Perl lose through
your ignorance of what it actually can be or do.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/;
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!



^ permalink  raw  reply  [nested|flat] 69+ messages in thread

* Re: PL/java?
@ 2001-09-04 21:45  Alex Knight <knight@phunc.com>
  parent: Randal L. Schwartz <merlyn@stonehenge.com>
  1 sibling, 0 replies; 69+ messages in thread

From: Alex Knight @ 2001-09-04 21:45 UTC (permalink / raw)
  To: Randal L. Schwartz <merlyn@stonehenge.com>; +Cc: pgsql-general

I hate arguing with you. And like I stated in previous posts, I'm
not trying to be entirely slanderous to perl... I'm absolutely not
anti-perl, so I will apologize for that now. I still use perl on
a daily basis. The only reason I stated that Java can be "better"
than perl in some areas is because of experiences in general, and
because some guy was gungho about perl being the savior's choice
of languages for Enterprise applications *cough*. Just as you do
not like to see perl discredited without substantial facts, I dislike
seeing Java being discredited because people think it is a pure
"marketing hype" or because it's JVM on their Windows 98 machine
running a swing app crashed their system.

I actually am interested in some benchmarks of perl versus java
if you have some.

This "argument" needs to _end_. Is there anyone else who sees adding
java as an advantage? If not, this is pointless.

All due respect,

Knight

-----Original Message-----
From: Randal L. Schwartz [mailto:merlyn@stonehenge.com]
Sent: Tuesday, September 04, 2001 2:28 PM
To: Alex Knight
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] PL/java?


>>>>> "Alex" == Alex Knight <knight@phunc.com> writes:

Alex> You did not read what I wrote very well. First, I said that mod_perl
was
Alex> slower than "most any j2ee application". If you knew what j2ee was,
Alex> you'd know that it's generally limited to server-side internet apps
Alex> like servlets, jsps, etc...

If you'd just stop saying things that can't be backed up, I wouldn't
have to keep responding.

Where is your proof that mod_perl is "slower than most any j2ee
application"?

Alex> However, in some cases, Java does things better (just like
Alex> perl does things faster than Java in certain situations).

I'm still waiting for "Java does things better" to be demonstrated.

Alex> But perl has had the "most uses" for so many years because it is
Alex> easy to learn, not truely object oriented

Perl is a hybrid OO language, just like Java.  Now if you compare both
of them to Smalltalk, I see your point.  But Java has primitive types
that cannot be subclassed or extended, just like Perl.  There's really
no difference.  Perhaps you've not read "Object Oriented Perl" by
Damian Conway, to see just how rich Perl's object model is, even
compared to Java and others.

Alex>  (atleast the past few
Alex> years have been that way), does not require compiling to
Alex> simplify the execution process (i.e. fully interpreted), etc.

Perl is no more interpreted than Java.  Perl's compiler translates the
entire program down to bytecodes, and the bytecodes are then executed
by the Perl Virtual Machine, just like Java.  (I won't bring up any
benchmarks here... it's unfair to Java. :)

See... it's the nonsense you keep spouting that makes me want to slap
you silly.  Get a clue.  Perl is a serious, mission-critical language,
being actively developed by hundreds of people who depend on it to
remain stable, fast, and useful.

I've seen both.  Java has its place.  Perl has its place.  Stop
dissing Perl, because you are apparently unaware of what is actually
going on.  I guess that would make you a language bigot.

Alex> Expand on your "enterprise application". A true enterprise application
Alex> takes more than 3 days time to design and implement. Most "real"
Alex> enterprise applications have multiple layers of logic, etc. I don't
Alex> consider a script that queries a database for a password by 100,000
Alex> people a day to really be considered as Enterprise either.

And many "enterprise applications" are completely in Perl.
cbs.sportsline.com is 90% Perl.  Etoys.com was 100% Perl.  imdb.com is
100% perl.  valueclick.com is 100% Perl.  Amazon.com does all their
backend processing in Perl.  Boeing uses Perl in every step of their
cad/cam process... every number defining the 777 airplane was passed
through Perl.

Alex> If I was new to programming, and I started "preaching Java"
Alex> right off the bat, this conversation wouldn't be warranted. In
Alex> fact, I run into these types of Java developers who go around
Alex> saying they think Java is the best language ever, etc etc but
Alex> don't really have the experience to make that claim.

You smell a bit like that now though, mostly through your ignorance of
Perl.  Maybe you're not "unfounded pro Java", but you are "unfounded
anti Perl".  And I won't allow that here.  I'll certainly permit Perl
to lose on its technical merits, but I won't let Perl lose through
your ignorance of what it actually can be or do.

--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/;
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl
training!




^ permalink  raw  reply  [nested|flat] 69+ messages in thread

* Re: PL/java?
@ 2001-09-05 12:42  Gunnar Rønning <gunnar@polygnosis.com>
  parent: Randal L. Schwartz <merlyn@stonehenge.com>
  1 sibling, 1 reply; 69+ messages in thread

From: Gunnar Rønning @ 2001-09-05 12:42 UTC (permalink / raw)
  To: merlyn@stonehenge.com; +Cc: Alex Knight <knight@phunc.com>; pgsql-general

* merlyn@stonehenge.com (Randal L. Schwartz) wrote:
|
| If you'd just stop saying things that can't be backed up, I wouldn't
| have to keep responding.

;-)

| Where is your proof that mod_perl is "slower than most any j2ee
| application"?

I don't like to generalize either. I've been on two projects where we
have replaced Perl applications with Java applications. The first one
was a content management system and the second was an online dating
application(like match.com). 

In both cases we ended up with Java applications that performed 
better than the Perl applications. 

The reasons ?  

- Maybe it was because our Java developers were
  better than our Perl developers.

- Maybe we had learned something the second time implementing the 
  application. Better architecture, system design, etc.

- Maybe Java was better suited for the actual applications.

In the end there is however no proof to claim that Java applications
are faster than mod_perl applications.

But having Java in the PgSQL backend would be nice for some, regardless 
of how well Java compares to Perl. 

-- 
Gunnar Rønning - gunnar@polygnosis.com
Senior Consultant, Polygnosis AS, http://www.polygnosis.com/



^ permalink  raw  reply  [nested|flat] 69+ messages in thread

* Re: [WAY OT] Re: PL/java?
@ 2001-09-05 12:50  Gunnar Rønning <gunnar@polygnosis.com>
  parent: Lincoln Yeoh <lyeoh@pop.jaring.my>
  1 sibling, 0 replies; 69+ messages in thread

From: Gunnar Rønning @ 2001-09-05 12:50 UTC (permalink / raw)
  To: Lincoln Yeoh <lyeoh@pop.jaring.my>; +Cc: Alex Knight <knight@phunc.com>; Alex Pilosov <alex@pilosoft.com>; pgsql-general

* Lincoln Yeoh <lyeoh@pop.jaring.my> wrote:
|
| Just curious about one thing.
| 
| How was the perl app implemented?
| 
| It seems Solaris doesn't do/fork processes very well which is why Sun
| pushes threads.
| 

I never saw the code of the perl application myself. All I know
is that it was running on Solaris with mod_perl and a Sybase database.
I think the main reasons for improved performance was related to 
application design, as we took care to cache a lot of common queries
with the new design; I don't think the Perl application went out its 
way to cache things, in Java we got the caching for free as we used
a third party object relational tool to talk with the database.

-- 
Gunnar Rønning - gunnar@polygnosis.com
Senior Consultant, Polygnosis AS, http://www.polygnosis.com/



^ permalink  raw  reply  [nested|flat] 69+ messages in thread

* Re: PL/java?
@ 2001-09-05 18:26  Randal L. Schwartz <merlyn@stonehenge.com>
  parent: Gunnar Rønning <gunnar@polygnosis.com>
  0 siblings, 0 replies; 69+ messages in thread

From: merlyn@stonehenge.com @ 2001-09-05 18:26 UTC (permalink / raw)
  To: Gunnar Rønning <gunnar@polygnosis.com>; +Cc: Alex Knight <knight@phunc.com>; pgsql-general

>>>>> "Gunnar" == Gunnar Rønning <gunnar@polygnosis.com> writes:

Gunnar> In the end there is however no proof to claim that Java applications
Gunnar> are faster than mod_perl applications.

I'll settle for that.  Most of the time I've seen benchmarks, it's
been more the skillset of the programmers at stake rather than the
languages.

Gunnar> But having Java in the PgSQL backend would be nice for some,
Gunnar> regardless of how well Java compares to Perl.

Yes, I can support that.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/;
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!



^ permalink  raw  reply  [nested|flat] 69+ messages in thread

* Re: PL/Java
@ 2003-03-25 16:17  Laszlo Hornyak <lhornyakNOSPAM@ish.hu>
  0 siblings, 0 replies; 69+ messages in thread

From: Laszlo Hornyak @ 2003-03-25 16:17 UTC (permalink / raw)
  To: Joe Conway <mail@joeconway.com>; +Cc: pgsql-general

Hi!

I think we should not use the word "pl/java" since java is a trademark 
of sun.
PL/pgJ is going to be distributed under Apache license. It is compatible 
with 7.2+

Thanks,
Laszlo Hornyak

Joe Conway wrote:

> Robert Treat wrote:
>
>> http://techdocs.postgresql.org/guides/Pgplmeta
>>
>> If the language maintainers would be willing to look over the
>> information and make any corrections that would be great.
>
>
> Looks good to me. One minor note -- the URLs that I gave in the 
> original email (and replicated on the above page) are to one specific 
> mirror site:
>
>   http://www.us.postgresql.org/users-lounge/docs/7.3/postgres/<whatever;
>
> It would probably be better to have them point to the corresponding 
> idocs pages.
>
> Joe
>
>
>
>
> .
>




^ permalink  raw  reply  [nested|flat] 69+ messages in thread

* PL/java
@ 2020-12-07 11:25  Zé Rui Marques <ze.rui.marques@carrotincentives.com>
  0 siblings, 2 replies; 69+ messages in thread

From: Zé Rui Marques @ 2020-12-07 11:25 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>

Hi,

I am the lead architect in a small firm that develops a very specialised ETL platform.

Traditionally, we have used Oracle and PL-SQL, and we are now porting everything to Postgres.

All of our code outside of the database is java and I wiash that all of our code within the database to be also in java.

The PL/java “add-on” is not supported directly by Postgres.

I would like to ask if there is a plan to include it as an official procedural language. If so, when?

Thanks,
—
Zé Rui Marques




^ permalink  raw  reply  [nested|flat] 69+ messages in thread

* Re: PL/java
@ 2020-12-07 14:45  Adrian Klaver <adrian.klaver@aklaver.com>
  parent: Zé Rui Marques <ze.rui.marques@carrotincentives.com>
  1 sibling, 2 replies; 69+ messages in thread

From: Adrian Klaver @ 2020-12-07 14:45 UTC (permalink / raw)
  To: Zé Rui Marques <ze.rui.marques@carrotincentives.com>; pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>

On 12/7/20 3:25 AM, Zé Rui Marques wrote:
> Hi,
> 
> I am the lead architect in a small firm that develops a very specialised 
> ETL platform.
> 
> Traditionally, we have used Oracle and PL-SQL, and we are now porting 
> everything to Postgres.
> 
> All of our code outside of the database is java and I wiash that all of 
> our code within the database to be also in java.
> 
> The PL/java “add-on” is not supported directly by Postgres.
> 
> I would like to ask if there is a plan to include it as an official 
> procedural language. If so, when?

None that I have heard of. Even if the decision where to made today it 
would likely a couple of years before it would be included, so that is 
not going to help you. What is your concern?

> 
> Thanks,
> *—*
> *Zé Rui Marques*
> 
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com





^ permalink  raw  reply  [nested|flat] 69+ messages in thread

* Re: PL/java
@ 2020-12-07 15:18  Hemil Ruparel <hemilruparel2002@gmail.com>
  parent: Adrian Klaver <adrian.klaver@aklaver.com>
  1 sibling, 1 reply; 69+ messages in thread

From: Hemil Ruparel @ 2020-12-07 15:18 UTC (permalink / raw)
  To: Adrian Klaver <adrian.klaver@aklaver.com>; +Cc: Zé Rui Marques <ze.rui.marques@carrotincentives.com>; pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>

I want to say this. I never liked any extension language. It's like Java is
not meant to interact with databases. Nor is python (in my opinion). I
think you should skip the search

On Mon, Dec 7, 2020 at 8:15 PM Adrian Klaver <adrian.klaver@aklaver.com>
wrote:

> On 12/7/20 3:25 AM, Zé Rui Marques wrote:
> > Hi,
> >
> > I am the lead architect in a small firm that develops a very specialised
> > ETL platform.
> >
> > Traditionally, we have used Oracle and PL-SQL, and we are now porting
> > everything to Postgres.
> >
> > All of our code outside of the database is java and I wiash that all of
> > our code within the database to be also in java.
> >
> > The PL/java “add-on” is not supported directly by Postgres.
> >
> > I would like to ask if there is a plan to include it as an official
> > procedural language. If so, when?
>
> None that I have heard of. Even if the decision where to made today it
> would likely a couple of years before it would be included, so that is
> not going to help you. What is your concern?
>
> >
> > Thanks,
> > *—*
> > *Zé Rui Marques*
> >
> >
>
>
> --
> Adrian Klaver
> adrian.klaver@aklaver.com
>
>
>

^ permalink  raw  reply  [nested|flat] 69+ messages in thread

* Re: PL/java
@ 2020-12-07 15:25  Adrian Klaver <adrian.klaver@aklaver.com>
  parent: Hemil Ruparel <hemilruparel2002@gmail.com>
  0 siblings, 1 reply; 69+ messages in thread

From: Adrian Klaver @ 2020-12-07 15:25 UTC (permalink / raw)
  To: Hemil Ruparel <hemilruparel2002@gmail.com>; +Cc: Zé Rui Marques <ze.rui.marques@carrotincentives.com>; pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>

On 12/7/20 7:18 AM, Hemil Ruparel wrote:
> I want to say this. I never liked any extension language. It's like Java 
> is not meant to interact with databases. 

The JDBC folks might disagree.

Nor is python (in my opinion).
> I think you should skip the search
> 
> On Mon, Dec 7, 2020 at 8:15 PM Adrian Klaver <adrian.klaver@aklaver.com 
> <mailto:adrian.klaver@aklaver.com>> wrote:
> 
>     On 12/7/20 3:25 AM, Zé Rui Marques wrote:
>      > Hi,
>      >
>      > I am the lead architect in a small firm that develops a very
>     specialised
>      > ETL platform.
>      >
>      > Traditionally, we have used Oracle and PL-SQL, and we are now
>     porting
>      > everything to Postgres.
>      >
>      > All of our code outside of the database is java and I wiash that
>     all of
>      > our code within the database to be also in java.
>      >
>      > The PL/java “add-on” is not supported directly by Postgres.
>      >
>      > I would like to ask if there is a plan to include it as an official
>      > procedural language. If so, when?
> 
>     None that I have heard of. Even if the decision where to made today it
>     would likely a couple of years before it would be included, so that is
>     not going to help you. What is your concern?
> 
>      >
>      > Thanks,
>      > *—*
>      > *Zé Rui Marques*
>      >
>      >
> 
> 
>     -- 
>     Adrian Klaver
>     adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>
> 
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com





^ permalink  raw  reply  [nested|flat] 69+ messages in thread

* Re: PL/java
@ 2020-12-07 16:16  Rob Sargent <robjsargent@gmail.com>
  parent: Adrian Klaver <adrian.klaver@aklaver.com>
  0 siblings, 2 replies; 69+ messages in thread

From: Rob Sargent @ 2020-12-07 16:16 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org


On 12/7/20 8:25 AM, Adrian Klaver wrote:
> On 12/7/20 7:18 AM, Hemil Ruparel wrote:
>> I want to say this. I never liked any extension language. It's like 
>> Java is not meant to interact with databases. 
>
> The JDBC folks might disagree.
>
That interaction is strictly sql to db, data to app.  As it should be.





^ permalink  raw  reply  [nested|flat] 69+ messages in thread

* Re: PL/java
@ 2020-12-07 16:32  Adrian Klaver <adrian.klaver@aklaver.com>
  parent: Rob Sargent <robjsargent@gmail.com>
  1 sibling, 0 replies; 69+ messages in thread

From: Adrian Klaver @ 2020-12-07 16:32 UTC (permalink / raw)
  To: Rob Sargent <robjsargent@gmail.com>; pgsql-general@lists.postgresql.org

On 12/7/20 8:16 AM, Rob Sargent wrote:
> 
> On 12/7/20 8:25 AM, Adrian Klaver wrote:
>> On 12/7/20 7:18 AM, Hemil Ruparel wrote:
>>> I want to say this. I never liked any extension language. It's like 
>>> Java is not meant to interact with databases. 
>>
>> The JDBC folks might disagree.
>>
> That interaction is strictly sql to db, data to app.  As it should be.


Playing Devil's advocate. It is still Java interacting with a database. 
The objection I gather is to having Java embedded in the database. SQL 
interaction is no panacea:

https://portswigger.net/daily-swig/sql-injection



-- 
Adrian Klaver
adrian.klaver@aklaver.com





^ permalink  raw  reply  [nested|flat] 69+ messages in thread

* Re: PL/java
@ 2020-12-07 18:35  Joshua Drake <jd@commandprompt.com>
  parent: Zé Rui Marques <ze.rui.marques@carrotincentives.com>
  1 sibling, 0 replies; 69+ messages in thread

From: Joshua Drake @ 2020-12-07 18:35 UTC (permalink / raw)
  To: Zé Rui Marques <ze.rui.marques@carrotincentives.com>; +Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>

>
>
>
> The PL/java “add-on” is not supported directly by Postgres.
>
>
With a few exceptions (Perl, Python) this is how the community handles all
"add-ons". A great number of features available to you are available as
third party extensions and not part of core. Zombodb, Timescale and Citus
are good examples.

In short, don't worry about whether or not it is "official".

JD


> I would like to ask if there is a plan to include it as an official
> procedural language. If so, when?
>
> Thanks,
> *—*
> *Zé Rui Marques*
>
>
>

^ permalink  raw  reply  [nested|flat] 69+ messages in thread

* Re: PL/java
@ 2020-12-07 22:10  Martin Gainty <mgainty@hotmail.com>
  parent: Rob Sargent <robjsargent@gmail.com>
  1 sibling, 2 replies; 69+ messages in thread

From: Martin Gainty @ 2020-12-07 22:10 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>

Nota Bene:
Almost all official interfaces to/from Oracle are coded in Java
FWIK google's implementations are 95% python
(although you would need to understand JSON formatting for import/export requirements)
for those reasons i tread lightly before disparaging either language

Going Forward:
try to implement PL/SQL that rob/joshua mentioned
if you're calling no-joy after implementing PL/SQL
then we can take a look at interfacing to Postgres ETL binaries with a JNI interface
provided the JNI is spot on with signatures for each referenced function

Un Saludo
m

________________________________
From: Rob Sargent <robjsargent@gmail.com>
Sent: Monday, December 7, 2020 11:16 AM
To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: PL/java


On 12/7/20 8:25 AM, Adrian Klaver wrote:
> On 12/7/20 7:18 AM, Hemil Ruparel wrote:
>> I want to say this. I never liked any extension language. It's like
>> Java is not meant to interact with databases.
>
> The JDBC folks might disagree.
>
That interaction is strictly sql to db, data to app.  As it should be.

^ permalink  raw  reply  [nested|flat] 69+ messages in thread

* Re: PL/java
@ 2020-12-07 22:22  Rob Sargent <robjsargent@gmail.com>
  parent: Martin Gainty <mgainty@hotmail.com>
  1 sibling, 1 reply; 69+ messages in thread

From: Rob Sargent @ 2020-12-07 22:22 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org


On 12/7/20 3:10 PM, Martin Gainty wrote:
> Nota Bene:
> Almost all official interfaces to/from Oracle are coded in Java
> FWIK google's implementations are 95% python
> (although you would need to understand JSON formatting for 
> import/export requirements)
> for those reasons i tread lightly before disparaging either language
>
> Going Forward:
> try to implement PL/SQL that rob/joshua mentioned
> if you're calling no-joy after implementing PL/SQL
> then we can take a look at interfacing to Postgres ETL binaries with a 
> JNI interface
> provided the JNI is spot on with signatures for each referenced function
>
If I'm tracking correctly I can say the java implementation of 
CopyManager is, to me, blindingly fast.  So if the E and the T are in 
java then certainly the L can be also.  I have not compared it to 
straight file-base copy because my data is conceived in Java and slammed 
home directly from the app (middle-ware). I write relatively large 
blocks (millions of records) to naked temporary tables and then let 
straight sql read from there and insert into final tables in chunks.
> Un Saludo
> m
>
> ------------------------------------------------------------------------
> *From:* Rob Sargent <robjsargent@gmail.com>
> *Sent:* Monday, December 7, 2020 11:16 AM
> *To:* pgsql-general@lists.postgresql.org 
> <pgsql-general@lists.postgresql.org>
> *Subject:* Re: PL/java
>
> On 12/7/20 8:25 AM, Adrian Klaver wrote:
> > On 12/7/20 7:18 AM, Hemil Ruparel wrote:
> >> I want to say this. I never liked any extension language. It's like
> >> Java is not meant to interact with databases.
> >
> > The JDBC folks might disagree.
> >
> That interaction is strictly sql to db, data to app.  As it should be.
>
>

^ permalink  raw  reply  [nested|flat] 69+ messages in thread

* Re: PL/java
@ 2020-12-08 10:46  David Goodenough <david.goodenough@btconnect.com>
  parent: Martin Gainty <mgainty@hotmail.com>
  1 sibling, 0 replies; 69+ messages in thread

From: David Goodenough @ 2020-12-08 10:46 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org

As of Java-16 there is a replacement for JNI which allows direct calling of native interfaces 
without the need for hand coded stub code.

On Monday, 7 December 2020 22:10:01 GMT Martin Gainty wrote:
> Nota Bene:
> Almost all official interfaces to/from Oracle are coded in Java
> FWIK google's implementations are 95% python
> (although you would need to understand JSON formatting for import/export
> requirements) for those reasons i tread lightly before disparaging either
> language
> 
> Going Forward:
> try to implement PL/SQL that rob/joshua mentioned
> if you're calling no-joy after implementing PL/SQL
> then we can take a look at interfacing to Postgres ETL binaries with a JNI
> interface provided the JNI is spot on with signatures for each referenced
> function
> 
> Un Saludo
> m
> 
> ________________________________
> From: Rob Sargent <robjsargent@gmail.com>
> Sent: Monday, December 7, 2020 11:16 AM
> To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
> Subject: Re: PL/java
> 
> On 12/7/20 8:25 AM, Adrian Klaver wrote:
> > On 12/7/20 7:18 AM, Hemil Ruparel wrote:
> >> I want to say this. I never liked any extension language. It's like
> >> Java is not meant to interact with databases.
> > 
> > The JDBC folks might disagree.
> 
> That interaction is strictly sql to db, data to app.  As it should be.

^ permalink  raw  reply  [nested|flat] 69+ messages in thread

* Re: PL/java
@ 2020-12-08 11:23  Thomas Kellerer <shammat@gmx.net>
  parent: Rob Sargent <robjsargent@gmail.com>
  0 siblings, 0 replies; 69+ messages in thread

From: Thomas Kellerer @ 2020-12-08 11:23 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org

Rob Sargent schrieb am 07.12.2020 um 23:22:
> If I'm tracking correctly I can say the java implementation of
> CopyManager is, to me, blindingly fast.  So if the E and the T are in
> java then certainly the L can be also.

I can confirm that using CopyManager in JDBC has pretty much the same performance
as using COPY ... FROM STDIN in e.g. psql

Thomas





^ permalink  raw  reply  [nested|flat] 69+ messages in thread

* Re: PL/java
@ 2020-12-09 05:55  Zé Rui Marques <ze.rui.marques@carrotincentives.com>
  parent: Adrian Klaver <adrian.klaver@aklaver.com>
  1 sibling, 0 replies; 69+ messages in thread

From: Zé Rui Marques @ 2020-12-09 05:55 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>

Hi,

My concern is a purely commercial, in this case.

We work only for “large” companies. Only telecommunications operators (more than 5 million subscribers)

In this environment the “IBM / SAP / Accenture” effect is very strong - “I chose the leader, it is not my fault that it failed”

So, having something like PL/java when it is not “supported” by anyone with a markeatable name is always a barrier.

Furthermore, if it is not in the Postgres.org<http://Postgres.org; supported things, it will not be available in AWS RDS service, AWS Aurora, Azure xyz, Citus…, which limits our deployment options.

Thanks,

—
Zé Rui Marques

ze.rui.marques@carrotincentives.com<mailto:ze.rui.marques@carrotincentives.com>
+351 919507949

carrotincentives.com<http://carrotincentives.com;

On 07-12-2020, at 14:45, Adrian Klaver <adrian.klaver@aklaver.com<mailto:adrian.klaver@aklaver.com>> wrote:

On 12/7/20 3:25 AM, Zé Rui Marques wrote:
Hi,
I am the lead architect in a small firm that develops a very specialised ETL platform.
Traditionally, we have used Oracle and PL-SQL, and we are now porting everything to Postgres.
All of our code outside of the database is java and I wiash that all of our code within the database to be also in java.
The PL/java “add-on” is not supported directly by Postgres.
I would like to ask if there is a plan to include it as an official procedural language. If so, when?

None that I have heard of. Even if the decision where to made today it would likely a couple of years before it would be included, so that is not going to help you. What is your concern?

Thanks,
*—*
*Zé Rui Marques*


--
Adrian Klaver
adrian.klaver@aklaver.com<mailto:adrian.klaver@aklaver.com>



^ permalink  raw  reply  [nested|flat] 69+ messages in thread


end of thread, other threads:[~2020-12-09 05:55 UTC | newest]

Thread overview: 69+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-08-25 23:37 PL/java? Dr. Evil <drevil@sidereal.kz>
2001-08-26 00:22 ` Sean Chittenden <sean@chittenden.org>
2001-08-26 01:29 ` Sean Chittenden <sean-pgsql-general@chittenden.org>
2001-08-26 02:50 ` Bruce Momjian <pgman@candle.pha.pa.us>
2001-08-26 00:08 RE: PL/java? Gowey, Geoffrey <ggowey@rxhope.com>
2001-08-26 01:41 ` Doug McNaught <doug@wireboard.com>
2001-08-26 02:53 ` Bruce Momjian <pgman@candle.pha.pa.us>
2001-08-26 03:08   ` Doug McNaught <doug@wireboard.com>
2001-08-26 02:59 ` Bruce Momjian <pgman@candle.pha.pa.us>
2001-08-26 04:17 ` Dr. Evil <drevil@sidereal.kz>
2001-08-26 20:07 ` Alex Knight <knight@righteous.net>
2001-08-26 20:02   ` Dr. Evil <drevil@sidereal.kz>
2001-08-26 20:26     ` Alex Knight <knight@phunc.com>
2001-08-26 23:51       ` Dr. Evil <drevil@sidereal.kz>
2001-08-27 00:22         ` Alex Knight <knight@phunc.com>
2001-08-31 16:27   ` Shaun Thomas <sthomas@townnews.com>
2001-08-31 23:15     ` Robert J. Sanford, Jr. <rsanford@nolimitsystems.com>
2001-09-01 01:46       ` Alex Knight <knight@phunc.com>
2001-09-01 10:17       ` Gunnar Rønning <gunnar@polygnosis.com>
2001-09-01 01:42     ` Alex Knight <knight@phunc.com>
2001-09-01 02:35       ` Alex Pilosov <alex@pilosoft.com>
2001-09-01 02:45         ` Alex Knight <knight@phunc.com>
2001-09-01 06:25           ` Daniel Kalchev <daniel@digsys.bg>
2001-09-03 19:37             ` Alex Knight <knight@phunc.com>
2001-09-03 20:37               ` Randal L. Schwartz <merlyn@stonehenge.com>
2001-09-04 00:21                 ` Alex Knight <knight@phunc.com>
2001-09-04 01:01                   ` Robert J. Sanford, Jr. <rsanford@nolimitsystems.com>
2001-09-04 01:18                     ` Alex Knight <knight@phunc.com>
2001-09-04 10:21               ` Gilles DAROLD <gilles@darold.net>
2001-09-04 21:01                 ` Alex Knight <knight@phunc.com>
2001-09-04 21:28                   ` Randal L. Schwartz <merlyn@stonehenge.com>
2001-09-04 21:45                     ` Alex Knight <knight@phunc.com>
2001-09-05 12:42                     ` Gunnar Rønning <gunnar@polygnosis.com>
2001-09-05 18:26                       ` Randal L. Schwartz <merlyn@stonehenge.com>
2001-09-04 11:35               ` Adam Manock <abmanock@planetcable.net>
2001-09-04 21:05                 ` Alex Knight <knight@phunc.com>
2001-09-01 10:29           ` Gunnar Rønning <gunnar@polygnosis.com>
2001-09-02 08:07           ` Lincoln Yeoh <lyeoh@pop.jaring.my>
2001-09-04 16:15             ` Bruce Momjian <pgman@candle.pha.pa.us>
2001-09-04 17:05               ` Tony Grant <tony@animaproductions.com>
2001-09-04 21:24               ` Alex Knight <knight@phunc.com>
2001-09-05 12:50             ` Gunnar Rønning <gunnar@polygnosis.com>
2001-09-01 02:46         ` Alex Knight <knight@phunc.com>
2001-09-01 04:02       ` Robert J. Sanford, Jr. <rsanford@nolimitsystems.com>
2001-09-04 16:35         ` Robert J. Sanford, Jr. <rsanford@nolimitsystems.com>
2001-08-30 18:51 ` Marshall Spight <marshall@meetstheeye.com>
2001-08-31 18:47   ` Alex Pilosov <alex@pilosoft.com>
2001-09-01 09:56     ` Gunnar Rønning <gunnar@polygnosis.com>
2001-09-03 13:42       ` Andrew Snow <andrew@modulus.org>
2001-09-03 19:54         ` Alex Knight <knight@phunc.com>
2001-09-01 01:10   ` Alex Knight <knight@phunc.com>
2001-09-01 01:21     ` Thomas Lockhart <lockhart@fourpalms.org>
2001-09-01 10:14       ` Gunnar Rønning <gunnar@polygnosis.com>
2001-09-01 14:35         ` Thomas Lockhart <lockhart@fourpalms.org>
2001-09-02 01:37           ` Gunnar Rønning <gunnar@polygnosis.com>
2001-09-01 10:12     ` Gunnar Rønning <gunnar@polygnosis.com>
2003-03-25 16:17 Re: PL/Java Laszlo Hornyak <lhornyakNOSPAM@ish.hu>
2020-12-07 11:25 PL/java Zé Rui Marques <ze.rui.marques@carrotincentives.com>
2020-12-07 14:45 ` Re: PL/java Adrian Klaver <adrian.klaver@aklaver.com>
2020-12-07 15:18   ` Re: PL/java Hemil Ruparel <hemilruparel2002@gmail.com>
2020-12-07 15:25     ` Re: PL/java Adrian Klaver <adrian.klaver@aklaver.com>
2020-12-07 16:16       ` Re: PL/java Rob Sargent <robjsargent@gmail.com>
2020-12-07 16:32         ` Re: PL/java Adrian Klaver <adrian.klaver@aklaver.com>
2020-12-07 22:10         ` Re: PL/java Martin Gainty <mgainty@hotmail.com>
2020-12-07 22:22           ` Re: PL/java Rob Sargent <robjsargent@gmail.com>
2020-12-08 11:23             ` Re: PL/java Thomas Kellerer <shammat@gmx.net>
2020-12-08 10:46           ` Re: PL/java David Goodenough <david.goodenough@btconnect.com>
2020-12-09 05:55   ` Re: PL/java Zé Rui Marques <ze.rui.marques@carrotincentives.com>
2020-12-07 18:35 ` Re: PL/java Joshua Drake <jd@commandprompt.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox