Re: pl/Ruby, deprecating plPython and Core

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: pl/Ruby, deprecating plPython and Core
Дата
Msg-id 43034319.1040507@dunslane.net
обсуждение исходный текст
Ответ на Re: pl/Ruby, deprecating plPython and Core  (Dave Cramer <pg@fastcrypt.com>)
Ответы Re: pl/Ruby, deprecating plPython and Core
Список pgsql-hackers

Dave Cramer wrote:

> 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/
>
>

That's a pretty good explanation and ought to be published more widely. 
It's almost a pity that we couldn't have one project with a server 
setting saying how we want it to run.

I seem to recall hearing of a Sun gadget in the works that would let a 
process connect to a running VM and load classes and run them. I have 
been a bit out of it on Java lately - does anyone know of such a thing, 
or is my memory failing again?

cheers

andrew


В списке pgsql-hackers по дате отправления:

Предыдущее
От: jtv@xs4all.nl
Дата:
Сообщение: Re: transactions not working properly ?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Missing CONCURRENT VACUUM (Was: Release notes for