Skip to main content
Log in

Implementing Metcast in Scheme

  • Published:
Higher-Order and Symbolic Computation

Abstract

This paper describes the experience of implementing a core component of an operationally deployed large distributed system in Scheme. Metcast is a request-reply and subscription system for the dissemination of real-time weather information. The system stores vast amounts of weather observation reports, forecasts, gridded data produced by weather models, and satellite imagery. A Metcast server delivers a subset of these data in response to a query formulated in a domain-specific declarative language. Decoders of World Meteorological Organization's data feed, the Metcast application server, XML encoders and decoders, auxiliary and monitoring CGI scripts are all written in a mostly pure functional subset of Scheme. This paper describes three examples that demonstrate the benefits of our choice of the implementation language: parsing of the data feed; XML transformations and Web services; a modular interpreter for the extensible and expressive request language. We also discuss general-purpose extensions to Scheme developed in the project.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. American National Standard for Information Systems. Programming Languages. Forth. Document X3.215-1994. March 24, 1994.

  2. Cerami, E. Web Services Essentials. Distributed Applications with XML-RPC, SOAP, UDDI & WSDL, O'Reilly & Associates, 2002.

  3. Feeley, M. Gambit Scheme System, August 2002. http://www.iro.umontreal.ca/~gambit/

  4. Kiselyov, O. A delegation language to request weather products and a scheme of its interpretation. In Proc. third ACM SIGPLAN Int. Conf. on Functional Programming (ICFP'98), Baltimore, Maryland, Sep. 27–29 1998, p. 343.

  5. Kiselyov, O. AND-LET*: an AND with local bindings, a guarded LET* special form. Scheme Request for Implementation: SRFI-2. March 1, 1999. http://srfi.schemers.org/srfi-2/

  6. Kiselyov, O. File, directory, network, and other OS/POSIX interfaces. Ports and the enhanced I/O. August 2001. http://pobox.com/~oleg/ftp/Scheme/OS-interf.html#enhanced-port-io

  7. Kiselyov, O. Weather Observation Definition Format. September 18, 2002. http://www.metnet.navy.mil/Metcast/XML/OMF.html

  8. Kiselyov, O. SXML specification. ACM SIGPLAN Notices, 37(6) (2002) 52–58. http://pobox.com/~oleg/ftp/Scheme/SXML.html

  9. Kiselyov, O. A better XML parser through functional programming. Proc. PADL2002: Practical Aspects of Declarative Languages, 4th International Symposium. Portland, OR, U.S.A., January 19–20, 2002. In Lecture Notes in Computer Science, Vol. 2257. Springer-Verlag, Berlin Heidelberg New York, 2002, pp. 209–224.

  10. Kiselyov, O. and Lisovsky, K. XML, XPath, XSLT implementations as SXML, SXPath, and SXSLT. In Proc. International Lisp Conference, ILC 2002: San Francisco, CA, October 27–31, 2002. http://pobox.com/~oleg/ftp/papers/SXs.pdf; http://pobox.com/~oleg/ftp/papers/SXs-talk.pdf

  11. Kiselyov, O. Distributing weather products through an HTTP pipe. February 20, 2003. http://www.metnet.navy.mil/Metcast/http://pobox.com/~oleg/JMV-TNG/

  12. Kiselyov, O. Metcast Table of Contents (MTOC). May 22, 2003. http://www.metnet.navy.mil/Metcast/XML/MTOC.html

  13. Kiselyov, O. Scheme Hash. An archive of Scheme code. April 4, 2003. http://pobox.com/~oleg/ftp/Scheme/

  14. Kiselyov, O. and Krishnamurthi, S. SXSLT: Manipulation language for XML. In Proc. PADL2003: Practical aspects of declarative languages, 5th international symposium. New Orleans, LA, U.S.A., January 13–14, 2003. In Lecture Notes in Computer Science, Vol. 2562. Springer-Verlag, Berlin Heidelberg, New York (2003) 256–272.

  15. Landin, P.J. The next 700 programming languages. Communications of the ACM, 9(3) (1966) 157–166.

    Article  MATH  Google Scholar 

  16. McKusick, M.K., Bostic, K., Karels, M.J., and Quarterman, J.S. The Design and Implementation of the 4.4BSD Operating System. Addison-Wesley Longman, Inc. 1996.

  17. Moertel, T. XSLT, Perl, Haskell, & a word on language design. Posted on kuro5hin.org on January 15, 2002.http://www.kuro5hin.org/story/2002/1/15/1562/95011

  18. National Weather Service. Office of the Federal Coordinator for Meteorology. Federal Meteorological Handbook No. 1 (FMH-1), “Surface Weather Observations and Reports”. Fifth ed., December 1995.

  19. Paakki, J. Attribute grammar paradigms—a high-level methodology in language implementation. ACM Computing Surveys, 27(2) (1995) 196–255.

    Article  Google Scholar 

  20. S-exp-based XML parsing, query, conversion. A SourceForge Project. http://ssax.sourceforge.net/

  21. Serrano, M. Bigloo Scheme implementation. July 2003. http://www-sop.inria.fr/mimosa/fp/Bigloo/bigloo.html

  22. Sitaram, D. pregexp: Portable Regular Expressions for Scheme and Common Lisp. Version 1e9. February 5, 2003. http://www.ccs.neu.edu/home/dorai/pregexp/pregexp.html

  23. Swierstra, S.D. Combinator parsers: From toys to tools. Proc. 2000 ACM SIGPLAN Haskell Workshop, Electronic Notes in Theoretical Computer Science, volume 41.1, August 2001.

  24. World Wide Web Consortium. XML Path Language (XPath). Version 1.0. W3C Recommendation. November 16, 1999. http://www.w3.org/TR/xpath

  25. World Wide Web Consortium. XSL Transformations (XSLT). Version 1.0. W3C Recommendation. November 16, 1999. http://www.w3.org/TR/xslt

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Oleg Kiselyov.

Additional information

This is an extended version of a paper presented at the Workshop on Scheme and Functional Programming 2000, sponsored by ACM SIGPLAN. September 17, 2000. Montreal, Canada.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Kiselyov, O. Implementing Metcast in Scheme. Higher-Order Symb Comput 18, 355–370 (2005). https://doi.org/10.1007/s10990-005-4880-9

Download citation

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10990-005-4880-9

Keywords

Navigation