Now that I am starting to play a bigger and more formal Perl advocacy role via my company Shutterstock (more on that later) I get quite a few questions from people that are intermediate or advanced programmers who happen to be Perl illiterate (but desiring to learn). As a result these questions go beyond the basics of Perl syntax. I know how I would answer them, but I thought I'd try to occassionally share some really good questions with the community and hopefully glean some additional advice. I figure if I am being asked these questions, perhaps they are on the mind of many others and hopefully we can help clear up some confusion. So, here's the inaugural Newbie corner question:
What is the best way to do long polling / realtime web applications programming in Perl? Can this be integrated into some of the more populate web development frameworks such as Catalyst?
I get asked this a lot from people who read a lot of Node.js tutorials. Here's my basic answer.
I personally would build something using Plack + Twiggy + Pocket.IO since that seems to have pretty good documentation and fills the general requirement. However there is also Web::Hippie (which I haven't used) and also Mojolicious seems to have this built in.
Right now I don't see an easy way to integrate this type of application into my Catalyst based websites, since I can't find anything that does this (in the way that say REST is integrated into Catalyst via Catalyst::Action::REST). However since Catalyst is now Plack based, there is no reason why you couldn't combine a main application written in Catalyst with something written using Pocket.IO (or some other technology) via Plack's excellent builder tools.
I'll give a more detailed approach in a later part two, but I'd love to hear from the rest of the Perl experts out there first! How would you build such an application? What do you all thing would be a good example application that could be shared with experienced developers who happen to be new to Perl?