user-pic

davewood

  • About: I like Toast.
  • Commented on Poor Mans Jobqueue for Catalyst Apps
    Update: http://blogs.perl.org/users/davewood/2014/07/asynchronuous-task-distribution-with-anyevent-and-zeromq.html...
  • Commented on Does anybody know Matthias Nutt?
    Have you tried contacting him through other means. email or phone? http://matthias-nutt.no-limit.de/CV.html...
  • Commented on Asynchronous Task Distribution with AnyEvent and ZeroMQ
    send me a message if you are interested in more code. the example code used in this blog post is stripped down so it's easier to read.....
  • Commented on Asynchronous Task Distribution with AnyEvent and ZeroMQ
    Thats correct. Now I can scale the worker processes while still having information about the job state in the DB. Do you see anything wrong with that?...
  • Posted Asynchronous Task Distribution with AnyEvent and ZeroMQ to davewood

    Some months ago i wrote how to (ab)use your database as a messagequeue in order to distribute tasks among worker-processes.

    "From your code, it also looks like having more than one de…

  • Commented on Removing Boilerplate with Import::Into
    hi ether? what do you want to express with your comment? Did Jimmy fall in the well? ;)...
  • Commented on Removing Boilerplate with Import::Into
    I use Import::Into for avoiding boilerplate in my tests: # t/lib/MyApp/TestKit.pm package MyApp::TestKit; use strict; use warnings; use Import::Into; use FindBin qw/$Bin/; use lib "$Bin/../lib"; use MyApp::Util; use Test::More; use Test::Warnings; use Test::Fatal; use utf8; BEGIN { # load config...
  • Commented on Are Abilities Roles?
    In really like parameterizing roles. I used to do it with MooseX::ParameterizedRole but recently I switched over to Package::Variant. package DD::Role::Ability; use strictures 1; use Package::Variant importing => ['Moo::Role'], subs => [ qw(has around before after with) ]; sub make_variant...
  • Commented on Poor Mans Jobqueue for Catalyst Apps
    reporting back need more processes now. david@nio:~/dev/myapp$ ./script/myapp_job_daemon.pl Found job: 25 Found job: 25 Found job: 25 Processing test_id: 1355 Processing test_id: 1355 Processing test_id: 1355 =) looking for a job queue now, currently checking out ZeroMQ...
  • Commented on bulk inserting tens of thousands of rows with DBIx::Class
    You can get rid of part of the literal SQL. ribasushi: (...) you need to make a correlator *and* you will not able to avoid literal sql entirely anyway ribasushi: so if "no literal" is your goal - it outright...
  • Posted bulk inserting tens of thousands of rows with DBIx::Class to davewood

    For some crazy reason my $project had a denormalized database layout. I had a table 'job' with a column 'data' which had a serialized ArrayRef of HashRefs as value.

  • Posted Relationships with optional foreign key values (DBIx::Class) to davewood

    This entry demonstrates how to implement a relationship with optional foreign key values using DBIx::Class.

    Imagine two related tables 'human' and 'cat': A cat belongs to a human but when the human dies the cat can continue to roam freely.

    package MyApp:…
  • Commented on DWIM Perl for Linux 5.18.1
    oops. forgot one possible argument. included dependencies of devel versions of libs....
  • Commented on DWIM Perl for Linux 5.18.1
    Do not take this as an offense, but what is the point of DWIMPerl? With perlbrew and cpanm I can achieve the same result. So my question is: What is a reasonable use case of DWIM Perl for Linux? My...
  • Posted parameterizable packages with Package::Variant to davewood

    Yesterday I tried to port a Moose App to Moo but got stuck when I found out it is using MooseX::Role::Parameterizable, a module not available in Moo. A quick visit in channel #moose on perl.irc.org later and I was told to give

  • Commented on Poor Mans Jobqueue for Catalyst Apps
    Thanks for the input. I will look into improving the job queue as soon as there is time. For the moment it just works but certainly doesn't appear as scalable as before I wrote this posting....
  • Posted Poor Mans Jobqueue for Catalyst Apps to davewood

    Handling long-running or heavy tasks inside a a requests is something you should avoid.

    • It blocks the available processes for other requests.
    • browser request timeout
    • ...

    Instead of using one of the job queue implementations available for perl

  • Commented on Securing your website against Cross Site Request Forgery Attacks
    http://blogs.perl.org/users/olaf_alders/2012/07/using-plackmiddlewarecsrfblock-and-jquery-to-deal-with-cross-site-request-forgery.html...
  • Posted Securing your website against Cross Site Request Forgery Attacks to davewood

    I was pleasently surprised to find out that there is already a Plack Middleware that improves security against CSRF attacks. And it's very easy to use.

    I'll demonstrate with a Catalyst example but any app running with P…

  • Posted using DBIx::Class::DeploymentHandler to davewood

    I used to work with DBIx::Class::Schema::Versioned to upgrade my DBIC Schema but soon I needed more then it offered.

    Starting with DBIx::Class::DeploymentHandler was a bit troublesome because I had a hard-ish time understanding the extensive documentation.

    Now that I moved past tha…

  • Commented on Versioning Developer Releases
    This is how I version my software: 0.001_001 # dev release 1 0.001_002 # fix bug 0.001_003 # fix missing dependency 0.002000 # first "stable" release 0.003_001 # new feature 0.003_002 # fix bug 0.004000 # effectively 0.4.0 http://www.dagolden.com/index.php/369/version-numbers-should-be-boring http://blogs.perl.org/users/davewood/2011/12/cpan-my-first-time.html...
  • Commented on Moving my Catalyst Apps from Apache/FCGI to Nginx/Starman
    UPDATE: http://blogs.perl.org/users/davewood/2013/01/nginx-fastcgi-vs-starman-erratum.html...
  • Posted Nginx: FastCGI vs. starman (Erratum) to davewood

    2 weeks ago I've written Moving my Catalyst Apps from Apache/FCGI to Nginx/Starman

    Yesterday I have discussed my setup with mst, jnap and joel on irc.perl.org #catalyst…

  • Commented on Moving my Catalyst Apps from Apache/FCGI to Nginx/Starman
    There is something missing in my nginx config which results in the following error msg. Use of uninitialized value in string eq at /var/www/perl5/perlbrew/perls/perl-5.16.2/lib/site_perl/5.16.2/Catalyst.pm line 2787. probably some config that passes the originating IP to the starman worker. more info...
  • Commented on Moving my Catalyst Apps from Apache/FCGI to Nginx/Starman
    Nope. Benchmark and other comparison metrics sure would be nice to have. Perhaps if I find some time in 2013 I will put something together. But there might be some data available in the internets. http://www.wikivs.com/wiki/Apache_vs_nginx https://timmehosting.de/blog/benchmark-nginx-12-vs-apache-24-statische-dateien-drupal-typo3 And this just...
  • Commented on 17.4% of CPAN uploads have no license in the META files
    Your post raises the question why one should add a license to a module?...
  • Commented on Moving my Catalyst Apps from Apache/FCGI to Nginx/Starman
    I run debian wheezy and usually have a perlbrew perl for each user. (user 'www-data' for production, user 'david' for development) The perls are "managed" with git. This allows for easy undo if an update introduces problems. I do not...
  • Posted Moving my Catalyst Apps from Apache/FCGI to Nginx/Starman to davewood

    Recently I had to move all my projects to a new server and decided to give Nginx and Starman a chance.

    The Nginx config is rather simple.

    my Catalyst Application is located at /var/www/MyApp

    server {
        listen 80;
        server_name myapp.at *.myap…
  • Commented on Using jqGrid with Catalyst: Tutorial with Examples for Newbies
    very nice writeup. thank you very much. For anyone looking for tools to get webaccess to your DB fast there also is Catalyst::Plugin::AutoCRUD....
  • Posted CPAN ratings to davewood

    There are a couple of indicators I take into account when evaluating perl modules.

    • Update frequency and date of last update
    • Usually I look at the source and check for existance of test files.
    • The next step would be to check cpan…
Subscribe to feed Recent Actions from davewood

  • JackTX commented on Using jqGrid with Catalyst: Tutorial with Examples for Newbies

    Thank you for your blog it was very helpful. I encountered a couple of problems some were mine somewhere changes over time. jqGrid did not seem to be able to use jquery-1.9 or above. So, I downgraded.

  • Verify that the user that connects to the DB can access the DB on the mysql server. For some reason, I could use the mysql command line to reach the server with my root user, but I could not get it to work with the code. I used another user with the code and it worked fine. I still don't know why I had to change users.

  • Make sure that you have all of the …
  • Ether commented on Removing Boilerplate with Import::Into
  • Mike Friedman commented on Removing Boilerplate with Import::Into

    Even with experimental.pm you would still have to include the declaration in every file. Since Import::Into lets me declare everything just once, it didn't seem worth it to pull in an extra CPAN dependency to do the equivalent of use feature; no warnings.

  • Olivier Mengué (dolmen) commented on Removing Boilerplate with Import::Into

    @davewood: use experimental qw< signatures postderef >;

  • Davs commented on Asynchronous Task Distribution with AnyEvent and ZeroMQ

    No, on the contrary, I like it. Right now i have a similar setup, but the workers are themselves looking into the DB (locking the table while doing that) for jobs to execute.. I guess it won't scale very well..but your one-server-many-workers approach is very interesting and I'll probably implement it as soon as we hit performance issues.

    Subscribe to feed Responses to Comments from davewood

  • About blogs.perl.org

    blogs.perl.org is a common blogging platform for the Perl community. Written in Perl and offering the modern features you’ve come to expect in blog platforms, the site is run by Dave Cross and Aaron Crane, with a design donated by Six Apart, Ltd.