PL/Parrot State of the Onion

1 view
Skip to first unread message

jal...@gmail.com

unread,
Mar 23, 2010, 4:31:11 PM3/23/10
to plpa...@googlegroups.com
Message from jal...@gmail.com:
Howdy folks,

I am working on a "State of the Onion" for PL/Parrot, which was motivated by questions that David Fetter has been asking me for his upcoming presentation. It is definitely a work-in-progress and would love your feedback, suggestions and constructive criticism. 

Thanks,

Duke
Click to open:
Google Docs makes it easy to create, store and share online documents, spreadsheets and presentations.
Google Docs logo

David Fetter

unread,
Mar 25, 2010, 9:38:58 AM3/25/10
to plpa...@googlegroups.com
On 2010/03/23 4:31 PM, jal...@gmail.com wrote:
> I've shared PL/Parrot State of the Onion
>
<http://docs.google.com/Doc?docid=0AVmhnnQsymSrZGs4OWQ1Z18yOGNwNG0zNmZw&hl=en&invite=CLSQ1PsF>
>
> Message from jal...@gmail.com <mailto:jal...@gmail.com>:

>
> Howdy folks,
>
> I am working on a "State of the Onion" for PL/Parrot, which was
> motivated by questions that David Fetter has been asking me for his
> upcoming presentation. It is definitely a work-in-progress and would
> love your feedback, suggestions and constructive criticism.

First chunk of feedback: Google docs says it's down, and has been
since last night. What say we *never* trust "cloud" services again
for anything?

Meanwhile, does someone have a real copy of this?

Cheers,
David.

Jonathan Leto

unread,
Mar 25, 2010, 12:41:28 PM3/25/10
to plpa...@googlegroups.com
Howdy,

I just went there and it is up, but here it is:

PL/Parrot State of the Onion 0
by Jonathan "Duke" Leto

What is PL/Parrot?
PL/Parrot aims to take two awesome open source projects, the
PostgreSQL database and Parrot Virtual Machine, and make them good
friends. The PL in PL/Parrot stands for "PostgreSQL Language", which
basically allows interacting with your database via languages other
than SQL. Usually people want to interact with their database via
dynamic languages, which is why PL/Perl, PL/Python and various other
PL languages exist.

Why embed Parrot in PostgreSQL?
Parrot Virtual Machine aims to be an application virtual machine for
all dynamic languages, so if PostgreSQL and Parrot are in good
standing, PostgreSQL will benefit from any dynamic language that is
built on top of Parrot. In the Parrot world we call these "High Level
Languages" or HLLs for short. Basically, anything above the layer of
the virtual machine is considered "high level." Many HLLs are being
worked on currently, which gives people writing stored procedures in
PLs a wide variety of choices. Also, PLs are hard to write, so by
embedding Parrot as a PL, we do the work once and get the benefit of
many new languages, which is a huge win.

What makes Parrot, and languages built on top of Parrot, good PLs?
Many people resort to writing stored procedures in C for performance,
but this leads to the unfortunate fact that a bug in a stored
procedure can destroy your entire database cluster or allow arbitrary
code execution. Also, C must often be tweaked to get it to work across
different operating system and compiler versions. We hope that writing
stored procedures in a native language of Parrot (of which it has a
few) will provide similar performance to stored procedures in C in a
portable and secure environment.

What part of Parrot's architecture are relevant to PL/Parrot?
Application virtual machine - does not simulate an entire operating
system, just the environment that a process/application needs to run
Register-based with Continuation Passing Style - ...
Language Interoperability - different languages can use each others
libraries and subclass objects (still in progress)

What kind of bumps are still ahead ?
Turns out that PL/Parrot is the first project that uses the Embedding
API and other subsystems "from the other side of the fence", i.e
without including header files that are only meant to be used by
Parrot Internals. The first project to use the Embedding API,
mod_parrot, had no choice but to use internal Parrot header files,
since various functions that were needed were not available from the
public interface, but that means that it is very sensitive to changes
in Parrot internals. PL/Parrot is finding lots of holes in the
Embedding API and other public interfaces to other subsystems and when
we find them, we report them to the Parrot developers and get them
fixed. As soon as PL/Parrot finds that the public interfaces that it
needs are complete, we will start targeting stable releases. Currently
we track SVN trunk, since we often need very recently applied patches.

Another "fun" bump that we are riding now is how to convert PostgreSQL
data types to Parrot data types and vice versa, something that is
often referred to as "data marshalling." I believe we have a lot to
learn from the Blizkost project, which uses Parrot to bridge the gap
between Perl 5 and Rakudo Perl 6.

What can PL/Parrot do right now?
From the outside, it may not look like much, but when you consider
building a PL from scratch, we have already jumped a few hurdles. We
have a testing subsystem which uses a pared-down version of pgTAP
(which I lovingly call pgTAPLite) so we can get feedback about our
changes. We currently instantiate a single Parrot interpreter when
PostgreSQL starts up and then when a backend connection is created PIR
code is passed in and executed. Passing function arguments in and
return values back is the current development focus.

What can we expect in the near future from Parrot?
Security Subsystem which will provide ability to sandbox code,
disallow certain operations/etc

What can we expect in the near future from PL/Parrot?
Lots of stuff!

What features in PostgreSQL in the near future will affect PL/Parrot?

How can I get involved in PL/Parrot?


Duke

> To unsubscribe from this group, send email to plparrot+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.
>

--
Jonathan "Duke" Leto
jona...@leto.net
http://leto.net

David Fetter

unread,
Mar 25, 2010, 1:44:52 PM3/25/10
to plpa...@googlegroups.com
On 2010/03/25 12:41 PM, Jonathan Leto wrote:
> Howdy,
>
> I just went there and it is up, but here it is:

Thanks! :)

Cheers,
David (still for putting this on git :)

Joshua Tolley

unread,
Mar 25, 2010, 1:47:28 PM3/25/10
to plpa...@googlegroups.com
On Thu, Mar 25, 2010 at 09:38:58AM -0400, David Fetter wrote:
> What say we *never* trust "cloud" services again
> for anything?

You mean like github?

signature.asc

David Fetter

unread,
Mar 25, 2010, 1:54:26 PM3/25/10
to plpa...@googlegroups.com

We don't need to trust them :)

Cheers,
David.

Selena Deckelmann

unread,
Mar 25, 2010, 3:19:09 PM3/25/10
to plpa...@googlegroups.com

Another option is a privately hosted etherpad :) Like
http://etherpad.opensourcebridge.org/

Our stuff is backed up, on real hardware, and you can trust us. Really.

-selena

--
http://chesnok.com/daily - me
http://endpoint.com - work

Reply all
Reply to author
Forward
0 new messages