Thomas Arts Industrial Use of a Functional Language Thomas Arts Ericsson Computer Science Laboratory Stockholm, Sweden

Slides:



Advertisements
Similar presentations
Practical Erlang Programming Process Error Handling.
Advertisements

Dynamic Source Routing (DSR) algorithm is simple and best suited for high mobility nodes in wireless ad hoc networks. Due to high mobility in ad-hoc network,
Data Communications and Networking
ACM Uppsala Mike Williams Ericsson AB1 Why did we create Erlang? Mike Williams Ericsson AB Stockholm Sweden
Erlang Paul Ang, Alex Quintero, Jessica Lombardi, Robin Adams.
Answers of Exercise 7 1. Explain what are the connection-oriented communication and the connectionless communication. Give some examples for each of the.
Model for Supporting High Integrity and Fault Tolerance Brian Dobbing, Aonix Europe Ltd Chief Technical Consultant.
Erlang concurrency. Where were we? Finished talking about sequential Erlang Left with two questions  retry – not an issue; I mis-read the statement in.
1-1 Introduction to Computer Networks and Data Communications.
Scripting Languages For Virtual Worlds. Outline Necessary Features Classes, Prototypes, and Mixins Static vs. Dynamic Typing Concurrency Versioning Distribution.
William Stallings Data and Computer Communications 7 th Edition Chapter 1 Data Communications and Networks Overview.
EE 4272Spring, 2003 Protocols & Architecture A Protocol Architecture is the layered structure of hardware & software that supports the exchange of data.
ITERATIVE COMPUTATIONS CONCURRENCY ID1218 Lecture Christian Schulte Software and Computer Systems School of Information and.
ECS 152A 1. Introduction. A Communications Model Source —generates data to be transmitted Transmitter —Converts data into transmittable signals Transmission.
Term 2, 2011 Week 1. CONTENTS Network communications standards – Ethernet – TCP/IP Other network protocols – The standard – Wireless application.
Lect11.ppt - 03/15/05 CDA 6505 Network Architecture and Client/Server Computing Lecture 11 Link-Level Flow and Error Control by Zornitza Genova Prodanoff.
Link-Level Flow and Error Control
Advanced Software Tools Research Seminar Fall 07 Arik Nemtsov.
NETWORK CENTRIC COMPUTING (With included EMBEDDED SYSTEMS)
1 Fault Tolerance in the Nonstop Cyclone System By Scott Chan Robert Jardine Presented by Phuc Nguyen.
The University of New Hampshire InterOperability Laboratory Introduction To PCIe Express © 2011 University of New Hampshire.
INSTALLING MICROSOFT EXCHANGE SERVER 2003 CLUSTERS AND FRONT-END AND BACK ‑ END SERVERS Chapter 4.
Chapter 1 Introduction to Computer Networks and Data Communications Data Communications and Computer Networks: A Business User’s Approach.
Network Parts. Network Interface Card (NIC) 2 This used to be a separate card as shown. As many computers these days need access to a network, the technology.
Evaluating Erlang: Are High-level Languages suitable for Robust Telecoms Software? Jan Nystrom SafeCom'05 – Henry Nystrom, Phil Trinder, David King.
Internet Addresses. Universal Identifiers Universal Communication Service - Communication system which allows any host to communicate with any other host.
Rev PA Erlang Open Telecom Platform EAB/UPD/S Ulf Wiger.
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Introduction Slide 1 A Communications Model Source: generates.
Distributed Systems: Concepts and Design Chapter 1 Pages
Multicore Computing Using Erlang Art Gittleman California State University Long Beach
Motorola Internal Use Only Evaluating Erlang for Robust Telecoms Software David King 2004 S 3 Symposium – Henry Nystrom, Phil Trinder, David King.
University of the Western Cape Chapter 12: The Transport Layer.
Computer Networks with Internet Technology William Stallings
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 6 Delivery and Routing of IP Packets.
Delivery, Forwarding, and Routing of IP Packets
ISADS'03 Message Logging and Recovery in Wireless CORBA Using Access Bridge Michael R. Lyu The Chinese Univ. of Hong Kong
Development of Formally Verified Erlang Programs a case study Thomas Arts Clara Benac Earle Computer Science Lab Stockholm, Sweden.
William Stallings Data and Computer Communications
1 Threads, SMP, and Microkernels Chapter Multithreading Operating system supports multiple threads of execution within a single process MS-DOS.
CS 326: Functional Programming 1. 2 Erlang – A survey of the language & applications Paper by: Joe Armstrong, Computer Science Laboratory, Ericsson Telecom.
Living Online Module Lesson 23 — Networks and Telecommunication Computer Literacy BASICS.
Slide title In CAPITALS 50 pt Slide subtitle 32 pt Robust Reconfigurable Erlang Component System ErlCOM Gabor Batori, Zoltan Theisz, Domonkos Asztalos.
OSes: 2. Structs 1 Operating Systems v Objective –to give a (selective) overview of computer system architectures Certificate Program in Software Development.
Computer Network Architecture Lecture 2: Fundamental of Network.
U NIVERSITY OF M ASSACHUSETTS, A MHERST Department of Computer Science Erlang Erricsson and Ellemtel Computer Science Laboratories
Message Passing, Concurrency, And Parallelism with Erlang Presented By: Craig R. Kuehn Department of Computer Science and Software Engineering University.
TCP/IP Protocol Suite Suresh Kr Sharma 1 The OSI Model and the TCP/IP Protocol Suite Established in 1947, the International Standards Organization (ISO)
Erlang - a complete development environment for concurrent programming RTLab. Kim Tae-Hyon.
Threads, SMP, and Microkernels Chapter 4. Processes and Threads Operating systems use processes for two purposes - Resource allocation and resource ownership.
Powerpoint Templates Data Communication Muhammad Waseem Iqbal Lecture # 07 Spring-2016.
Scaling For (Almost) Free
Bjarne Däcker Computer Science Laboratory Ericsson Utvecklings AB
Lecture (2).
Development of Formally Verified Erlang Programs a case study
100% Exam Passing Guarantee & Money Back Assurance
PROTOCOLS PROTOCOLS.
Chapter 4 Introduction to Network Layer
Mobile Operating System
Net 323: NETWORK Protocols
Chapter 4 Introduction to Network Layer
ANEEL ABBASI MUHAMMAD ADNAN MOIZ SHAH MUHAMMAD KHAYAM GROUP MEMBERS.
Networking Theory (part 2)
Hosted VoIP Services using Erlang/OTP
Computer Science 312 Concurrent Programming I Processes and Messages 1.
Industrial Use of a Functional Language
Objectives of Today’s Lecture
LO1 – Understand Computer Hardware
Objectives of Today’s Lecture
Computer Networks Protocols
Networking Theory (part 2)
Presentation transcript:

Thomas Arts Industrial Use of a Functional Language Thomas Arts Ericsson Computer Science Laboratory Stockholm, Sweden

Thomas Arts Telecom industry Switches, routers, base-stations Networks Mobile telephones

Thomas Arts Computer Science Laboratory Founded 1983 Research on implementation tools, methods and techniques for telecommunication applications Intermediate between universities and Ericsson product units

Thomas Arts Telecom requirements Requirements of telecom software Concurrency Distribution Soft real-time Robust Non-stop system External interfaces

Thomas Arts A good language? Experiments in the 80s with Ada, C, ML, CML, Prolog... large programs (million lines) change code in running system fast message passing low memory overhead no memory fragmentation/leaks recover from errors

Thomas Arts Erlang/OTP A functional language successfully used for programming large real- time control systems. OTP is the set of libraries that is used with Erlang for product development

Thomas Arts Erlang/OTP Erlang/OTP develop/maintenance Erlang consultancy & courses Erlang used many systems, e.g. ATM switch and new GSM network (GPRS) Erlang Open Source

Erlang sequential program Thomas Arts -module(math). -export([fac/1]). fac(N) when N>0 -> N*fac(N-1); fac(N)-> 1.

Thomas Arts Erlang datatypes atoms ( true,foo,’Hello’ ) numbers ( ) floats ( ) tuples ( {a,123} ) lists ( [1,123,2,56] ) process identifiers...

Thomas Arts Erlang datatypes dynamically typed language poor mechanism to build your own datatypes

Thomas Arts Erlang control structures Matching case X of {ok,List} -> hd(List); {resend,Data} -> submit; error -> exit(error); _ -> retry(X) end

Thomas Arts Erlang control structures Guards f(....) when guard ->... If f(X) -> if guard1 ->...; guard2 ->... end

Thomas Arts Erlang control structures Higher order functions f(F,X) -> F(X); map(F,[1,2,3,4]). List comprehensions [ X || {X,Y}<-Set, guard(X)]

Thomas Arts Erlang control structures Naming of objects/data f(X) -> Dev = update_device(X), {Date,Time} = now(), h({Dev,Date}).

Thomas Arts Erlang control structures Sequence f(X) -> action1(X), action2(X); update(X) -> log(X,”myfile”), new(X). side-effects

Thomas Arts Erlang control - concurrency/distribution Creating a process Pid = spawn(F,[Arg1,...,ArgN]); P1P2 B = spawn(F,Args); P2 F(Arg1,...,ArgN)

Thomas Arts Erlang control - concurrency/distribution Sending messages Pid ! Message; P1P2 B!{self(),hej}; {P1,hej}

Thomas Arts Erlang control - concurrency/distribution Receiving messages receive Pattern ->...; end; P1P2 {P1,hej} receive {From,Msg} -> From ! {ok,Msg} end P1 ! {ok,hej}

Thomas Arts Erlang changing code in running system P0 loop(F) -> receive {exec,Pid,Arg} -> Pid!F(Arg), loop(F) end; P1 N = F(15), P0 ! {exec,self(),15}, N = receive Answer -> Answer end, loop(F) -> receive {change,G} -> loop(G); {exec,Pid,Arg} -> Pid!F(Arg), loop(F) end;

Thomas Arts Erlang fault tolerance Processes can be linked to each other: PidAPidB Links are created by using either: link(Pid), or spawn_link(Module, Function, Args) Links are bi-directional. They can be removed using unlink(Pid).

Thomas Arts Erlang fault tolerance When a process terminates, an exit signal is sent to all processes the process is linked to: PidAPidBPidA A process can terminate normally, due to a run- time error, or when explicitly ordered to do so.

Thomas Arts Erlang fault tolerance PidCPidDPidEPidAPidB PidD If a process terminates abnormally, the emitted exit signal will (by default) cause the recipient to terminate: The termination reason in the transmitted exit signals will be the same as in the received one (the exit signal is propagated).

Thomas Arts Erlang fault tolerance exit(error) PidBPidC error PidA error A process can terminate itself using exit(Reason). This will cause exit signals with termination reason Reason to be emitted.

Thomas Arts Erlang fault tolerance A process can explicitly send an exit signal to another process using exit(Pid, Reason) : exit(PidB, error) PidBPidA error The calling process is not affected. The processes do not need to be linked.

Thomas Arts Erlang fault tolerance A process can trap exit signals using: process_flag(trap_exit, true). Incoming exit signals will be transformed into messages of the form: {'EXIT', Pid, Reason} These exit messages are delivered to the process mailbox in the normal way.

Thomas Arts Erlang fault tolerance PidC terminates with reason error, PidD is trapping exits: PidCPidDPidEPidAPidB error PidBPidA PidB terminates, propagating the exit signal. PidD will receive an exit message {'EXIT', PidC, error}.

Thomas Arts Erlang fault tolerance Robust systems can be made by layering.

Thomas Arts Erlang fault tolerance supervision trees and restart strategies P1 P2P3 P1 P4P3 P6P5 P1 P2P3 P4

Thomas Arts Erlang component based development recognize frequently occurring patterns and transfer them into standard components. faster development uniform code (maintenance) less errors

Thomas Arts Erlang Developed with the application of the language constantly in mind Practical usability more priority than purity

Thomas Arts Erlang is used AXD 301, scalable ATM switch (up to 160 GB/sec) four years work more than 500,000 lines of Erlang several hundreds of programmers

Thomas Arts Erlang is used GPRS: next generation GSM network. Eigth times faster internet access in mobile phones always connected development in three countries, hundreds of people

Thomas Arts Erlang is used The success of the language in industry is due to Language features Support and libraries Design patterns / architectures

Thomas Arts Erlang is used Become a user yourself! passive: make a phonecall active: download Erlang for free over 300 downloads per month

Thomas Arts Erlang The functional language for industry