• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Play With Theschwartz
 

Play With Theschwartz

on

  • 3,865 views

 

Statistics

Views

Total Views
3,865
Views on SlideShare
3,861
Embed Views
4

Actions

Likes
3
Downloads
6
Comments
0

1 Embed 4

http://www.slideshare.net 4

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Play With Theschwartz Play With Theschwartz Presentation Transcript

    • Play with TheSchwartz Hideo Kimura (hidek)
    • 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
    • TheSchwartz
      • Reliable Job queue system
        • using MySQL (SQLite is “ok”)
      • MovableType
      • CodeRepos commit ping
      • sending tons of emails
      • creating guest hosts for VPS
    • Data::ObjectDriver
      • using Data::ObjectDriver as OR mapper
        • job
        • funcmap
        • error
        • exitstatus
        • note
    • TheSchwartz::Simple
      • using DBI dbh directly for Job insertion.
      • NOT including worker
    • Job attributes
      • jobid
      • funcid
      • arg
      • uniqkey
      • insert_time
      • run_after
      • grabbed_until
      • priority
      • coalesce
    • Coalesce Jobs
      • $job->coalesce(“yahoo.com@$id”);
      • $client->find_job_with_coalescing_prefix( ‘MyWorker’, ‘yahoo.com’ );
    • 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); }
    • 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 )
    • 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'} );
    • Thank you, and questions?