Play With Theschwartz

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    1 Favorite

    Play With Theschwartz - Presentation Transcript

    1. Play with TheSchwartz Hideo Kimura (hidek)
    2. about me
      • name:
        • hide-k
        • hidek
        • hide
        • hide-san
        • hideki
        • hidekku…
        • whatever you want to call =)
      • working at:
        • KDDI Web Communications (hosting company)
      • perl:
        • office: developing management control panel for customers
        • private: perl-users.jp, catalyst
    3. TheSchwartz
      • Reliable Job queue system
        • using MySQL (SQLite is “ok”)
      • MovableType
      • CodeRepos commit ping
      • sending tons of emails
      • creating guest hosts for VPS
    4. Data::ObjectDriver
      • using Data::ObjectDriver as OR mapper
        • job
        • funcmap
        • error
        • exitstatus
        • note
    5. TheSchwartz::Simple
      • using DBI dbh directly for Job insertion.
      • NOT including worker
    6. Job attributes
      • jobid
      • funcid
      • arg
      • uniqkey
      • insert_time
      • run_after
      • grabbed_until
      • priority
      • coalesce
    7. Coalesce Jobs
      • $job->coalesce(“yahoo.com@$id”);
      • $client->find_job_with_coalescing_prefix( ‘MyWorker’, ‘yahoo.com’ );
    8. Split Job
      • sub work { ... foreach my $id (@ids) { my $new_job = TheSchwartz::Job->new( funcname => 'Worker::Child', args => $args coalesce => "parent-$id", ); push @new_jobs, $new_job; } $job->replace_with(@new_jobs); }
    9. Monitor Jobs
      • $client->list_jobs({'funcname' => 'MyApp::Worker'} )
      • $client->lookup_job($handle_id)
      • $client->find_job_with_coalescing_prefix( $class, $prefix )
      • $client->find_job_with_coalescing_value( $class, $value )
    10. Monitor Jobs from Catalyst
      • use base 'Catalyst::Model::Adaptor';
      • $c->model(‘TheSchwartz’)->insert($job);
      • $c->stash->{jobs} = $c->model('TheSchwartz')->list_jobs( {'funcname' => 'MyApp::Worker'} );
    11. Thank you, and questions?

    + Hideo KimuraHideo Kimura, 2 years ago

    custom

    826 views, 1 favs, 0 embeds more stats

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 826
      • 826 on SlideShare
      • 0 from embeds
    • Comments 0
    • Favorites 1
    • Downloads 3
    Most viewed embeds

    more

    All embeds

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories