4 ms·
Flickr-like ticket server in ~100 lines of Perl (~8k tickets/s)
- marcusramberg 15y agoVery nice!
- jzawodn 15y agoHmm. I see "ENGINE=MyISAM" in the code. Nowadays I can't stomach using MyISAM for anything I care about not having some sort of corruption. Given sufficient time and scale, I've seen far too many issues with MyISAM. It'd be great to be able to specify that in the code so the user can opt for InnoDB (or engine of their choice). Perhaps a pull request is in my future...
- ginzasparrow 15y agoYou could've cloned the repo and started hacking on it in the time it took you to write that.
- jzawodn 15y agoAgreed. https://github.com/cosimo/TicketServer/pulls https://github.com/cosimo/TicketServer/pulls
- ginzasparrow 15y agoDamn you for undermining my snarky comment. Cheers.
- cosimo 15y agoMerged too.
- cosimo 15y agoI seem to remember that the MySQL behavior this is based on will only work with the MyISAM engine. In fact, Flickr is using MyISAM for this, IIRC. Anyway, your changes make perfect sense, so I merged them. Will try what happens to the test suite with InnoDB.
- cosimo 15y agoActually it works just fine ;)
- Zimahl 15y agoI wasn't familiar with what 'Flickr tickets' were so I did a little Google-fu and found this excellent explanation: http://code.flickr.com/blog/2010/02/08/ticket-servers-distributed-unique-primary-keys-on-the-cheap/ http://code.flickr.com/blog/2010/02/08/ticket-servers-distri...
- cosimo 15y agoI had included a link to this post in the README file.