From: | Dave Cramer <pg(at)fastcrypt(dot)com> |
---|---|
To: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Cc: | "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, David Fetter <david(at)fetter(dot)org> |
Subject: | Re: pl/Ruby, deprecating plPython and Core |
Date: | 2005-08-17 13:28:38 |
Message-ID: | 51071547-8189-4C25-8488-BC8F89A1F1ED@fastcrypt.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
As there are two java procedural languages which are available for
postgreSQL Josh asked for an explanation as to their differences.
They are quite similar in that both of them run the function in a
java vm, and are pre-compiled. Neither attempt to compile the code.
The biggest difference is how they connect to the java VM.
PL/Java uses Java Native Interfaces (JNI) and does a direct call into
the java VM from the language handler.
PL-J uses a network protocol to connect to a java VM.
There are advantages and disadvantages to both approaches.
+ JNI is simpler, doesn't require a protocol, or an application
container to manage the User Defined Functions
- JNI requires that the vm runs on the server machine, and a separate
vm be instantiated for every connection that calls a function.
This is mitigated somewhat in java 1.5, by sharing data, however
this may or may not be a Sun only feature ( does anyone know );
either way a separate vm is required for each connection.
- startup time for the vm on the first call for the connection.
- Possible ( not as likely any more ) for the java VM to take the
server down.
Using a network protocol such as a pl-j does has the following
( basically the opposite of the JNI (dis)advantages )
+ The java VM does not have to run on the server.
+ Only one vm per server
- More complex, requires a micro kernel application server to manage
the UDF's currently http://loom.codehaus.org/
Dave
From | Date | Subject | |
---|---|---|---|
Next Message | Douglas McNaught | 2005-08-17 13:34:39 | Re: transactions not working properly ? |
Previous Message | Andrew Dunstan | 2005-08-17 12:53:48 | Re: Upcoming back-branch releases |