Abstract
The PLT Scheme Web Server uses continuations to enable a natural, console-like program development style. We describe the implementation of the server and its use in the development of an application for managing conference paper reviews. In the process of developing this application, we encountered subtle forms of interaction not directly addressed by using continuations. We discuss these subtleties and offer solutions that have been successfully deployed in our application. Finally, we present some details on the server’s performance, which is comparable to that of the widely-used Apache Web server.
Similar content being viewed by others
References
Amdahl, G.M.: Validity of the single-processor approach to achieving large scale computing capabilities. In: AFIPS Conference Proceedings, vol. 30, pp. 483–485 (1967)
Aron, M., Sanders, D., Druschel, P., Zwaenepoel, W.: Scalable content-aware request distribution in cluster-based network servers. In: USENIX Annual Technical Conference, pp. 323–336 (2000)
Banga, G., Druschel, P.: Measuring the capacity of a Web server under realistic loads. World Wide Web 2(1–2), 69–83 (1999)
Banga, G., Druschel, P., Mogul, J.: Resource containers: a new facility for resource management in server systems. In: Symposium on Operating System Design and Implementation, pp. 45–58 (1999)
Brabrand, C., Møller, A., Schwartzbach, M.I.: The <bigwig> project. ACM Trans. Internet Technol. 2(2), 79–114 (2002)
Bray, T., Paoli, J., Sperberg-McQueen, C.: Extensible markup language XML. Technical Report, World Wide Web Consortium. Version 1.0 (1998)
Cejtin, H., Jagannathan, S., Kelsey, R.: Higher-order distributed objects. ACM Trans. Program. Lang. Syst. 17(5), 704–739 (1995)
Christensen, A.S., Møller, A., Schwartzbach, M.I.: Extending Java for high-level Web service construction. ACM Trans. Program. Lang. Syst. 25(6), 814–875 (2003)
Coward, D.: Java Servlet Specification Version 2.3 (2000). http://java.sun.com/products/servlet/index.html
Danvy, O.: Back to direct style. Sci. Comput. Program. 22(3), 183–195 (1994)
Ducasse, S., Lienhard, A., Renggli, L.: Seaside—a multiple control flow Web application framework. In: European Smalltalk User Group—Research Track (2004)
Felleisen, M.: Developing interactive web programs. In: Jeuring, J., Peyton Jones, S. (eds.) Advanced Functional Programming School. Lecture Notes in Computer Science, vol. 2638, pp. 100–128. Springer, New York (2003)
Findler, R.B., Clements, J., Flanagan, C., Flatt, M., Krishnamurthi, S., Steckler, P., Felleisen, M.: DrScheme: a programming environment for scheme. J. Funct. Program. 12(2), 159–182 (2002)
Fischer, M.J.: Lambda calculus schemata. ACM SIGPLAN Not. 7(1), 104–109 (1972). In the ACM Conference on Proving Assertions about Programs
Fisler, K., Krishnamurthi, S., Meyerovich, L.A., Tschantz, M.C.: Verification and change-impact analysis of access-control policies. In: International Conference on Software Engineering, pp. 196–205 (2005)
Flatt, M., Felleisen, M.: Cool modules for HOT languages. In: ACM SIGPLAN Conference on Programming Language Design and Implementation, pp. 236–248 (1998)
Flatt, M., Findler, R.B., Krishnamurthi, S., Felleisen, M.: Programming languages as operating systems (or, revenge of the son of the lisp machine). In: ACM SIGPLAN International Conference on Functional Programming, pp. 138–147 (1999)
Graham, P.: Lisp for Web-based applications (2001). http://www.paulgraham.com/lwba.html
Graunke, P.T., Krishnamurthi, S., van der Hoeven, S., Felleisen, M.: Programming the Web with high-level programming languages. In: European Symposium on Programming, pp. 122–136 (2001)
Herman, D.: WebPostRedirectGet (2005). http://schemecookbook.org/Cookbook/WebPostRedirectGet
Hopkins, P.W.: Enabling complex UI in Web applications with send/suspend/dispatch. In: Scheme Workshop, pp. 53–58 (2003)
Hughes, J.: Generalising monads to arrows. Sci. Comput. Program. 37(1–3), 67–111 (2000)
Kiselyov, O.: SXML specification. ACM SIGPLAN Not. 37(6), 52–58 (2002)
Krishnamurthi, S.: The Continue server. In: Symposium on the Practical Aspects of Declarative Languages, pp. 2–16 (2003)
Krishnamurthi, S., Findler, R.B., Graunke, P., Felleisen, M.: Modeling Web interactions and errors. In: Goldin, D., Smolka, S.A., Wegner, P. (eds.) Interactive Computation: The New Paradigm, pp. 255–276. Springer (2006)
Krishnamurthi, S., Gray, K.E., Graunke, P.T.: Transformation-by-example for XML. In: Symposium on the Practical Aspects of Declarative Languages, pp. 249–262 (2000)
Kristol, D., Montulli, L.: HTTP state management mechanism. IETF RFC 2965 (2000). http://www.ietf.org/rfc/rfc2965.txt
Ladd, D.A., Ramming, J.C.: Programming the Web: an application-oriented language for hypermedia service programming. In: International World Wide Web Conference (1995)
Lawall, J.L., Friedman, D.P.: Towards leakage containment. Technical Report TR-346, Indiana University, Bloomington, IN, USA (1992)
Matthews, J., Findler, R.B., Graunke, P.T., Krishnamurthi, S., Felleisen, M.: Automatically restructuring programs for the Web. Autom. Softw. Eng. J. 11(4), 337–364 (2004)
Meijer, E., van Velzen, D.: Haskell server pages—functional programming and the battle for the middle tier. Electron. Notes Theor. Comput. Sci. 41(1). Proceedings of the ACM SIGPLAN Haskell Workshop (2000)
Miller, S.G.: SISC: a complete scheme interpreter in Java (2003). http://sisc.sourceforge.net/sisc.pdf
NCSA, The common gateway interface. http://hoohoo.ncsa.uiuc.edu/cgi/
Nørmark, K.: Web programming in scheme with LAML. J. Funct. Program. 15(1), 53–65 (2005)
Open Market, Inc., FastCGI specification. http://www.fastcgi.com/
Pai, V.S., Druschel, P., Zwaenepoel, W.: Flash: an efficient and portable Web server. In: USENIX Annual Technical Conference, pp. 199–212 (1999)
Pai, V.S., Druschel, P., Zwaenepoel, W.: IO-Lite: a unified I/O buffering and caching system. In: Third Symposium on Operating Systems Design and Implementation, pp. 15–28 (1999)
Pitman, K.: Special forms in lisp. In: Conference Record of the Lisp Conference, pp. 179–187 (1980)
Queinnec, C.: The influence of browsers on evaluators or, continuations to program Web servers. In: ACM SIGPLAN International Conference on Functional Programming, pp. 23–33 (2000)
Queinnec, C.: Continuations and Web servers. Higher-Order Symb. Comput. 17(4), 277–295 (2004)
Spoonhower, D., Czajkowski, G., Hawblitzel, C., Chang, C.-C., Hu, D., von Eicken, T.: Design and evaluation of an extensible Web and telephony server based on the J-kernel. Technical Report TR98-1715, Department of Computer Science, Cornell University (1998)
Sun Microsystems, Inc.: JSR154—Java™Servlet 2.4 specification (2003). http://jcp.org/aboutJava/communityprocess/final/jsr154/
Thau, R.: Design considerations for the Apache server API. In: Fifth International World Wide Web Conference, pp. 1113–1122 (1996)
The Apache Cocoon Project: User documentation. The Apache Software Foundation (2005)
The Apache Software Foundation. http://www.apache.org/
The Apache Struts Project: The struts user’s guide. The Apache Software Foundation (2005)
Thiemann, P.: WASH/CGI: server-side Web scripting with sessions and typed, compositional forms. In: Symposium on the Practical Aspects of Declarative Languages, pp. 192–208 (2002)
Wallace, M., Runciman, C.: Haskell and XML: generic document processing combinators vs. type-based translation. In: ACM SIGPLAN International Conference on Functional Programming, pp. 148–159 (1999)
World Wide Web Consortium: XHTML 1.0: the extensible hypertext markup language (2002). http://www.w3.org/TR/xhtml1/
Author information
Authors and Affiliations
Corresponding author
Additional information
This research is partially supported by multiple NSF grants. Preliminary versions of parts of this material have appeared in print (Lecture Notes in Computer Science, vol. 2638, pp. 100–128, 2003; European Symposium on Programming, pp. 122–136, 2001; Scheme Workshop, pp. 53–58, 2003; Symposium on the Practical Aspects of Declarative Languages, pp. 2–16, 2003).
P.W. Hopkins’ current affiliation: Google, Inc.
P.T. Graunke’s current affiliation: Galois Connections, Inc.
G. Pettyjohn’s current affiliation: Turbine, Inc.
Rights and permissions
About this article
Cite this article
Krishnamurthi, S., Hopkins, P.W., McCarthy, J. et al. Implementation and use of the PLT scheme Web server. Higher-Order Symb Comput 20, 431–460 (2007). https://doi.org/10.1007/s10990-007-9008-y
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10990-007-9008-y