Re: Pl/Java - next step?

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Thomas Hallgren <thhal(at)mailblocks(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Pl/Java - next step?
Date: 2004-02-28 22:47:38
Message-ID: 200402282247.i1SMlcG21001@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> "Thomas Hallgren" <thhal(at)mailblocks(dot)com> writes:
> > ** 4. Make the postmaster spawn threads rather than processes **
> > I know this is very controversial and perhaps I should not bring it up at
> > all. But then again, why not? Most readers are open-minded right?
>
> It's been considered and rejected before, and pljava isn't going to tilt
> the scales. In fact, the main thing that bothers me about your
> description of JNI is "Java uses multithreading wether you like it or
> not". I am very afraid of what impact a JVM will have on the stability
> of the surrounding backend.
>
> Other than that fear, though, the JNI approach seems to have pretty
> considerable advantages. You listed startup time as the main
> disadvantage, but perhaps that could be worked around. Suppose the
> postmaster started a JVM --- would that state inherit correctly into
> subsequently forked backends?
>
> Also, regarding your option #3 (do both), do you really think something
> different is going to happen in practice? The developers of the other
> implementation aren't likely to give it up just because yours exists.

As I understand it, the JNI approach has one JVM per backend using java,
while the Java/remote approach uses a single JVM for all backends and
isolates them via classes.

JNI says function execution will be faster and cleaner, while
Java/remote feels system resource usage and startup time will be less.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2004-02-28 22:59:00 Re: pg_xlog
Previous Message Jon Jensen 2004-02-28 21:21:05 Re: Avoid MVCC using exclusive lock possible?