Higher-Order and Symbolic Computation

, Volume 18, Issue 3–4, pp 355–370

Implementing Metcast in Scheme

Article
  • 24 Downloads

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.

Keywords

applications and experience with symbolic computing weather observations WMO application server XML SXML Scheme 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    American National Standard for Information Systems. Programming Languages. Forth. Document X3.215-1994. March 24, 1994.Google Scholar
  2. 2.
    Cerami, E. Web Services Essentials. Distributed Applications with XML-RPC, SOAP, UDDI & WSDL, O'Reilly & Associates, 2002.Google Scholar
  3. 3.
    Feeley, M. Gambit Scheme System, August 2002. http://www.iro.umontreal.ca/~gambit/
  4. 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.Google Scholar
  5. 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. 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. 7.
    Kiselyov, O. Weather Observation Definition Format. September 18, 2002. http://www.metnet.navy.mil/Metcast/XML/OMF.html
  8. 8.
    Kiselyov, O. SXML specification. ACM SIGPLAN Notices, 37(6) (2002) 52–58. http://pobox.com/~oleg/ftp/Scheme/SXML.html
  9. 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.Google Scholar
  10. 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. 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. 12.
    Kiselyov, O. Metcast Table of Contents (MTOC). May 22, 2003. http://www.metnet.navy.mil/Metcast/XML/MTOC.html
  13. 13.
    Kiselyov, O. Scheme Hash. An archive of Scheme code. April 4, 2003. http://pobox.com/~oleg/ftp/Scheme/
  14. 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.Google Scholar
  15. 15.
    Landin, P.J. The next 700 programming languages. Communications of the ACM, 9(3) (1966) 157–166.CrossRefMATHGoogle Scholar
  16. 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.Google Scholar
  17. 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. 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.Google Scholar
  19. 19.
    Paakki, J. Attribute grammar paradigms—a high-level methodology in language implementation. ACM Computing Surveys, 27(2) (1995) 196–255.CrossRefGoogle Scholar
  20. 20.
    S-exp-based XML parsing, query, conversion. A SourceForge Project. http://ssax.sourceforge.net/
  21. 21.
    Serrano, M. Bigloo Scheme implementation. July 2003. http://www-sop.inria.fr/mimosa/fp/Bigloo/bigloo.html
  22. 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. 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.Google Scholar
  24. 24.
    World Wide Web Consortium. XML Path Language (XPath). Version 1.0. W3C Recommendation. November 16, 1999. http://www.w3.org/TR/xpath
  25. 25.
    World Wide Web Consortium. XSL Transformations (XSLT). Version 1.0. W3C Recommendation. November 16, 1999. http://www.w3.org/TR/xslt

Copyright information

© Springer Science + Business Media, Inc. 2005

Authors and Affiliations

  1. 1.Fleet Numerical Meteorology and Oceanography CenterMonterey

Personalised recommendations