martedì 24 marzo 2009

Why FastCGIs?

I'm developing a site largely based on web services.
My first approach was using ASP.NET and C# as the current version of the site, but with a bit of json in addition.

Using WCF is the better way to implement a json web service in ASP.NET.

Developing a beta version of the site wasn't too hard because Visual Studio is a great IDE (the best IDE in the Universe IMHO) and C# is an amazing language for third millennium people, but at the end of this first easy stuff I encountered some problems: permission denies deploying the site on the server of my provider, unsatisfactory response time and some debugging difficulties.
At this point a technology change was mandatory.

The priority for this new version of the site was the 'user experience' and 'user experience' without speed is nothing, so which is the fastest technology for dynamics web sites? Easy: FastCGIs written in C language (after assembly, of course, and when I was a teenager I spent a lot of days - and nights - at the keyboard of my ZX Spectrum experimenting the fascinating world of Z80 coding, but at the moment I want to conserve what remains of my brain for as many years as possible). And which is the fastest web server supporting FastCGI? Lighttpd, of course. And why not a bit of SQLite , all running on an Ubuntu server distribution, rigorously text-based?

So the main ingredients of the "back2.c" recipe are:

Ubuntu Server 8.10
Lighttpd
Gnu C Compiler
FastCGI libraries

SQLite library

Follow me in my learning experiments, in the next post I will show you how easy it is to install an Ubuntu server: this is the first step to the "Hello world and over" experience.

P.S.: Thanks to R.D.O. for the joke of the logo :-)

References:

giovedì 1 gennaio 2009

Download of FLUS

If you want to try FastCGIs there is an easy solution without changing your operating system, but only installing a virtual machine where you can run a guest environment provided with everything required for experiment FastCGIs. A good virtualization software is Sun VirtualBox that you can freely download here. As operating system I chosen Ubuntu Server. To make it easier to install I prepared FLUS, an OVF image ready to use with Sun VirtualBox (at the moment ver. 3.08) that you can download here (295 M).

Download FLUS

FLUS 1.0 contains:

Ubuntu Server 8.04.3 TSL i386 (32 bit)
OpenSSH
Lighttpd 1.4.19
GCC 4.2.4
SQLite 2.8.17
FastCGI 2.4.0
All the samples of the blog (into /home/back2c directory)

To login use the user back2c (password back2c), then to enter in the root mode use sudo –i and enter the same password again.

Only one note: after importing of the image and before starting it remember to enable PAE/NX option in Settings/System/Processor panel of VirtualBox: