GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - davecramer/pljvm: JVM procedural language. Execute code in any JVM from PostgreSQL

BranchesTags
Open more actions menu

Latest commit

 

History

16 Commits
16 Commits

Folders and files

NameName
Last commit message
Last commit date
expected
expected
 
 
plj-java
plj-java
 
 
sql
sql
 
 
src
src
 
 
testserialization
testserialization
 
 
.gitignore
.gitignore
 
 
BSD LICENSE
BSD LICENSE
 
 
Makefile
Makefile
 
 
README.md
README.md
 
 
pljvm--1.0.0.sql
pljvm--1.0.0.sql
 
 
pljvm.control
pljvm.control
 
 
pljvm.md
pljvm.md
 
 

Repository files navigation

PL/JVM

This is an implementation of a trusted language execution engine that executes code in any JVM via an RPC mechanism

Requirements

Any JVM based language

Building PL/JVM Language

  1. Make and install it: make clean && make && make install

Running the tests

From plj-java run maven exec:java Then from the main dir run make installcheck

Examples

There are a number of examples in the tests which demonstrate how this works

How it works

From the PostgreSQL process when the function is called all of the arguments are encoded and sent to the JVM along with the java class name and method. For example the function defined as:

 CREATE OR REPLACE FUNCTION pljvm_add(i int2, j int2) RETURNS int2 AS $$
org.postgresql.plj.test.Int.add
$$ LANGUAGE pljvm;

defines a function pljvm_add which takes two small ints as arguments and returns a small int. The java classname is org.postgresql.plj.test.Int and the method is add.

public Short add(Short a, Short b) { return (short)(a+b); }

On the JVM side there is a process running a netty pipeline which decodes the call requests; instantiates the class and calls the method in question and then encodes the call response back to the PostgreSQL process.

The library takes care of serializing and deserializing the arguments and the return values

About

JVM procedural language. Execute code in any JVM from PostgreSQL

Resources

Readme
Activity

Stars

4 stars

Watchers

3 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.