Dancing with WebSockets
Dancer + WebSocket + AnyEvent + Twiggy
This in *not* a talk about doing a hello world in Dancer, as there are plenty of it. This is a real-life example of using Dancer to address a problem in an elegant and powerful way
At $job, we have cpan mirrors. We want them to stay a bit behind the real CPAN for stability, but we have a tool to update modules from the real CPAN to our mirrors. Cool.
I wanted to have a web interface to trigger it, and monitor the injection. This problem is not a typical one (blog, wiki, CRUD, etc). Here we have a long running operation that shall happen only one at a time, that generates logs to be displayed, with states that need keeping. In this regard, it's interesting to see how Dancer is versatile enough to address these situations with ease.
This talk details how I did that, the technology I used, and the full source code (which is quite short). I used Dancer + WebSocket + AnyEvent + Twiggy + some other stuff.
This talk doesn't require any particular knowledge beyond basic Perl, and very basic web server understanding.
Attended by: Damien Krotkine (dams), Jean Forget, Laurent Boivin (Elbeho), Alberto Simões (ambs), Thomas Klausner (domm), Stéphane Payrard (cognominal), Leo Lapworth (Ranguard), Lars Thegler (tagg), Gabor Szabo (szabgab), Abe Timmerman (abeltje), Nuno Carvalho (smash), Paul van Eldijk (pavel), Arjen Laarhoven, Dmitry Karasik (McFist), Norbert Csongrádi (Bert), Søren Lund (slu), Roman Baumer (rba), Serge Hoffmann (atcom), Erik Colson (ecocode), Sebastian Stellingwerff (webmind), Steffen Winkler (STEFFENW), Martin Becker (martin), Tobias Kremer (soulchild), Peter Makholm (brother), Francoise Dehinbo (franky), Alexander Hartmaier (abraxxa), Darko Obradovic, Eric Johnson (kablamo), Hans-Jürgen Schloz, Bogdan Lucaciu (zamolxes), Steffen Schwigon (renormalist), Tomas Doran (t0m), Lars Dɪᴇᴄᴋᴏᴡ 迪拉斯 (daxim), Marcel Grünauer (Marcel), Michael Jemmeson (michael), Dave Sherohman (dsheroh), Michele Beltrame (arthas), Nicolas Mendoza (nicomen), Luís Miguel Braga (microft), Henk van Oers (hvoers), Francisco Lourenço (fml), Carlos Juan Diaz (cjuan), Oskari Ojala (Okko), André Santos (andrefs), Tomasz Czepiel (tjmc), Andreas Vögele, Sawyer X, Wolfgang Pecho, Alex Timoshenko, Paolo Sinigaglia (psini), Dominic Humphries (djh), Ben Tisdall (bentis), Gunnar Koppel (wk), Yanick Champoux (Yanick), Snorri Briem, Lukáš Rampa, Vincent Bachelier (geistteufel), Nicolas Rochelemagne (atoomic), Farhad Fouladi, Steven Manschot (sman), Stefan O'Rear (sorear), Caio Romão, Alex Monney, Gerhard Raffius, Manfred Stock, Asbjørn Thegler (ath), Jean, Anders Melchiorsen, Jesper Dalberg, Tudor Crisan,