MySQL::NameLocker

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 Group

    MySQL::NameLocker - Presentation Transcript

    1. Application Level Lock by MySQL with MoFedge. Tokuhiro Matsuno 2007-01-26(Fri) 社内勉強会
    2. Bad Flow Validation Add Validation Add Session1 Session2 DB DOUBLE!
    3. GET_LOCK/RELEASE_LOCK
      • SELECT GET_LOCK(‘HOGE’, 10);
        • 10 is timeout.
      • SELECT RELEASE_LOCK(‘HOGE’);
    4. Good Flow Validation Add Redirect Session1 Session2 DB Lock Lock another page
    5. How to lock.
      • use Mysql::NameLocker.
    6. Mysql::NameLocker
      • use Mysql::NameLocker;
      • sub valid_add {
      • # GET_LOCK()
        • $self->{locker} = Mysql::Namelocker->new(
          • $self->model->store->dbh,
          • $self->session->session_id,
          • $self->config->lock_timeout,
        • );
        • unless ($self->{locker}) {
        • $self->validator->set_error(‘lock’ => ‘failed’);
        • }
      • }
    7. Mysql::NameLocker (2)
      • sub post_dispatch_add {
      • # snip ...
      • undef $self->{locker}; # RELEASE_LOCK()
      • }
    8. SEE ALSO
      • CVS Repository - markup - SourceForge: sledge/Sledge/lib/Sledge/Session/MySQL.pm
      • http://cvs.sourceforge.jp/cgi-bin/viewcvs.cgi/sledge/Sledge/lib/Sledge/Session/MySQL.pm?view=markup

    + tokuhiromtokuhirom, 3 years ago

    custom

    2020 views, 0 favs, 0 embeds more stats

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 2020
      • 2020 on SlideShare
      • 0 from embeds
    • Comments 0
    • Favorites 0
    • Downloads 0
    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

    Tags

    Groups / Events