(Slight dup of recent post to perlmonks, but more specific
to DBI)

I just discovered the Pots::* (http://search.cpan.org/~rchibois/Pots-0.01/)
modules, and wondered if anyone had tried using them w/ DBI ?

I've had a notion of creating a DBIx::Threaded subclass (or actually,
container class) that would hopefully work around the current DBI
restrictions wrt threads (ie, no sharing of DBI handles between
threads). Essentially, connect() would start a server thread
which would run the real DBI i/f, and the client/container class
would implement all the public DBI methods. While the parameters/
results serialization might be expensive (uses Storable), it would
solve my current problem (how to share dynamically created connections
between worker threads), and if I get ambitious, I might attempt
to hack Pots up to optimize the serialization where possible
(copy params/results to threads::shared variables to pass, rather
than using Storable to fully marshall/unmarshall).

Any experiences (or comments) much appreciated,
Dean Arnold
Presicient Corp.

Reply via email to