At 12:36 03/02/01 -0500, Alex Pilosov wrote:
>On Sat, 3 Feb 2001, Peter Mount wrote:
[snip]
> > I know some people think this would slow the backend down, but it's
> > only the instanciation of the JVM thats slow, hence the other reason
> > fork() is holding this back. Ideally you would want the JVM to be
> > running with PostMaster, and then each backend can then use the JVM as
> > and when necessary.
>b) since JVM is threaded, it may be more efficient to have a dedicated
>process running JVM, and accepting some sort of IPC connections from
>postgres processes. The biggest problem here is SPI, there aren't a good
>way for that JVM to talk back to database.
That was my other idea, but it is the IPC thats problematical. You would
still need to do some native api to implement some messaging system between
the two.
However, at the other extreme there is RPC, which is possible now, but
would be a lot slower.
>c) temporarily, to have quick working code, you can reach java using hacks
>using programming languages already built into postgres. Both TCL (tcl
>blend) and Perl (JPL and another hack which name escapes me) are able to
>execute java code. SPI is possible, I think both of these bindings are
>two-way (you can go perl-java-perl-java). Might be worth a quick try?
Might be one way to go...
Peter
>-alex
>