[Pljava-dev] Re: [ANNOUNCE] ANN: PLJava 1.0.0 released

From: thhal at mailblocks(dot)com (Thomas Hallgren)
To:
Subject: [Pljava-dev] Re: [ANNOUNCE] ANN: PLJava 1.0.0 released
Date: 2005-02-03 19:35:37
Message-ID: thhal-0kBXeAjfoxScMvy30Ba3NA+F1+LMoeX@mailblocks.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-announce pljava-dev

P?ter,

> Are the java classes run in a bytecode-interpreted mode or are they
> compiled into native code using HotSpot or similar?

That depends on the JVM. The Sun JVM will detect hotspots and do JIT
compilations as needed. The same goes for JRockit.

If you use GCJ, then the current version will utilize native code for
pljava's own Java code and the stuff loaded with install_jar will be
interpreted. This is of course subject to improvement. You can preload
precompiled .so files also, the same way the pljava.so is loaded, but
that circumvents the normal classloader semantics.

> Does the one session - one JVM archticture means that a large number
> of sessions require large number of memory. E.g. 200 session needs ca.
> 200*30MB = 6GB memory?

Since the backend is single-threaded and starts a new process for each
session, there's no way to have multiple sessions running in one JVM
unless some inter-process communication protocoll is added. Please read
the rationale behind choice of technology here:
http://gborg.postgresql.org/project/pljava/genpage.php?jni_rationale.

The pl-j project at http://plj.codehaus.org took another approach. They
use one JVM and instead suffer from the IPC overhead.

From a pure "java-in-the-backend" perspective, it would have been
better if the postmaster spawned threads rather than processes. There
are many other perspectives though as you will find out if you bring the
subject up on one of the PostgreSQL mailing lists :-)

Regards,
Thomas Hallgren

In response to

Browse pgsql-announce by date

  From Date Subject
Next Message David Fetter 2005-02-05 05:36:14 == PostgreSQL Weekly News - February 4 2005 ==
Previous Message Geoffrey 2005-02-02 23:25:12 Re: PostgreSQL Security Release

Browse pljava-dev by date

  From Date Subject
Next Message Thomas Hallgren 2005-02-06 11:11:14 [Pljava-dev] Re: PL Java Security
Previous Message Thomas Hallgren 2005-02-01 18:33:26 [Pljava-dev] Re: PL Java Security