Erlang - An Open Source Language for Robust Distributed Applications

Dr Lawrie Brown
School of IT&EE, UNSW@ADFA, Canberra, Australia
Email: Lawrie.Brown@adfa.edu.au

Abstract

This talk introduces Erlang, a functional language designed to support robust, reliable, distributed, near real-time applications. Its was developed by the Ericsson Computer Science Laboratories, and was released as open source in late 1998. Erlang includes not just the base language, but the Mnesia DBMS, a web server, an ORB, and an SNMP agent. Collectively these provide some very good tools for applications development.
  1. Erlang - An Open Source Language for Robust Distributed Applications
  2. Introduction
  3. Functional
  4. Concurrent
  5. Distributed
  6. Language Features
  7. Advantages
  8. Disadvantages
  9. A Trivial Example
        -module(bankserver).
        -export([start/1]).
        start(Sum) ->
            register(bank,self()),
            account(Sum).
        account(Sum) ->
            receive
              {Pid, Ref, Amount} ->
                NewSum = Sum+Amount,
                Pid ! {Ref,NewSum},
                account(NewSum);
              stop -> nil
            end.
    
  10. A Trivial Example cont.
        % spawn a bank account process with initial Sum 1000
        Bank_pid = spawn(BankNode,bankserver,start,[1000]),
        ...
        Ref = make_ref(),
        Bank_pid ! {self(),Ref,17},
        receive
            {Ref,New_balance} ->
                ...
        end,
    
  11. A Less Trivial Example Rexec Client
  12. A Less Trivial Example Rexec Server
  13. Somewhat More Serious Examples
  14. Open Source
  15. Major Library Components
    Mnesia
    fast, distributed, real-time database for Erlang
    Inets
    package of Internet tools, including full HTTP server
    Orber
    a CORBA v2.0 object request broker (ORB)
    SNMP
    extensible SNMP v1/v2 agent and MIB (ASN.1) compiler
  16. Other Erlang Implementations
  17. Erlang Applications - Mobility Server
  18. Erlang Applications - AXD301 ATM Switch
  19. Application Experiences
  20. And Where do I come In?
  21. Conclusion
  22. References
    Talk Outline:
    http://lpb.canb.auug.org.au/adfa/seminars/erlang-intro.html
    AVWW96
    J. Armstrong, R. Virding, C. Wikstrom, M. Williams, "Concurrent Programming in Erlang", 2nd edn, Prentice Hall, 1996. http://www.erlang.org/download/erlang_book_toc.html.
    Arms97
    Joe Armstrong, "The Development of Erlang", in Proceedings of the ACM SIGPLAN International Conference on Functional Programming, ACM, pp 196-203, 1997.
    BrSa99
    Lawrie Brown, Dan Sahlin, "Extending Erlang for Safe Mobile Code Execution", V. Varadharajan, Y. Mu (ed), in Information and Communication Security, Lecture Notes in Computer Science, Vol 1726, Springer-Verlag, pp 39-53, Nov 1999. http://lpb.canb.auug.org.au/adfa/research/sserl/icics99.html.
    Erlang
    Erlang Systems, "Open Source Erlang Distribution", Ericsson Software Technology AB, Erlang Systems, http://www.erlang.org/.
  23. More Examples - Micro HTTP Server
  24. More Examples - Application Monitor

Lawrie.Brown@adfa.edu.au / 21-Jan-2004