Erlang: distributed programming
|
|
- Wendy Wilkins
- 5 years ago
- Views:
Transcription
1 Erlang: distributed May 11, / 21
2 Fault tolerance in Erlang links, exit signals, system process in Erlang OTP Open Telecom Platform 2 / 21
3 General idea Links Exit signals System processes Summary of exit signals Idioms for trapping exits Advanced 3 / 21
4 General idea General idea Links Exit signals System processes Summary of exit signals Idioms for trapping exits Advanced system process handles exit signals from linked processes traps exit messages { EXIT,Pid,Why} default: usual process dies if Why normal link connection between 2 processes symmetric, must be set explicitely exit signal sent to the set of linked processes when process dies { EXIT,B,Why} when process finishes { EXIT,B,normal} A 4 / 21
5 General idea General idea Links Exit signals System processes Summary of exit signals Idioms for trapping exits Advanced system process handles exit signals from linked processes traps exit messages { EXIT,Pid,Why} default: usual process dies if Why normal link connection between 2 processes symmetric, must be set explicitely exit signal sent to the set of linked processes when process dies { EXIT,B,Why} when process finishes { EXIT,B,normal} A B 4 / 21
6 General idea General idea Links Exit signals System processes Summary of exit signals Idioms for trapping exits Advanced system process handles exit signals from linked processes traps exit messages { EXIT,Pid,Why} default: usual process dies if Why normal link connection between 2 processes symmetric, must be set explicitely exit signal sent to the set of linked processes when process dies { EXIT,B,Why} when process finishes { EXIT,B,normal} A B 4 / 21
7 General idea General idea Links Exit signals System processes Summary of exit signals Idioms for trapping exits Advanced system process handles exit signals from linked processes traps exit messages { EXIT,Pid,Why} default: usual process dies if Why normal link connection between 2 processes symmetric, must be set explicitely exit signal sent to the set of linked processes when process dies { EXIT,B,Why} when process finishes { EXIT,B,normal} A { EXIT,B,Why} B 4 / 21
8 Links General idea Links Exit signals System processes Summary of exit signals Idioms for trapping exits Advanced link defines error propagation path between 2 processes if one dies then another gets exit signal links are established with link(b) or spawn_link(fun) 5 / 21
9 Exit signals General idea Links Exit signals System processes Summary of exit signals Idioms for trapping exits Advanced exit signal generated when process dies or finishes { EXIT,Pid,Why} Why=normal if a process just finishes (i.e. recursion ends) Why=<exception desc> if there was a problem exit(why) may be called to stop itself sent to all linked processes faking death: exit(pid2, Why) sends { EXIT,Pid,Why} to process Pid2 continues exection 6 / 21
10 System processes General idea Links Exit signals System processes Summary of exit signals Idioms for trapping exits Advanced usual process dies if receives exit signal from any linked process where Why normal system process set with process_flag(trap_exit,true) traps exit signals from linked processes messages { EXIT,Pid,Why} are added to its mailbox exit signals with Why=kill are not caught at all! process is killed, even system process { EXIT,Pid,killed} broadcasted to all linked processes (notice that kill is propagated as killed) 7 / 21
11 General idea Links Exit signals System processes Summary of exit signals Idioms for trapping exits Advanced on_exit(pid, Fun) -> spawn(fun() -> process_flag(trap_exit, true), link(pid), receive { EXIT,Pid,Why} -> Fun(Why) end end). 8 / 21
12 General idea Links Exit signals System processes Summary of exit signals Idioms for trapping exits Advanced F = fun() -> receive X -> list_to_atom(x) end end. Pid = spawn(f). on_exit(pid, fun(why) -> io:format("~p died with ~p~n",[pid,why]) end). create a process that transforms lists to atoms add error handler with on_exit Now sending Pid! hello. results in <0.61.0> died with:{badarg,[{ 9 / 21
13 Summary of exit signals trap_exit Exit signal Action true kill Die: broadcast the exit signal killed to the link set true X Add { EXIT,Pid,X} to the mailbox false normal Continue: Do nothing, signal vanishes false kill Die: broadcast the exit signal killed to the link set false X Die: broadcast the exit signal X to the link set 10 / 21
14 Idioms for trapping exits General idea Links Exit signals System processes Summary of exit signals Idioms for trapping exits Advanced 1. Don t care about new process Pid=spawn(fun() ->... end) 2. Want to die if new process dies Pid=spawn_link(fun() ->... end) 3. Want to handle errors if new process dies... process_flag(trap_exit, true), Pid=spawn_link(fun() ->... end), loop(...). loop(state) -> receive { EXIT, SomePid, Reason} -> %% do something with the error loop(state1)... end. 11 / 21
15 Advanced General idea Links Exit signals System processes Summary of exit signals Idioms for trapping exits Advanced one fails everyone up to system process dies P1 P2 P3 P4 one fails supervisor process restarts one or all Sup P1 P2 P3 12 / 21
16 Create servers Distribution primitives 13 / 21
17 Create servers Distribution primitives 1. Erlang spawn process on any Erlang node Erlang VM instance message passing and error handling works without changes run any module function on any node unsafe: should be used in trusted environments, e.g. dedicated LAN 2. Socket based distribution handle and abstract TCP socket communication lib_chan module in examples safe: use in untrusted environments, e.g. internet 14 / 21
18 Create servers Create servers Distribution primitives $ erl -sname <name[@server]> short name, usable only on the same host $ erl -name <name[@fqdn]> server name, DNS must be accessible, at least /etc/hosts olegus@hebe:~$ erl -name myerlangnode Erlang R15B (erts-5.9) [source] [64-bit] [smp: Eshell V5.9 (abort with ^G) (myerlangnode@hebe.domenis.ut.ee)1> different machines must have the same cookie ~/.erlang.cookie -setcookie parameter 15 / 21
19 Distribution primitives Create servers Distribution primitives built in rpc module rpc:call(node,mod,function,args) -> Result {badrpc,reason} built in global module extended spawn functions, etc spawn(node,fun) -> Pid spawn(node,mod,func,arglist) -> Pid spawn_link(node,fun) -> Pid spawn_link(node,mod,func,arglist) -> Pid disconnect_node(node) -> bool() ignored node() -> Node node(arg) -> Node nodes() -> [Node] Pid! Msg {RegName,Node}! Msg 16 / 21
20 Create servers Distribution primitives Run 2 servers with names me and you erl -sname me@localhost erl -sname you@localhost Test with (run from you ) (you@localhost)8> rpc:call(me@localhost, io, format, ["hello~n"]). hello (you@localhost)9> rpc:call(me@localhost, erlang, node, []). me@localhost test remote spawn / 21
21 Create servers Distribution primitives Write and compile dist.erl -module(dist). -export([start/0]). loop() -> receive X -> io:format("~p: Im running on ~p~n", [X,node()]) end, loop(). test it 13> RP = spawn(me@localhost, fun dist:loop/0). 14> RP! "Hi". "Hi": Im running on me@localhost 18 / 21
22 Description 19 / 21
23 Description provides process restart strategies, event and error logging, etc. declare gen_server module behaviour (checks for undefined functions during compilation) -module(myserver). -behaviour(gen_server). specify 6 callbacks init(startargs) -> {ok, InitState}. handle_call(msg,from,state) -> {reply, ok, State} handle_cast(msg,state) -> {noreply, State}. handle_info(info,state) -> {noreply, State}. terminate(reason, State) -> ok. code_change(oldv, State, Extra) -> {ok, State}. start server with gen_server:start_link(name, CallBackMod, StartArgs, Opts) 20 / 21
24 Description Description handle_call is a state transform function that is called for each incoming message (synchronous) handle_cast is the same but does not return value (asynchronous) handle_info is for spontaneous messages, e.g. exit signals from linked processes terminate is executed when agent stops code_change is code hot swapping 21 / 21
An Introduction to Erlang
An Introduction to Erlang Part 2 - Concurrency Richard Carlsson Processes P1 fib(0) -> 1; fib(1) -> 1; fib(n) when N > 0 -> fib(n-1) + fib(n-2). Whenever an Erlang program is running, the code is executed
More informationErlang: An Overview. Part 2 Concurrency and Distribution. Thanks to Richard Carlsson for most of the slides in this part
Erlang: An Overview Part 2 Concurrency and Distribution Thanks to Richard Carlsson for most of the slides in this part Processes P1 fib(0) -> 1; fib(1) -> 1; fib(n) when N > 0 -> fib(n-1) + fib(n-2). Whenever
More informationErlang 101. Google Doc
Erlang 101 Google Doc Erlang? with buzzwords Erlang is a functional concurrency-oriented language with extremely low-weight userspace "processes", share-nothing messagepassing semantics, built-in distribution,
More informationRobust Erlang (PFP Lecture 11) John Hughes
Robust Erlang (PFP Lecture 11) John Hughes Genesis of Erlang Problem: telephony systems in the late 1980s Digital More and more complex Highly concurrent Hard to get right Approach: a group at Ericsson
More informationErlang. Functional Concurrent Distributed Soft real-time OTP (fault-tolerance, hot code update ) Open. Check the source code of generic behaviours
Lecture 9 Erlang Erlang Functional Concurrent Distributed Soft real-time OTP (fault-tolerance, hot code update ) Open Check the source code of generic behaviours 2 Functional Haskell call-by-need (lazy)
More informationErlang. Functional Concurrent Distributed Soft real-time OTP (fault-tolerance, hot code update ) Open. Check the source code of generic behaviours
Lecture 10 Erlang Erlang Functional Concurrent Distributed Soft real-time OTP (fault-tolerance, hot code update ) Open Check the source code of generic behaviours 2 Functional Haskell call-by-need (lazy)
More informationAn Introduction to Erlang
Erlang Solutions Ltd An Introduction to Erlang From behind the trenches GOTO Copenhagen May 13 th, 2011 Francesco Cesarini Founder, Technical Director @FrancescoC francesco@erlang-solutions.com So Here
More informationIntroduction to Erlang. Franck Petit / Sebastien Tixeuil
Introduction to Erlang Franck Petit / Sebastien Tixeuil Firstname.Lastname@lip6.fr Hello World % starts a comment. ends a declaration Every function must be in a module one module per source file source
More informationErlang. Joe Armstrong
Erlang Joe Armstrong Though OOP came from many motivations, two were central. The large scale one was to find a better module scheme for complex systems involving hiding of details, and the small scale
More informationFRANCESCO CESARINI. presents ERLANG/OTP. Francesco Cesarini Erlang
FRANCESCO CESARINI presents Francesco Cesarini Erlang Solutions ERLANG/OTP @FrancescoC francesco@erlang-solutions.com www.erlang-solutions.com WHAT IS SCALABILITY? WHAT IS (MASSIVE) CONCURRENCY? WHAT
More informationErlang functional programming in a concurrent world
KTH ROYAL INSTITUTE OF TECHNOLOGY Erlang functional programming in a concurrent world Johan Montelius and Vladimir Vlassov Erlang Concurrent Oriented Programming processes have state communicate using
More informationErlang functional programming in a concurrent world Johan Montelius and Vladimir Vlassov
KTH ROYAL INSTITUTE OF TECHNOLOGY Erlang functional programming in a concurrent world Johan Montelius and Vladimir Vlassov Erlang Concurrent Oriented Programming processes have state communicate using
More informationAn Introduction to Erlang
Erlang Solutions Ltd An Introduction to Erlang From behind the trenches GOTO Amsterdam Amsterdam, May 25 th 2012 Francesco Cesarini Founder, Technical Director @FrancescoC francesco@erlang-solutions.com
More informationStarting the System & Basic Erlang Exercises
Starting the System & Basic Erlang Exercises These exercises will help you get accustomed with the Erlang development and run time environments. Once you have set up the Erlang mode for emacs, you will
More informationconcurrent programming XXL
concurrent programming XXL Industrial Use of Erlang Introduction Karol Ostrovský (karol.ostrovsky@gmail.com) Motivation Machine Ericsson Blade System 3 sub-racks 14 blades 2 routers 12 compute nodes 6
More informationAn Introduction to Erlang
Erlang Solutions Ltd An Introduction to Erlang From behind the trenches Erlang Factory Lite Zurich, April 23 rd 2012 Francesco Cesarini Founder, Technical Director @FrancescoC francesco@erlang-solutions.com
More informationExperiments in OTP-Compliant Dataflow Programming
Experiments in OTP-Compliant Dataflow Programming Introducing Erlang Services Platform (Erlang/SP) San Francisco Erlang Factory, March 21, 2013 Jay Nelson Twitter: @duomark Email: Jay@duomark.com Manycore
More informationMessage-passing concurrency in Erlang
Message-passing concurrency in Erlang Lecture 8 of TDA383/DIT390 (Concurrent Programming) Carlo A. Furia Chalmers University of Technology University of Gothenburg SP3 2016/2017 Today s menu Actors and
More informationLecture 5: Erlang 1/31/12
Principles of Concurrency and Parallelism Lecture 5: Erlang 1/31/12 Example Suppose we have N threads (or processes, tasks) that form a ring Each thread communicates with its neighbor forwarding a message
More informationDISTRIBUTED SYSTEMS [COMP9243] Lecture 1.5: Erlang INTRODUCTION TO ERLANG BASICS: SEQUENTIAL PROGRAMMING 2. Slide 1
DISTRIBUTED SYSTEMS [COMP9243] THE ERLANG ENVIRONMENT Slide 1 Lecture 1.5: Erlang ➀ Introduction ➁ Basics: Sequential programming ➂ Concurrent programming Slide 3 unix% erl 1> 1 + 2. 3 2> c(demo). {ok,demo}
More informationReminder from last time
Concurrent systems Lecture 5: Concurrency without shared data, composite operations and transactions, and serialisability DrRobert N. M. Watson 1 Reminder from last time Liveness properties Deadlock (requirements;
More informationThe Actor Model, Part Two. CSCI 5828: Foundations of Software Engineering Lecture 18 10/23/2014
The Actor Model, Part Two CSCI 5828: Foundations of Software Engineering Lecture 18 10/23/2014 1 Goals Cover the material presented in Chapter 5, of our concurrency textbook In particular, the material
More informationErlang. An introduction. Paolo Baldan Linguaggi e Modelli per il Global Computing AA 2016/2017
Erlang An introduction Paolo Baldan Linguaggi e Modelli per il Global Computing AA 2016/2017 Erlang, in a slogan Declarative (functional) language for concurrent and distributed systems Erlang = Functions
More informationS AMPLE CHAPTER. Erlang AND OTP IN ACTION. Martin Logan Eric Merritt Richard Carlsson FOREWORD BY ULF WIGER MANNING
S AMPLE CHAPTER Erlang AND OTP IN ACTION Martin Logan Eric Merritt Richard Carlsson FOREWORD BY ULF WIGER MANNING Erlang and OTP in Action by Martin Logan Eric Merritt Richard Carlsson Chapter 3 Copyright
More informationMacros, and protocols, and metaprogramming - Oh My!
Macros, and protocols, and metaprogramming - Oh My! (aka "What is Elixir and why should you care?") jim mccoy, Facebook Infosec Tools mccoy@fb.com (jim.mccoy@gmail.com) Who? Currently build and maintain
More informationMaturing, I'll try to provide backwards compatibility for 2 freeswitch releases if I have to make an API change.
mod_erlang_event About mod_erlang_event is a derivative of mod_event_socket that sends events and receives commands in erlang's binary term format. This allows FreeSWITCH to behave like just another erlang
More informationErlang - functional programming in a concurrent world. Johan Montelius KTH
Erlang - functional programming in a concurrent world Johan Montelius KTH 1 Erlang Concurrent Oriented Programming processes have state communicate using message passing access and location transparent
More informationDistributed Erlang and Map-Reduce
Distributed Erlang and Map-Reduce The goal of this lab is to make the naïve map-reduce implementation presented in the lecture, a little less naïve. Specifically, we will make it run on multiple Erlang
More informationBeautiful Concurrency with Erlang
Beautiful Concurrency with Erlang Kevin Scaldeferri OSCON 23 July 2008 6 years at Yahoo, building large high-concurrency distributed systems Not an expert, don t use it professionally Dabbled, liked it,
More informationCliff Moon. Bottleneck Whack-A-Mole. Thursday, March 21, 13
Cliff Moon Bottleneck Whack-A-Mole Whack-A-Mole Production Experience Your Mileage May Vary. This is all folklore. Unless otherwise specified - R14B04. Down in the weeds. Collectors Terminates SSL and
More informationRudy: a small web server. Johan Montelius. October 2, 2016
Rudy: a small web server Johan Montelius October 2, 2016 Introduction Your task is to implement a small web server in Erlang. The aim of this exercise is that you should be able to: describe the procedures
More informationProcesses. Johan Montelius KTH
Processes Johan Montelius KTH 2017 1 / 47 A process What is a process?... a computation a program i.e. a sequence of operations a set of data structures a set of registers means to interact with other
More informationA process. the stack
A process Processes Johan Montelius What is a process?... a computation KTH 2017 a program i.e. a sequence of operations a set of data structures a set of registers means to interact with other processes
More informationScenes From the Language Struggle in Toronto, Ontario. Mike Nolta
Scenes From the Language Struggle in Toronto, Ontario Mike Nolta Ch-Ch-Changes OpenMP & MPI are fine for now, but we need language support for parallelism. Corbato s Law: The number of lines of code a
More informationThe Little Elixir & OTP Guidebook by Tan Wei Hao
SAMPLE CHAPTER The Little Elixir & OTP Guidebook by Tan Wei Hao Chapter 9 Copyright 2016 Manning Publications brief contents PART 1 GETTING STARTED WITH ELIXIR AND OTP...1 1 Introduction 3 2 A whirlwind
More informationVALEO: programs robustifier
VALEO: programs robustifier by Younès HAFRI younes.hafri@aleph-archives.com talk to the outside? 3 Who Am I? Aleph Archives' CTO & Founder love coding hate complexity love un-optimizing programs hate cooking
More informationErlang. Joe Armstrong.
Erlang Joe Armstrong joe.armstrong@ericsson.com 1 Who is Joe? Inventor of Erlang, UBF, Open Floppy Grid Chief designer of OTP Founder of the company Bluetail Currently Software Architect Ericsson Current
More informationKent Academic Repository
Kent Academic Repository Full text document (pdf) Citation for published version Cesarini, Francesco and Thompson, Simon (2010) Erlang Behaviours: Programming With Process Design Patterns. In: Central
More informationThe Actor Model applied to the Raspberry Pi and the Embedded Domain. The Erlang Embedded Project. Omer
The Actor Model applied to the Raspberry Pi and the Embedded Domain. The Erlang Embedded Project Omer Kilic @OmerK omer@erlang-solutions.com Outline Current state of Embedded Systems Overview of Erlang
More informationOTP Design Principles. version 5.6
version 5.6 Typeset in L A TEX from SGML source using the DocBuilder-0.9.7 Document System. Contents 1 1 1.1 Overview........................................... 1 1.1.1 Supervision Trees...................................
More informationDistributed Systems Exam 1 Review. Paul Krzyzanowski. Rutgers University. Fall 2016
Distributed Systems 2016 Exam 1 Review Paul Krzyzanowski Rutgers University Fall 2016 Question 1 Why does it not make sense to use TCP (Transmission Control Protocol) for the Network Time Protocol (NTP)?
More informationPrinciples of Programming Languages (E)
Principles of Programming Languages (E) Matteo Pradella December 1, 2017 Matteo Pradella Principles of Programming Languages (E) December 1, 2017 1 / 49 Erlang: Overview 1 Sequential programming 2 Concurrent
More informationNamy: a distributed name server. Johan Montelius. October 2, 2016
Introduction Namy: a distributed name server Johan Montelius October 2, 2016 Your task will be to implement a distributed name server similar to DNS. Instead of addresses we will store process identifiers
More informationParallel Programming in Erlang (PFP Lecture 10) John Hughes
Parallel Programming in Erlang (PFP Lecture 10) John Hughes What is Erlang? Haskell Erlang - Types - Lazyness - Purity + Concurrency + Syntax If you know Haskell, Erlang is easy to learn! QuickSort again
More informationThe Actor Model applied to the Raspberry Pi and the Embedded Domain. Omer
The Actor Model applied to the Raspberry Pi and the Embedded Domain Omer Kilic @OmerK omer@erlang-solutions.com Agenda Current state of Embedded Systems Overview of the Actor Model Erlang Embedded Project
More informationProducer Consumer in Ada
Concurrent Systems 8L for Part IB Handout 3 Dr. Steven Hand Example: Active Objects A monitor with an associated server thread Exports an entry for each operation it provides Other (client) threads call
More informationErlectricity. Tom Preston-Werner. github.com/mojombo/erlectricity
Erlectricity Tom Preston-Werner github.com/mojombo/erlectricity 1 github 2 3 4 5 6 7 8 Like an Erlang Process that runs Ruby Erlang VM 9 Like an Erlang Process that runs Ruby Erlang VM 9 Like an Erlang
More informationProgramming Paradigms
PP 2017/18 Unit 15 Concurrent Programming with Erlang 1/32 Programming Paradigms Unit 15 Concurrent Programming with Erlang J. Gamper Free University of Bozen-Bolzano Faculty of Computer Science IDSE PP
More informationMODELS OF DISTRIBUTED SYSTEMS
Distributed Systems Fö 2/3-1 Distributed Systems Fö 2/3-2 MODELS OF DISTRIBUTED SYSTEMS Basic Elements 1. Architectural Models 2. Interaction Models Resources in a distributed system are shared between
More informationThe Actor Model. CSCI 5828: Foundations of Software Engineering Lecture 13 10/04/2016
The Actor Model CSCI 5828: Foundations of Software Engineering Lecture 13 10/04/2016 1 Goals Introduce the Actor Model of Concurrency isolation, message passing, message patterns Present examples from
More informationIntroduction to Erlang. Franck Petit / Sebastien Tixeuil
Introduction to Erlang Franck Petit / Sebastien Tixeuil Firstname.Lastname@lip6.fr Erlang History Erlang: Ericsson Language Designed to implement large-scale realtime telecommunication switching systems
More informationAn Erlang primer. Johan Montelius
An Erlang primer Johan Montelius Introduction This is not a crash course in Erlang since there are plenty of tutorials available on the web. I will however describe the tools that you need so that you
More informationChordy: a distributed hash table. Johan Montelius and Vladimir Vlassov. August 29, 2016
Introduction Chordy a distributed hash table Johan Montelius and Vladimir Vlassov August 29, 2016 In this assignment you will implement a distributed hash table following the Chord scheme. In order to
More informationErlang Concepts. Programming for Beginners, Summer 2011
Programming for Beginners, Summer 2011 Erlang Concepts Erlang is a functional programming language that supports concurrent programming. Computations in Erlang can proceed in parallel on a network of computers,
More informationErlang and Concurrency. André Pang Rising Sun Research
Erlang and Concurrency André Pang Rising Sun Research Games. Unreal 3 engine. Amazing graphics. (Unreal 3 video demo.) 2004/2005? Still state-of-the-art. What does that game have to do with this talk?
More informationMapReduce in Erlang. Tom Van Cutsem
MapReduce in Erlang Tom Van Cutsem 1 Context Masters course on Multicore Programming Focus on concurrent, parallel and... functional programming Didactic implementation of Google s MapReduce algorithm
More informationCS390 Principles of Concurrency and Parallelism. Lecture Notes for Lecture #5 2/2/2012. Author: Jared Hall
CS390 Principles of Concurrency and Parallelism Lecture Notes for Lecture #5 2/2/2012 Author: Jared Hall This lecture was the introduction the the programming language: Erlang. It is important to understand
More informationScaling Up from 1000 to 10 Nodes
Scaling Up from 1000 to 10 Nodes Anton Lavrik Alert Logic, Inc. 1 Alert Logic vs Twitter: daily numbers (2012) Alert Logic Twitter Events received 11.5B 0.5B Volume received 5TB 70GB Logs produced? 100TB
More informationTypeset in L A TEX from SGML source using the DOCBUILDER 3.0 Document System.
version 1.1 Typeset in L A TEX from SGML source using the DOCBUILDER 3.0 Document System. Contents 1 User s Guide 1 1.1 Introduction......................................... 2 Architecture..........................................
More informationre-exam Concurrent Programming tda383/dit390 Date: Time: 14:00 18:00 Place: Maskinhuset (M)
re-exam Concurrent Programming tda383/dit390 Date: 2016-08-22 Time: 14:00 18:00 Place: Maskinhuset (M) Responsible Michał Pałka 031 772 10 79 Result Available no later than 2016-09-12 Aids Max 2 books
More information<Urban.Boquist. com> Rev PA
FP in industry - Erlang Urban Boquist Ericsson AB com> 1 Outline Who Am I Mobile Telecommunications Networks Packet Core Network GPRS & SGSN Use of Erlang in SGSN SGSN Design
More informationcostransactions Copyright Ericsson AB. All Rights Reserved. costransactions April
costransactions Copyright 1999-2012 Ericsson AB. All Rights Reserved. costransactions 1.2.12 April 1 2012 Copyright 1999-2012 Ericsson AB. All Rights Reserved. The contents of this file are subject to
More informationAn Introduction to Erlang. Richard Carlsson
An Introduction to Erlang Richard Carlsson Erlang Buzzwords Functional (strict) Single-assignment Dynamically typed Concurrent Distributed Message passing Soft real-time Fault tolerant No sharing Automatic
More informationOSE Copyright Ericsson AB. All Rights Reserved. OSE 1.0 June 23, 2014
OSE Copyright 2014-2014 Ericsson AB. All Rights Reserved. OSE 1.0 June 23, 2014 Copyright 2014-2014 Ericsson AB. All Rights Reserved. The contents of this file are subject to the Erlang Public License,
More informationReminder from last ;me
Concurrent systems Lecture 5: Concurrency without shared data; transac;ons Dr Robert N. M. Watson 1 Reminder from last ;me Liveness proper;es Deadlock (requirements; resource alloca;on graphs; detec;on;
More informationGoldy: a distributed game. Johan Montelius. October 2, 2016
Goldy a distributed game Johan Montelius October 2, 2016 Introduction This seminar will serve two purpose; learning how to program a distributed application in Erlang and understanding why distributed
More informationCHAPTER 4: INTERPROCESS COMMUNICATION AND COORDINATION
CHAPTER 4: INTERPROCESS COMMUNICATION AND COORDINATION Chapter outline Discuss three levels of communication: basic message passing, request/reply and transaction communication based on message passing
More informationMODELS OF DISTRIBUTED SYSTEMS
Distributed Systems Fö 2/3-1 Distributed Systems Fö 2/3-2 MODELS OF DISTRIBUTED SYSTEMS Basic Elements 1. Architectural Models 2. Interaction Models Resources in a distributed system are shared between
More informationWE ARE ALL BLESSED. Bruce Tate
WE ARE ALL BLESSED Bruce Tate Dave Thomas @redrapids @pragdave 1 DAVE'S STORY 2 3 4 https://upload.wikimedia.org/wikipedia/commons/0/0b/hand-operated_card_punch-2.jpg 5 https://upload.wikimedia.org/wikipedia/commons/e/e8/ibm_card_punch_029.jpg
More informationLecture 9. Part I. Overview of Message Passing. Communication Coupling. Decoupling Blackboard. Decoupling Broadcast. Linda and Erlang.
Lecture 9 Part I Linda and Erlang Linda Overview of Message Passing Communication Coupling One process sends a message Another process awaits for a message We will consider two dimensions of this approach:
More informationToday: Fault Tolerance. Reliable One-One Communication
Today: Fault Tolerance Reliable communication Distributed commit Two phase commit Three phase commit Failure recovery Checkpointing Message logging Lecture 17, page 1 Reliable One-One Communication Issues
More informationAll you need is fun. Cons T Åhs Keeper of The Code
All you need is fun Cons T Åhs Keeper of The Code cons@klarna.com Cons T Åhs Keeper of The Code at klarna Architecture - The Big Picture Development - getting ideas to work Code Quality - care about the
More informationConcurre Concurr nt n Systems 8L for Part IB Handout 3 Dr. Steven Hand 1
Concurrent Systems 8L for Part IB Handout 3 Dr. Steven Hand 1 Concurrency without shared data The examples so far have involved threads which h can arbitrarily read & write shared data A key need for mutual
More informationA Small Web Server. Programming II - Elixir Version. Johan Montelius. Spring Term 2018
A Small Web Server Programming II - Elixir Version Johan Montelius Spring Term 2018 Introduction Your task is to implement a small web server in Elixir. exercise is that you should be able to: The aim
More informationLecture 8. Linda and Erlang
Lecture 8 Linda and Erlang Part I Linda 2 Overview of Message Passing One process sends a message Another process awaits for a message We will consider two dimensions of this approach: What form of synchronisation
More informationDISTRIBUTED COMPUTER SYSTEMS
DISTRIBUTED COMPUTER SYSTEMS Communication Fundamental REMOTE PROCEDURE CALL Dr. Jack Lange Computer Science Department University of Pittsburgh Fall 2015 Outline Communication Architecture Fundamentals
More informationTest-Driven Development of Concurrent Programs using Concuerror
Test-Driven Development of Concurrent Programs using Concuerror Alkis Gotovos 1 Maria Christakis 1 Konstantinos Sagonas 1,2 1 School of Electrical and Computer Engineering, National Technical University
More informationerlang module Erlang Programming - Lecture 8
erlang module Erlang Programming - Lecture 8 Saurabh Barjatiya Rekall Software Pvt. Ltd. 29 June, 2014 Contents erlang module Auto-imported Built-In Functions (BIFs) BIFs allowed in guard test 1 erlang
More informationEEC-682/782 Computer Networks I
EEC-682/782 Computer Networks I Lecture 15 Wenbing Zhao w.zhao1@csuohio.edu http://academic.csuohio.edu/zhao_w/teaching/eec682.htm (Lecture nodes are based on materials supplied by Dr. Louise Moser at
More informationInterprocess Communication
Interprocess Communication Reading: Silberschatz chapter 4 Additional Reading: Stallings chapter 6 EEL 358 1 Outline Introduction Shared memory systems POSIX shared memory Message passing systems Direct
More informationAnalysing and visualising callback modules of Erlang generic server behaviours
Analysing and visualising callback modules of Erlang generic server behaviours István Bozó bozoistvan@caesar.elte.hu Melinda Tóth tothmelinda@caesar.elte.hu Mátyás Béla Kuti matyas.kuti@gmail.com ELTE
More informationErlang: concurrent programming. Johan Montelius. October 2, 2016
Introduction Erlang: concurrent programming Johan Montelius October 2, 2016 In this assignment you should implement the game of life, a very simple simulation with surprising results. You will implement
More informationDistributed Places. Version 6.3. Kevin Tew. November 20, (require racket/place/distributed)
Distributed Places Version 6.3 Kevin Tew November 20, 2015 (require racket/place/distributed) package: distributed-places-lib See also 20.3 Distributed Places in The Racket Guide. Distributed places support
More informationActors and Channels in Core λ-calculi. Simon Fowler Joint work with Sam Lindley and Philip Wadler
Actors and Channels in Core λ-calculi Simon Fowler Joint work with Sam Lindley and Philip Wadler ABCD Meeting, January 2016 Actors and Channels Hopac Actors and Channels Process Actor Process Process Hopac
More informationThe do s and don ts of error handling. Joe Armstrong
The do s and don ts of error handling Joe Armstrong A system is fault tolerant if it continues working even if something is wrong Work like this is never finished it s always in-progress Hardware can fail
More informationCS 347: Distributed Databases and Transaction Processing Notes07: Reliable Distributed Database Management
CS 347: Distributed Databases and Transaction Processing Notes07: Reliable Distributed Database Management Hector Garcia-Molina CS 347 Notes07 1 Reliable distributed database management Reliability Failure
More informationProcess Control. Philipp Koehn. 23 April 2018
Process Control Philipp Koehn 23 April 2018 Control Flow 1 The CPU executes one instruction after another Typically, they are next to each other in memory (unless jumps, branches, and returns from subroutine)
More informationTwo Phase Commit Protocol. Distributed Systems. Remote Procedure Calls (RPC) Network & Distributed Operating Systems. Network OS.
A distributed system is... Distributed Systems "one on which I cannot get any work done because some machine I have never heard of has crashed". Loosely-coupled network connection could be different OSs,
More informationERLANG BITS AND PIECES
ERLANG BITS AND PIECES Curt Clifton Rose-Hulman Institute of Technology Update ErlangInClass, open bap.erl GUARDS Guards are boolean-valued Erlang expressions, used in Function definitions: max(x,y) when
More informationIntroduction. version 5.0
Introduction version 5.0 Typeset in L A TEX from SGML source using the DOCBUILDER 3.0 Document System. Contents 1 Introduction 1 1.1 Introduction.......................................... 2 Erlang and
More informationKernel Copyright Ericsson AB. All Rights Reserved. Kernel November
Kernel Copyright 1997-2009 Ericsson AB. All Rights Reserved. Kernel 2.13.4 November 23 2009 Copyright 1997-2009 Ericsson AB. All Rights Reserved. The contents of this file are subject to the Erlang Public
More informationAn introduction to Erlang & Elixir. Meetup October 28, Organized by Jean-François Cloutier Held at The Casco Bay Technology Hub, Portland, ME
An introduction to Erlang Elixir Meetup October 28, 2014 Organized by Jean-François Cloutier Held at The Casco Bay Technology Hub, Portland, ME Agenda Welcome! Why Erlang? Why Elixir? Getting Started Next
More informationVerification of Language Based Fault-Tolerance
Verification of Language Based Fault-Tolerance Clara Benac Earle 1 and Lars-Åke Fredlund 2,3 1 Computing Laboratory, University of Kent, England 2 LSIIS, Facultad de Informática, Universidad Politécnica
More informationLast time: introduction. Networks and Operating Systems ( ) Chapter 2: Processes. This time. General OS structure. The kernel is a program!
ADRIAN PERRIG & TORSTEN HOEFLER Networks and Operating Systems (252-0062-00) Chapter 2: Processes Last time: introduction Introduction: Why? February 12, 2016 Roles of the OS Referee Illusionist Glue Structure
More informationToday: Fault Tolerance
Today: Fault Tolerance Agreement in presence of faults Two army problem Byzantine generals problem Reliable communication Distributed commit Two phase commit Three phase commit Paxos Failure recovery Checkpointing
More informationConcurrency: what, why, how
Concurrency: what, why, how May 28, 2009 1 / 33 Lecture about everything and nothing Explain basic idea (pseudo) vs. Give reasons for using Present briefly different classifications approaches models and
More informationAuthor: Paul Zenden. Hot-or-Not Elixir with José Valim
Author: Paul Zenden Hot-or-Not Elixir with José Valim > > elixir with {:ok, : José Valim }
More informationKernel Copyright Ericsson AB. All Rights Reserved. Kernel 4.0 June 23, 2015
Kernel Copyright 1997-2015 Ericsson AB. All Rights Reserved. Kernel 4.0 June 23, 2015 Copyright 1997-2015 Ericsson AB. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License");
More informationCprE Fault Tolerance. Dr. Yong Guan. Department of Electrical and Computer Engineering & Information Assurance Center Iowa State University
Fault Tolerance Dr. Yong Guan Department of Electrical and Computer Engineering & Information Assurance Center Iowa State University Outline for Today s Talk Basic Concepts Process Resilience Reliable
More informationTraditionally, a Web client sends an HTTP
Editor: Steve Vinoski vinoski@ieee.org Server-Sent Events with Yaws Steve Vinoski Basho Technologies Traditionally, a Web client sends an HTTP request to a Web server and waits for a response. For many
More information