[Perl] CGI Sucks - the next best thing? (18)

1 Name: #!/usr/bin/anonymous : 2009-11-12 03:09 ID:RDYCNaIm This thread was merged from the former /code/ board. You can view the archive here.

CGI sucks.

So, in order to make a super-duper fast "web application" big on the catchwords run fast enough that people don't moan about it, I find myself at a crossroad wondering which way to go. Any option if convincing enough will be fine (I'm a cowboy coder), so I want to see if anyone is awake enough to tell me what I should use.

Good News: Production grade, proven, lots of documentation, get the webserver control freak options.
Bad News: Morbidly obese worker processes even with "sharing" modules, need to separate dynamic from static greatly, restricted to Apache

Fast CGI
Good News: More than just Apache, Fast CGI servers need not be on the same machine
Bad News: Aparently Fast CGI is a pain in the ass for designing request flow.

Good News: Similarities to CGI make relearning easy,
Bad News: No simple way of separating speedy into a separate package - it's declared via shebang.

Good News: Apparently fast, very easy handling of control flow, can do things like XHR Long poll if webserver supports with ease.
Bad News: Very, very new. Has a wide range of support, but nothing is production stable.

What do you suggest?

2 Name: dmpk2k!hinhT6kz2E : 2009-11-12 05:54 ID:Heaven

> Similarities to CGI make relearning easy

Actually, that's FastCGI's forte too.

The only difference between a sanely written CGI and FastCGI program is the require and a while loop. CGI::Fast can even run as a normal CGI if needed. I ported Wakaba's captcha.pl from CGI to FastCGI with about five minutes of effort.

I don't know about the last two, but I prefer FastCGI over mod_perl. mod_perl is good if you need to dig into the guts of Apache, but most apps don't need that power.

Recently I've been playing with Mojo. I think it's nice.

3 Name: #!/usr/bin/anonymous : 2009-11-17 21:25 ID:VWXGFE8r


the fastest.

4 Name: #!/usr/bin/anonymous : 2009-11-18 07:32 ID:Heaven

Keep us updated on your progress coding a web application of any complexity in C++. If you stop posting we will assume you've suffered cerebral hemorrhage.

5 Name: dmpk2k!hinhT6kz2E : 2009-11-18 16:04 ID:Heaven

If you're going to rice out a webapp, use Ocsigen. 90% the performance for 10% the effort. :|

6 Name: #!/usr/bin/anonymous : 2009-11-21 10:14 ID:YO9nUvV0

Eh? Many Webapplications were done in C/C++ in the beginning. Also i did it and from time to time still do.
It's almost not any different to PHP. Also with CGI libs it's even more easier.

7 Name: dmpk2k!hinhT6kz2E : 2009-11-21 22:28 ID:Heaven

Just because you can do something does not make it a good idea. There's a reason why writing sites in C/C++ died out by 2000.

8 Name: #!/usr/bin/anonymous : 2009-11-26 23:24 ID:Heaven

The reason why writing sites in C/C++ was because of the excess of flexibility -- shared-webhosts would never get a good grip on resource abusers. (C can do anything, it's not easily limited/jailed to a purpose, unlike scripting languages.)

9 Name: #!/usr/bin/anonymous : 2009-11-27 06:00 ID:Heaven

You have no idea what a UNIX system can do. You can't play with the hard limits unless you've got permissions.

10 Name: #!/usr/bin/anonymous : 2009-11-30 21:47 ID:+sZV6d3C

That, and most hosting providers also provide a Perl option, which isn't much different from C/C++ in terms of limiting and securing. (except for the fact that system administrators can read the source, which isn't quite as easy for compiled languages)

what >>2 said. I design my webapps for FastCGI, but use plain old CGI when debugging or adding new features (the downside of FastCGI is that code is not automatically reloaded when you make changes to it). Writing code that works in both CGI and FastCGI environments is quite easy.

11 Name: KnowItAll : 2009-12-13 00:29 ID:MZrTDkpY

Ifn' yer a cowboy yud write your own embedded web server.

12 Name: KnowItAll : 2009-12-13 00:34 ID:MZrTDkpY

Or try this one: http://code.google.com/p/mongoose/ Its actually pretty good.

13 Name: #!/usr/bin/anonymous : 2010-02-17 14:02 ID:dz6XcKsB

You could always use flash/actionscript or JAVA (or haskell, clisp/scheme, python, ruby on rails..) :/

14 Name: #!/usr/bin/anonymous : 2010-03-07 11:28 ID:Heaven

Haskell is great! Flash needs to die though, seriously.

15 Name: #!/usr/bin/anonymous : 2010-03-19 23:17 ID:Heaven

I use server-side javascript for all of my web development needs.

16 Name: #!/usr/bin/anonymous : 2010-04-05 13:07 ID:Heaven


17 Post deleted.

18 Name: komik hentai dan komik xxx : 2016-11-10 03:13 ID:XxjbYA64

great and thx

Name: Link:
Leave these fields empty (spam trap):
More options...