Note: Thread::Apartment has not yet been CPAN'd, as I hope to exersize it more thoroughly in an application I'm developing... and perhaps get some feedback from the Monks in the interim...
(For the unfamiliar, apartment threading is a method of isolating an object (or object hierarchy) within its own thread and exposing its interfaces via lightweight proxy objects.)
Background: My initial attempt at apartment threading occured while trying to make DBI more "threadable". The result was DBIx::Threaded, and the associated module Thread::Queue::Duplex. Once I managed to get that running, I realized
While this initial release falls short of permitting (3) (due to unimplemented support for closure proxies), I think I've covered most of the important ground to make OO Perl more "threadable" (albeit, at some performance expense) ala Java's threading capabilities.
I've also begun pondering whether Thread::Apartment may also provide a nice foundation for fully distributed objects (tho without the use of threads::shared elements). Assuming that some sockets or IPC based subclasses of Thread::Queue::Duplex, Thread::Apartment::Server, and Thread::Apartment::Client were created, it should be feasible to build fully distributed object architectures entirely in Perl.
Have I overlooked something simple in Perl that already handles all of this ? Or worse, overlooked something which could cause this house of cards to tumble ?
Comments/suggestions/concerns welcome.
In reply to Apartment Threading in Perl by renodino
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |