MetaOCaml server pages: Web publishing as staged computation

被引:0
|
作者
League, Christopher [1 ]
机构
[1] Long Isl Univ, Brooklyn, NY 11201 USA
关键词
multi-stage programming; web services;
D O I
10.1016/j.scico.2006.05.004
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Modem dynamic web services are really computer programs. Some parts of these programs run off-line, others run server-side on each request, and still others run within the browser. In other words, web publishing is staged computation, either for better performance, or because certain resources are available in one stage but not another. Unfortunately, the various web programming languages make it difficult to spread computation over more than one stage. This is a tremendous opportunity for multi-stage languages in general, and for MetaOCaml in particular. We present the design of MetaOCan-fl Server Pages. Unlike other languages in its genre, the embedded MetaOCaml code blocks may be annotated with staging information, so that the programmer may safely and precisely control which computation occurs in which stage. A prototype web server, written in OCaml, supports web sites with both static and dynamic content. We provide several sample programs and demonstrate the performance gains won using multi-stage programming. (c) 2006 Elsevier B.V. All rights reserved.
引用
收藏
页码:66 / 84
页数:19
相关论文
共 50 条