2 posts tagged “mvc”
Overview
At my job, we've just about finished work on the next segment of our Catalyst-based application. It required the implementation of a JobQueue system, and after careful consideration we narrowed down our choices.
Why TheSchwartz?
Aside from the fun statements that are made while working it into every day business conversation, it had a few things that really stood out over the competition. What competition, you say? Well, we really didn't have many options. Our choices for a reliable jobqueue (reliable meaning it handles failure conditions internally, and can guarantee success or failure) were really TheSchwartz, Catalyst::Engine::JobQueue or a home grown solution. TheSchwartz was really the only choice.
Getting it running
Setup was actually very simple. Aside from the hidden doc directory containing the schema, it was all laid out in a sane fashion. We configured one of our higher powered slaves to be the jobqueue database, and created the InnoDB tables. After that, configuring the test cases to use our DB and we were in business. Things couldn't have gone easier, really. Well, maybe if there was more Pod available but I'm not complaining one bit, considering how well it works.
Building Job Producers
Obviously, the worker machines are going to have a variety (nigh, a plethora) of tasks as time goes on. Building a variety of worker classes to dispatch the various commands grows tiring. This is where the ingenuity of one of our developers came into play and Object::Recorder was born. What this module allows us to do is have object-level continuations. This allows us to have a simple model class that uses Object::Recorder to insert jobs into the queue. The worker threads are simple Object::Recorder::Player objects that replay the serialized method calls (including construction). This means that we can modify our JobProducer and underlying worker code without ever having to touch TheSchwartz workers. Everything Just Works. Mostly, but that's what the community and RT is for.
Today I just pushed a new package to CPAN that introduces a "Graphics" helper. The general idea of the package is to install into any Catalyst application a batch of ready-made images that are useful. The only thing it currently has is an AJAX activity indicator, but I'm currently seeking other images to include.
If you have any ideas for new images to be included in this package, please let me know! I'm "jshirley" on IRC, or you can comment here and my email is always open.
Keep an eye out for some screencasts, coming soon!