Saké Mail features Saké documentation download purchase

Memory resident architecture

Web-based applications that function via CGI must be initialized from the ground-up every single time they are invoked. Every single time a web user clicks "submit", the web server must locate the application file, load it into memory in a heavyweight process, and initialize the application. (See Figure 1.)


Figure 1: A web-based application that uses CGI must create a new process on the host server for each page access from each user.

If the CGI application is written in Perl, the most common language for web application development, then the Perl interpreter must itself be loaded before the CGI application can be interpreted. The application must then load any initialization files that it needs, load any HTML interface template files that it needs, and then finally it can produce output via a pipe to the web server process. (See Figure 2.)


Figure 2: A Perl/CGI application must load and initialize the Perl interpreter, which must then load and initialize the actual CGI script.

This archaic mechanism puts tremendous strain on a web server's resources, even if the server only has a handful of users. Both CPU time and memory are consumed in inordinate amounts by this process.

A Saké application, on the other hand, is loaded a single time. Once the application has initialized, it becomes a part of the web server itself. Requests to Saké applications are spawned instantly in lightweight threads instead of heavy processes. Since the Saké application has performed all of its initialization long before the user accesses a page, the application can focus immediately on producing output. (See Figure 3.)


Figure 3: A Saké application acts as a part of the web server instead of as a separate process, and handles user requests in lightweight threads instead of heavy processes.

This streamlined approach cuts response times dramatically and lowers overall server load. Since far fewer resources are needed to service each individual user, Saké applications can service many times the number of users that traditional CGI applications can.