Programming the Web with High-Level Programming Languages
Many modern programs provide operating system-style services to extension modules. A Web server, for instance, behaves like a simple OS kernel. It invokes programs that dynamically generate Web pages and manages their resource consumption. Most Web servers, however, rely on conventional operating systems to provide these services. As a result, the solutions are inefficient, and impose a serious overhead on the programmer of dynamic extensions.
In this paper, we show that a Web server implemented in a suitably extended high-level programming language overcomes all these problems. First, building a server in such a language is straightforward. Second, the server delivers static content at performance levels comparable to a conventional server. Third, the Web server delivers dynamic content at a much higher rate than a conventional server, which is important because a significant portion of Web content is now dynamically generated. Finally, the server provides programming mechanisms for the dynamic generation of Web content that are difficult to support in a conventional server architecture.
KeywordsContent Generator Dynamic Content Common Gateway Interface Conventional Server Underlie Operating System
- 1.Acme Labs. Web server comparisons. http://www.acme.com/software/thttpd/benchmarks.html.
- 2.Apache. http://www.apache.org/.
- 3.Arlitt, M. and C. Williamson. Web server workload characterization: the search for invariants. In ACM SIGMETRICS, 1996.Google Scholar
- 4.Aron, M., D. Sanders, P. Druschel and W. Zwaenepoel. Scalable content-aware request distribution in cluster-based network servers. In Annual Usenix Technical Conference, 2000. San Diego, CA.Google Scholar
- 5.Banga, G. and P. Druschel. Measuring the capacity of a web server. In USENIX Symposium on Internet Technologies and Systems, December 1997.Google Scholar
- 6.Banga, G., P. Druschel and J. Mogul. Resource containers: A new facility for resource management in server systems. In Third Symposium on Operating System Design and Implementation, February 1999.Google Scholar
- 7.BrightPlanet. DeepWeb. http://www.completeplanet.com/Tutorials/DeepWeb/.
- 8.Coward, D. Java servlet specification version 2.3, October 2000. http://java.sun.com/products/servlet/index.html.
- 9.Flanagan, C., M. Flatt, S. Krishnamurthi, S. Weirich and M. Felleisen. Catching bugs in the web of program invariants. In ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 23–32, May 1996.Google Scholar
- 10.Flatt, M. and M. Felleisen. Cool modules for HOT languages. In ACM SIGPLAN Conference on Programming Language Design and Implementation, 1998.Google Scholar
- 11.Flatt, M., R. B. Findler, S. Krishnamurthi and M. Felleisen. Programming languages as operating systems (or, Revenge of the Son of the Lisp Machine). In ACM SIGPLAN International Conference on Functional Programming, pages 138–147, September 1999.Google Scholar
- 12.Ford, B., G. Back, G. Benson, J. Lepreau, A. Lin and O. Shivers. The Flux OSKit: A Substrate for OS and Language Research. In 16th ACM Symposium on Operating Systems Principles, October 1997. Saint-Malo, France.Google Scholar
- 13.Gamma, E., R. Helm, R. Johnson and J. Vlissides. Design Patterns, Elements of Reusable Object-Oriented Software. Addison-Wesley, 1994.Google Scholar
- 14.Hughes, J. Generalising monads to arrows, 1998.Google Scholar
- 15.Kelsey, R., W. Clinger and J. Rees. Revised5 report on the algorithmic language Scheme. ACM SIGPLAN Notices, 33(9), October 1998.Google Scholar
- 16.Krishnamurthi, S. Linguistic Reuse. PhD thesis, Rice University, 2001.Google Scholar
- 17.Microsoft Corporation. http://www.microsoft.com/net/.
- 18.Mogul, J. The case for persistent connection HTTP. In ACM SIGCOMM, 1995.Google Scholar
- 19.NCSA. The common gateway interface. http://hoohoo.ncsa.uiuc.edu/cgi/.
- 20.Open Market, Inc. FastCGI specification. http://www.fastcgi.com/.
- 21.Pai, V. S., P. Druschel and W. Zwaenepoel. IO-lite: A unified I/O buffering and caching system. In Third Symposium on Operating Systems Design and Implementation, February 1999.Google Scholar
- 22.Pitman, K. Special forms in lisp. In Conference Record of the Lisp Conference, August 1980. Stanford University.Google Scholar
- 23.Queinnec, C. The influence of browsers on evaluators or, continuations to program web servers. In ACM SIGPLAN International Conference on Functional Programming, 2000.Google Scholar
- 24.Spoonhower, D., G. Czajkowski, C. Hawblitzel, C.-C. Chang, D. Hu and T. von Eicken. Design and evaluation of an extensible web and telephony server based on the J-Kernel. Technical report, Department of Computer Science, Cornell University, 1998.Google Scholar
- 25.Thau, R. Design considerations for the Apache server API. In Fifth International World Wide Web Conference, May 1996.Google Scholar