On Thu, Mar 29, 2001 at 12:47:35PM -0600, elble@stripped wrote:
> > In a wild moment of engineering excess, I considered
> > adding perl to mysqld to make writing the algrithms easier, but wised up
> > quickly (has anyone done that for writing Procedure callbacks?).
>
> i've actually been thinking about this quite a bit, and drawing tenative
> parallels to mod_perl for apache.
Yeah, that's the parallel I've been making internally. It's have to be
interpreter per-thread, due to perl5's threading instabilities, and
right now MySQL doesn't have enough hooks to make it really useful,
though a subclass of Procedure and a call-into-perl udf abstraction
would be useful.
> my thoughts were evolving along the lines of:
>
> MySQL <-> Trigger API <-> Module
>
> and then you could code whatever you wanted into the module
> (support for perl, python, whatever... my interest would
> be perl)
>
> i'd be interested to hear monty's views on the subject.
> one of my questions would be on where the trigger routines'
> text would be stored (if a module supports interpret-on-the-fly).
I'd put non-native triggers in a "triggers" table in each database.
That's all armchair quarterbacking, I'm not persuing a perl-in mysqld
approach because our datasets are too big to do that, and because it's
all relatively simple integer based foreign & primary key, so Perl's not
bringing too much advantage to the party.
But I think it would be cool. OTOH, the mysqld-as-linkable-library
approach might let you combine
Apache2.0 <-> mod_perl <-> mysqld
in a one process, multiple threads configuration that would scream. But
that's prolly OT for the mysql internals list...
- Barrie