http://www.perlmonks.org?node_id=772618


in reply to Perl 6 and Web Development

Sorry to go off here, but I think you're way off-base on some of these. I'm a member of the Apache Software Foundation, so chalk this up to bias if you like.

mod_perl

Your complaint is that you can't find a cheap enough ISP. How cheap is cheap enough? You can get a virtual server dirt cheap these days. You can run on EC2. Or, if it's mod_perl itself that you don't like and not the cost of hosting, you can run FastCGI, which is widely available on cheap ISPs. There is no ISP problem for Perl5.

Also, mod_perlite offers nothing interesting beyond mod_perl, and the idea that it will become ubiquitous on ISPs makes no sense. I've gone into the details on this before.

Perl Web Pages

I think it's pretty clear by now that there will never be one templating system to rule them all, in Perl or any other language. There are intelligent arguments to be made on both sides of the mini-language vs. in-line perl debate and quality tools available for both. Thankfully most people don't write new ones and put them on CPAN anymore, but I don't think there will ever be just one.

And it's not clear to me what you dislike about the current crop of web dev systems (reading requests, managing sessions, etc.).

Perl6 Web Server

Do you know how hard it is to write a decent HTTP server? Never mind the performance question -- just try to get all the details of HTTP and the many random clients out there correct, let alone fast, and you'll be busy for years. Then consider that web servers are one of the biggest security concerns ever, and think about how much time has been invested in securing the code in popular servers like Apache. It's not perl that's the problem here but rather the amount of work involved in getting this stuff right. Starting from scratch is a bad idea.

WSDL

Hey, we agree on something! I'm more concerned about reading WSDL than writing it, but it would certainly help. SOAP clients are far too painful in Perl right now.

Replies are listed 'Best First'.
Re^2: Perl 6 and Web Development
by jdrago_999 (Hermit) on Jun 18, 2009 at 04:22 UTC

    Perrin you definitely get my ++ here.

    mod_perl

    Maybe FastCGI is the way to go. Did I miss the bus on that? Is it the way of the future with regards to running Perl6 on the web?

    And it's not about the price (for me anyways). It's about the widespread, default install base and availability. Perl6 might be the greatest thing since sliced bread but if you have to get root privileges to even get started, it will never catch on. At least not until Perl6 is installed by default on the most popular Linux distributions - which might not happen for at least another couple of years.

    Perl Web Pages

    The current crop of web dev systems are still in the stone ages. All of them without exception. Some may have moved ahead of the pack into the New Stone Age (with pottery and stick-figure paintings) but that's about it.

    Not to worry. I feel the same way about Ruby on Rails, PHP and ASP.Net (Vanilla, MVC and AJAX).

    I suppose the good news is that there is plenty of room for improvement. A Catalyst + Perl6 setup could be really slick. Add to that a Perl6 ORM layer and we're talking.

    I'd like to get hacking on something - mostly just for the sake of learning Perl6 while doing something that interests me.

    Perl6 Web Server

    Do you know how hard it is to write a decent HTTP server?

    It's been done in C at least a couple times. I'm sure it's possible in Perl. Just think of all the cool stuff you'll get:

    1. INSTANT street cred
    2. ????
    3. Profit!!!!!!!

    Seriously - yes writing a secure, high-performance http server is not something to be taken lightly. At least part of the security problems in the http servers written in C were simply because they were written in C. Assuming that "somebody else" who knows what they're doing has already made sure that Parrot is secure (or *will* make it secure), writing an http server in Perl6 means that we instantly can run it on anything Parrot is ported to.

    WSDL

    I was hoping 5 years ago that it would just *go away* but unfortunately we're stuck with it for the foreseeable future. Anything to make this a non-issue when integrating Perl systems with .Net or Java systems would be great.

      FastCGI is about as old as mod_perl, but it works and you can use it today on the majority of ISPs. This is something we can thank Ruby and PHP for pushing. The bigger issue for you is going to be getting Perl6 onto ISPs. That will probably not happen until vendors start bundling it.

      The thing about those C web servers is that most of them got going by cannibalizing an existing server, like Apache. Otherwise, the job would have been pretty daunting. It's not that people can't create a big new thing -- just look at Linux -- but they can't do it quickly from scratch with few people working on it. I think you'd be better off spending your energy elsewhere, since I don't see any real problem with the existing web server solutions. In fact, the only reason to write an HTTP server these days is if you have a real game-changing idea for it, e.g. the non-blocking I/O architecture that spawned the last crop of new servers.

        FastCGI is about as old as mod_perl, but it works and you can use it today on the majority of ISPs.

        Which would you recommend, FastCGI or mod_perl?

Re^2: Perl 6 and Web Development
by tilly (Archbishop) on Jun 18, 2009 at 20:31 UTC
    I'm going to have to beg to differ on the availability of low cost web serving for people who are just trying to get into it.

    EC 2 will give me a small Linux machine for 10 cents/hour. That's about $70/month and I need to be comfortable administering my own machine. If I go somewhere like http://www.westhost.com/web-hosting/index.html I can get a web host with FastCGI for $13/month. But I have to know to ask for it. (Writing a bunch of CGI then finding out that you really should rewrite it for mod_perl sucks. Yes, we know how to use Catalyst to write an application that will run either way, but beginners don't.) The same place offers me PHP for $9/month. If I go to http://www.hostmonster.com/ I can get up and running with PHP for $4/month.

    For a business those costs are trivial compared to the cost of hiring an employee who can do something with that site. But to a starving student who just wants to make their own cool site, those cost differences are very significant. And I am sure that those cost differences don't hurt PHP's adoption rates one bit.

      I just googled for virtual server hosting and found a ton of cheap stuff. RackSpace has servers with root access for $11/month + bandwidth. Spry.com has Linux VPS servers for $33/month. ServerPoint is $30/month. Those were just the first ads I clicked on. It's more than $4, but on the other hand I can't even get hostmonster.com to load. Anyone who isn't willing to pay $30/month to have a site probably doesn't need more than static pages and CGI, although they could certainly get perl with FastCGI for $6 or so from places like GoDaddy.

      I'm really not concerned about PHP. It's open source, many of my friends use it, and I don't have any problem with it succeeding.