SlideShare a Scribd company logo
1 of 26
Download to read offline
Erlang Developments 
Enrique Paz @quiquepaz 
1/22
Introduction About me 
 Erlang Developer since 2008 
 Developing voteraise.com in Ocaml 
 Trying tech leadership @KPN 
2/22
Introduction Disclaimer 
sort_for_talk([Good,Bad,Ugly])- 
[Bad,Ugly,Good]. 
All comments to come are personal opinions. 
Read others’ in the WWW before making up your own 
3/22
The Bad 
4/22
The Bad (Un)Suitability 
Erlang is not a silver bullet 
 Number Crunching 
 Text/String Processing 
 XML and SOAP based Web Services 
“All can be done given time and money” - Ferenc Holzhauser 
5/22
The Bad Learning Curve 
 Design: Processes VS Objects 
I Technical knowledge required 
I Domain knowledge is harder to map 
 Functional Programming 
I Awesome (if you’ve felt the imperative pain) 
I Risk of callback hell 
6/22
The Bad What has improved 
 Learn You Some Erlang 
 Erlang Solutions Webinars 
 Erlang OTP in Action 
 Designing for Scalability with 
Erlang OTP 
7/22
The Ugly 
8/22
The Ugly Syntax 
 Erlang 
myfun(Opts) - 
What = proplists:get_value(what,Opts,some), 
io:format(Doing ~s~n, [What]), 
L = [1, 2, 3], 
lists:foldl(fun(X, Acc) - 
X + Acc 
end, 0, L). 
9/22
The Ugly Syntax 
 Erlang 
myfun(Opts) - 
What = proplists:get_value(what,Opts,some), 
io:format(Doing ~s~n, [What]), 
L = [1, 2, 3], 
lists:foldl(fun(X, Acc) - 
X + Acc 
end, 0, L). 
 Python 
myfun(what=some): 
print (Doing {thing}.format(thing=what) 
l = [1, 2, 3,], 
return reduce(lambda x, y: x + y, l, 0) 
9/22
The Ugly (lack of) Typesystem 
 Erlang 
myfold(F, Acc, []) - Acc; 
myfold(F, Acc, [H|T]) - myfold(F, F(H,Acc), T). 
myfold(fun(X) - X + 1 end, 0, [1, 2, 3]). 
% Error on runtime!! 
10/22
The Ugly (lack of) Typesystem 
 Erlang 
myfold(F, Acc, []) - Acc; 
myfold(F, Acc, [H|T]) - myfold(F, F(H,Acc), T). 
myfold(fun(X) - X + 1 end, 0, [1, 2, 3]). 
% Error on runtime!! 
 Ocaml 
let rec myfold f acc = function 
| [] - Acc 
| h::t - myfold f (f h acc) t 
# val myfold:(’a -’b-’b)-’b-’a list-’b=fun 
myfold (fun x - x+1) 0 [1;2;3] 
# Compilation error!! (could have used (+)) 
10/22
The Ugly What has improved 
 Elixir: a new language for the Erlang VM 
def myfun(what  ’some’) do 
IO.puts Doing #{what} 
l = [1, 2, 3] 
List.foldl l, 0, (1 + 2) 
end 
11/22
The Ugly What has improved 
 Elixir: a new language for the Erlang VM 
def myfun(what  ’some’) do 
IO.puts Doing #{what} 
l = [1, 2, 3] 
List.foldl l, 0, (1 + 2) 
end 
I Direct mixing of Erlang and Elixir code 
I Ruby-like syntax 
I Adoption? 
11/22
The Ugly What has improved 
 Dialyzer: Static type analyzer for Erlang code 
-type opt()::{what, string()}. 
-spec my_fun([opt()]) - pos_integer(). 
12/22
The Ugly What has improved 
 Dialyzer: Static type analyzer for Erlang code 
-type opt()::{what, string()}. 
-spec my_fun([opt()]) - pos_integer(). 
I Improved error catching 
I Improved error reporting 
I Ideally, all the code you use should be typed 
I Still no support for ETS and debugger match_specs 
I Dialyxir for Elixir projects 
12/22
The Good 
13/22
The Good Less Code 
 Functional = re-usability 
 OTP framework: structure and patterns 
 In code assertions / Let it crash 
ok = file:write_file(MyFile, Hello!) 
 Bit syntax 
?IP_VERSION:4, HLen:4, SrvcType:8, 
TotLen:16, ID:16, Flgs:3, FragOff:13, 
TTL:8, Proto:8, HdrChkSum:16, SrcIP:32, 
DestIP:32, RestDgram/binary = IpPkg 
14/22
The Good Less Engineers 
 High engineering level 
I Not trivial to learn 
I Usually not the 1st language 
 The WhatsApp example: 
I 450M users 
I  25 Engineers building client Apps 
I  6 Erlang Engineers building the server 
I  75M users / Erlang Engineer 
15/22
The Good Highly Available 
Availability1 of Erlang based telephone switches in late 
1980s 
 AXD301 reported 9.99999999% 
(nine nines) availability 
 0.6 seconds per 20 years 
1Joe Armstrong: http://pragprog.com/articles/erlang 
16/22
The Good Highly Available 
 Supervision trees provide automatic recovery 
 No downtime system upgrades 
1. Create appup 
2. Generate relup 
3. Deploy relup 
4. Instruct target system to upgrade itself 
17/22
The Good Scalable 
 Light Parallel processes 
I Quick to create: 660K processes/sec 
I  300 words / standard process (2.4KB) 
I No shared memory 2 
I 1 process per: user session, HTTP call. . . 
 Well known bottlenecks 
I gen_server serialization 
I Long lived NIFs 
I Disk I/O 
2almost 
18/22
The Good The community 
 Erlang Mailing List 
 Erlang Central LIVE chat 
 Erlang Camp 
 Erlang Factory (San Francisco) 
 Erlang User Conference (Stockholm) 
 Erlang Factory Lite: Berlin, Moscow, 
NY, Paris, Chicago. . . 
19/22
The Good What has improved 
 Forced wake up (+sfwi) for schedulers 
 ETS concurrency 
 enif_schedule_nif/0 for partitioned NIF invocation 
 Scalability on multicore (RELEASE) 
 And a ton of awesome applications: 
I Nifty 
I Cowboy 
I Concuerror 
I Piqi 
I . . . and, of course. . . 
20/22
The Good What has improved 
21/22
Wrapping up Questions 
22/22

More Related Content

What's hot

1 hour dive into Erlang/OTP
1 hour dive into Erlang/OTP1 hour dive into Erlang/OTP
1 hour dive into Erlang/OTPJordi Llonch
 
Comparing Cpp And Erlang For Motorola Telecoms Software
Comparing Cpp And Erlang For Motorola Telecoms SoftwareComparing Cpp And Erlang For Motorola Telecoms Software
Comparing Cpp And Erlang For Motorola Telecoms Softwarel xf
 
Improving Robustness In Distributed Systems
Improving Robustness In Distributed SystemsImproving Robustness In Distributed Systems
Improving Robustness In Distributed Systemsl xf
 
Sioux Hot-or-Not: Functional programming: unlocking the real power of multi-c...
Sioux Hot-or-Not: Functional programming: unlocking the real power of multi-c...Sioux Hot-or-Not: Functional programming: unlocking the real power of multi-c...
Sioux Hot-or-Not: Functional programming: unlocking the real power of multi-c...siouxhotornot
 
Parallel program design
Parallel program designParallel program design
Parallel program designZongYing Lyu
 
Event Driven with LibUV and ZeroMQ
Event Driven with LibUV and ZeroMQEvent Driven with LibUV and ZeroMQ
Event Driven with LibUV and ZeroMQLuke Luo
 
Os Worthington
Os WorthingtonOs Worthington
Os Worthingtonoscon2007
 
Yacc (yet another compiler compiler)
Yacc (yet another compiler compiler)Yacc (yet another compiler compiler)
Yacc (yet another compiler compiler)omercomail
 
Yacc topic beyond syllabus
Yacc   topic beyond syllabusYacc   topic beyond syllabus
Yacc topic beyond syllabusJK Knowledge
 
Pascal Programming Language
Pascal Programming LanguagePascal Programming Language
Pascal Programming LanguageReham AlBlehid
 
Lex tool manual
Lex tool manualLex tool manual
Lex tool manualSami Said
 
Basic buffer overflow part1
Basic buffer overflow part1Basic buffer overflow part1
Basic buffer overflow part1Payampardaz
 

What's hot (20)

Erlang
ErlangErlang
Erlang
 
1 hour dive into Erlang/OTP
1 hour dive into Erlang/OTP1 hour dive into Erlang/OTP
1 hour dive into Erlang/OTP
 
Comparing Cpp And Erlang For Motorola Telecoms Software
Comparing Cpp And Erlang For Motorola Telecoms SoftwareComparing Cpp And Erlang For Motorola Telecoms Software
Comparing Cpp And Erlang For Motorola Telecoms Software
 
Improving Robustness In Distributed Systems
Improving Robustness In Distributed SystemsImproving Robustness In Distributed Systems
Improving Robustness In Distributed Systems
 
Sioux Hot-or-Not: Functional programming: unlocking the real power of multi-c...
Sioux Hot-or-Not: Functional programming: unlocking the real power of multi-c...Sioux Hot-or-Not: Functional programming: unlocking the real power of multi-c...
Sioux Hot-or-Not: Functional programming: unlocking the real power of multi-c...
 
Parallel program design
Parallel program designParallel program design
Parallel program design
 
Lex & yacc
Lex & yaccLex & yacc
Lex & yacc
 
LEX & YACC
LEX & YACCLEX & YACC
LEX & YACC
 
Event Driven with LibUV and ZeroMQ
Event Driven with LibUV and ZeroMQEvent Driven with LibUV and ZeroMQ
Event Driven with LibUV and ZeroMQ
 
Logic programming in python
Logic programming in pythonLogic programming in python
Logic programming in python
 
Run rmi
Run rmiRun rmi
Run rmi
 
Os Worthington
Os WorthingtonOs Worthington
Os Worthington
 
Yacc (yet another compiler compiler)
Yacc (yet another compiler compiler)Yacc (yet another compiler compiler)
Yacc (yet another compiler compiler)
 
OIVM
OIVMOIVM
OIVM
 
Yacc topic beyond syllabus
Yacc   topic beyond syllabusYacc   topic beyond syllabus
Yacc topic beyond syllabus
 
Elixir
ElixirElixir
Elixir
 
Pascal Programming Language
Pascal Programming LanguagePascal Programming Language
Pascal Programming Language
 
Lex tool manual
Lex tool manualLex tool manual
Lex tool manual
 
Yacc
YaccYacc
Yacc
 
Basic buffer overflow part1
Basic buffer overflow part1Basic buffer overflow part1
Basic buffer overflow part1
 

Viewers also liked

The mystique of erlang
The mystique of erlangThe mystique of erlang
The mystique of erlangCarob Cherub
 
Ruby Code Optimizations (for beginners)
Ruby Code Optimizations (for beginners)Ruby Code Optimizations (for beginners)
Ruby Code Optimizations (for beginners)chirantan.rajhans
 
Testing an Erlang Backend
Testing an Erlang BackendTesting an Erlang Backend
Testing an Erlang Backendenriquepazperez
 
Spilgames Storage Platform
Spilgames Storage PlatformSpilgames Storage Platform
Spilgames Storage Platformenriquepazperez
 
A Widget Based Web Platform
A Widget Based Web PlatformA Widget Based Web Platform
A Widget Based Web Platformenriquepazperez
 
Learn You Some Erlang for great good! 日本語化プロジェクト
Learn You Some Erlang for great good! 日本語化プロジェクトLearn You Some Erlang for great good! 日本語化プロジェクト
Learn You Some Erlang for great good! 日本語化プロジェクトYoshifumi Yamaguchi
 
Clojure Reducers / clj-syd Aug 2012
Clojure Reducers / clj-syd Aug 2012Clojure Reducers / clj-syd Aug 2012
Clojure Reducers / clj-syd Aug 2012Leonardo Borges
 
Caching Strategies for an Erlang Based Web Stack
Caching Strategies for an Erlang Based Web StackCaching Strategies for an Erlang Based Web Stack
Caching Strategies for an Erlang Based Web Stackenriquepazperez
 
learn you some erlang - chap0 to chap2
learn you some erlang - chap0 to chap2learn you some erlang - chap0 to chap2
learn you some erlang - chap0 to chap2경미 김
 
Erlang Concurrency
Erlang ConcurrencyErlang Concurrency
Erlang ConcurrencyBarry Ezell
 
Lightning Talk: Erlang on Xen - Mikhail Bortnyk
Lightning Talk: Erlang on Xen - Mikhail BortnykLightning Talk: Erlang on Xen - Mikhail Bortnyk
Lightning Talk: Erlang on Xen - Mikhail BortnykElixir Club
 
Introduction to Couchbase Server 2.0
Introduction to Couchbase Server 2.0Introduction to Couchbase Server 2.0
Introduction to Couchbase Server 2.0Dipti Borkar
 
A Beginners Guide to Erlang_Erlang Factory Lite_Munich 2013
A Beginners Guide to Erlang_Erlang Factory Lite_Munich 2013A Beginners Guide to Erlang_Erlang Factory Lite_Munich 2013
A Beginners Guide to Erlang_Erlang Factory Lite_Munich 2013Wooga
 

Viewers also liked (20)

The mystique of erlang
The mystique of erlangThe mystique of erlang
The mystique of erlang
 
Ruby Code Optimizations (for beginners)
Ruby Code Optimizations (for beginners)Ruby Code Optimizations (for beginners)
Ruby Code Optimizations (for beginners)
 
Testing an Erlang Backend
Testing an Erlang BackendTesting an Erlang Backend
Testing an Erlang Backend
 
Spilgames Storage Platform
Spilgames Storage PlatformSpilgames Storage Platform
Spilgames Storage Platform
 
PropErty based testing
PropErty based testingPropErty based testing
PropErty based testing
 
A Web Widget Platform
A Web Widget PlatformA Web Widget Platform
A Web Widget Platform
 
A Widget Based Web Platform
A Widget Based Web PlatformA Widget Based Web Platform
A Widget Based Web Platform
 
Learn You Some Erlang for great good! 日本語化プロジェクト
Learn You Some Erlang for great good! 日本語化プロジェクトLearn You Some Erlang for great good! 日本語化プロジェクト
Learn You Some Erlang for great good! 日本語化プロジェクト
 
Clojure Reducers / clj-syd Aug 2012
Clojure Reducers / clj-syd Aug 2012Clojure Reducers / clj-syd Aug 2012
Clojure Reducers / clj-syd Aug 2012
 
Monads in Clojure
Monads in ClojureMonads in Clojure
Monads in Clojure
 
Caching Strategies for an Erlang Based Web Stack
Caching Strategies for an Erlang Based Web StackCaching Strategies for an Erlang Based Web Stack
Caching Strategies for an Erlang Based Web Stack
 
BEAMing With Joy
BEAMing With JoyBEAMing With Joy
BEAMing With Joy
 
learn you some erlang - chap0 to chap2
learn you some erlang - chap0 to chap2learn you some erlang - chap0 to chap2
learn you some erlang - chap0 to chap2
 
Erlang Concurrency
Erlang ConcurrencyErlang Concurrency
Erlang Concurrency
 
Elixir basics
Elixir basicsElixir basics
Elixir basics
 
Lightning Talk: Erlang on Xen - Mikhail Bortnyk
Lightning Talk: Erlang on Xen - Mikhail BortnykLightning Talk: Erlang on Xen - Mikhail Bortnyk
Lightning Talk: Erlang on Xen - Mikhail Bortnyk
 
Introduction to Couchbase Server 2.0
Introduction to Couchbase Server 2.0Introduction to Couchbase Server 2.0
Introduction to Couchbase Server 2.0
 
Why erlang
Why erlangWhy erlang
Why erlang
 
Erlang on OSv
Erlang on OSvErlang on OSv
Erlang on OSv
 
A Beginners Guide to Erlang_Erlang Factory Lite_Munich 2013
A Beginners Guide to Erlang_Erlang Factory Lite_Munich 2013A Beginners Guide to Erlang_Erlang Factory Lite_Munich 2013
A Beginners Guide to Erlang_Erlang Factory Lite_Munich 2013
 

Similar to Erlang Developments: The Good, The Bad and The Ugly

Introduction To Erlang Final
Introduction To Erlang   FinalIntroduction To Erlang   Final
Introduction To Erlang FinalSinarShebl
 
Introduction to Erlang/(Elixir) at a Webilea Hands-On Session
Introduction to Erlang/(Elixir) at a Webilea Hands-On SessionIntroduction to Erlang/(Elixir) at a Webilea Hands-On Session
Introduction to Erlang/(Elixir) at a Webilea Hands-On SessionAndré Graf
 
Elixir and elm
Elixir and elmElixir and elm
Elixir and elmMix & Go
 
Keynote joearmstrong
Keynote joearmstrongKeynote joearmstrong
Keynote joearmstrongSentifi
 
Erlang plus BDB: Disrupting the Conventional Web Wisdom
Erlang plus BDB: Disrupting the Conventional Web WisdomErlang plus BDB: Disrupting the Conventional Web Wisdom
Erlang plus BDB: Disrupting the Conventional Web Wisdomguest3933de
 
Hierarchical free monads and software design in fp
Hierarchical free monads and software design in fpHierarchical free monads and software design in fp
Hierarchical free monads and software design in fpAlexander Granin
 
Magic Clusters and Where to Find Them - Eugene Pirogov
Magic Clusters and Where to Find Them - Eugene PirogovMagic Clusters and Where to Find Them - Eugene Pirogov
Magic Clusters and Where to Find Them - Eugene PirogovElixir Club
 
Online test program generator for RISC-V processors
Online test program generator for RISC-V processorsOnline test program generator for RISC-V processors
Online test program generator for RISC-V processorsRISC-V International
 
Magic Clusters and Where to Find Them 2.0 - Eugene Pirogov
Magic Clusters and Where to Find Them 2.0 - Eugene Pirogov Magic Clusters and Where to Find Them 2.0 - Eugene Pirogov
Magic Clusters and Where to Find Them 2.0 - Eugene Pirogov Elixir Club
 
Introduction to Elixir
Introduction to ElixirIntroduction to Elixir
Introduction to Elixirbrien_wankel
 
Specialized Compiler for Hash Cracking
Specialized Compiler for Hash CrackingSpecialized Compiler for Hash Cracking
Specialized Compiler for Hash CrackingPositive Hack Days
 
The why and how of moving to php 7
The why and how of moving to php 7The why and how of moving to php 7
The why and how of moving to php 7Wim Godden
 
Improved Reliable Streaming Processing: Apache Storm as example
Improved Reliable Streaming Processing: Apache Storm as exampleImproved Reliable Streaming Processing: Apache Storm as example
Improved Reliable Streaming Processing: Apache Storm as exampleDataWorks Summit/Hadoop Summit
 
NDC London 2014: Erlang Patterns Matching Business Needs
NDC London 2014: Erlang Patterns Matching Business NeedsNDC London 2014: Erlang Patterns Matching Business Needs
NDC London 2014: Erlang Patterns Matching Business NeedsTorben Hoffmann
 
The why and how of moving to php 7.x
The why and how of moving to php 7.xThe why and how of moving to php 7.x
The why and how of moving to php 7.xWim Godden
 
Kostis Sagonas: Cool Tools for Modern Erlang Program Developmen
Kostis Sagonas: Cool Tools for Modern Erlang Program DevelopmenKostis Sagonas: Cool Tools for Modern Erlang Program Developmen
Kostis Sagonas: Cool Tools for Modern Erlang Program DevelopmenKonstantin Sorokin
 
JDD 2016 - Grzegorz Rozniecki - Java 8 What Could Possibly Go Wrong
JDD 2016 - Grzegorz Rozniecki - Java 8 What Could Possibly Go WrongJDD 2016 - Grzegorz Rozniecki - Java 8 What Could Possibly Go Wrong
JDD 2016 - Grzegorz Rozniecki - Java 8 What Could Possibly Go WrongPROIDEA
 

Similar to Erlang Developments: The Good, The Bad and The Ugly (20)

Erlang, an overview
Erlang, an overviewErlang, an overview
Erlang, an overview
 
Introduction To Erlang Final
Introduction To Erlang   FinalIntroduction To Erlang   Final
Introduction To Erlang Final
 
Introduction to Erlang/(Elixir) at a Webilea Hands-On Session
Introduction to Erlang/(Elixir) at a Webilea Hands-On SessionIntroduction to Erlang/(Elixir) at a Webilea Hands-On Session
Introduction to Erlang/(Elixir) at a Webilea Hands-On Session
 
Elixir and elm
Elixir and elmElixir and elm
Elixir and elm
 
Keynote joearmstrong
Keynote joearmstrongKeynote joearmstrong
Keynote joearmstrong
 
Erlang plus BDB: Disrupting the Conventional Web Wisdom
Erlang plus BDB: Disrupting the Conventional Web WisdomErlang plus BDB: Disrupting the Conventional Web Wisdom
Erlang plus BDB: Disrupting the Conventional Web Wisdom
 
Disrupt
DisruptDisrupt
Disrupt
 
Hierarchical free monads and software design in fp
Hierarchical free monads and software design in fpHierarchical free monads and software design in fp
Hierarchical free monads and software design in fp
 
Magic Clusters and Where to Find Them - Eugene Pirogov
Magic Clusters and Where to Find Them - Eugene PirogovMagic Clusters and Where to Find Them - Eugene Pirogov
Magic Clusters and Where to Find Them - Eugene Pirogov
 
Online test program generator for RISC-V processors
Online test program generator for RISC-V processorsOnline test program generator for RISC-V processors
Online test program generator for RISC-V processors
 
Magic Clusters and Where to Find Them 2.0 - Eugene Pirogov
Magic Clusters and Where to Find Them 2.0 - Eugene Pirogov Magic Clusters and Where to Find Them 2.0 - Eugene Pirogov
Magic Clusters and Where to Find Them 2.0 - Eugene Pirogov
 
Introduction to Elixir
Introduction to ElixirIntroduction to Elixir
Introduction to Elixir
 
Specialized Compiler for Hash Cracking
Specialized Compiler for Hash CrackingSpecialized Compiler for Hash Cracking
Specialized Compiler for Hash Cracking
 
The why and how of moving to php 7
The why and how of moving to php 7The why and how of moving to php 7
The why and how of moving to php 7
 
Improved Reliable Streaming Processing: Apache Storm as example
Improved Reliable Streaming Processing: Apache Storm as exampleImproved Reliable Streaming Processing: Apache Storm as example
Improved Reliable Streaming Processing: Apache Storm as example
 
NDC London 2014: Erlang Patterns Matching Business Needs
NDC London 2014: Erlang Patterns Matching Business NeedsNDC London 2014: Erlang Patterns Matching Business Needs
NDC London 2014: Erlang Patterns Matching Business Needs
 
Elixir introduction
Elixir introductionElixir introduction
Elixir introduction
 
The why and how of moving to php 7.x
The why and how of moving to php 7.xThe why and how of moving to php 7.x
The why and how of moving to php 7.x
 
Kostis Sagonas: Cool Tools for Modern Erlang Program Developmen
Kostis Sagonas: Cool Tools for Modern Erlang Program DevelopmenKostis Sagonas: Cool Tools for Modern Erlang Program Developmen
Kostis Sagonas: Cool Tools for Modern Erlang Program Developmen
 
JDD 2016 - Grzegorz Rozniecki - Java 8 What Could Possibly Go Wrong
JDD 2016 - Grzegorz Rozniecki - Java 8 What Could Possibly Go WrongJDD 2016 - Grzegorz Rozniecki - Java 8 What Could Possibly Go Wrong
JDD 2016 - Grzegorz Rozniecki - Java 8 What Could Possibly Go Wrong
 

Recently uploaded

complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...asadnawaz62
 
Main Memory Management in Operating System
Main Memory Management in Operating SystemMain Memory Management in Operating System
Main Memory Management in Operating SystemRashmi Bhat
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxKartikeyaDwivedi3
 
Industrial Safety Unit-IV workplace health and safety.ppt
Industrial Safety Unit-IV workplace health and safety.pptIndustrial Safety Unit-IV workplace health and safety.ppt
Industrial Safety Unit-IV workplace health and safety.pptNarmatha D
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
 
Class 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm SystemClass 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm Systemirfanmechengr
 
The SRE Report 2024 - Great Findings for the teams
The SRE Report 2024 - Great Findings for the teamsThe SRE Report 2024 - Great Findings for the teams
The SRE Report 2024 - Great Findings for the teamsDILIPKUMARMONDAL6
 
Internet of things -Arshdeep Bahga .pptx
Internet of things -Arshdeep Bahga .pptxInternet of things -Arshdeep Bahga .pptx
Internet of things -Arshdeep Bahga .pptxVelmuruganTECE
 
Industrial Safety Unit-I SAFETY TERMINOLOGIES
Industrial Safety Unit-I SAFETY TERMINOLOGIESIndustrial Safety Unit-I SAFETY TERMINOLOGIES
Industrial Safety Unit-I SAFETY TERMINOLOGIESNarmatha D
 
Virtual memory management in Operating System
Virtual memory management in Operating SystemVirtual memory management in Operating System
Virtual memory management in Operating SystemRashmi Bhat
 
Energy Awareness training ppt for manufacturing process.pptx
Energy Awareness training ppt for manufacturing process.pptxEnergy Awareness training ppt for manufacturing process.pptx
Energy Awareness training ppt for manufacturing process.pptxsiddharthjain2303
 
Research Methodology for Engineering pdf
Research Methodology for Engineering pdfResearch Methodology for Engineering pdf
Research Methodology for Engineering pdfCaalaaAbdulkerim
 
Arduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptArduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptSAURABHKUMAR892774
 
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsyncWhy does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsyncssuser2ae721
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
home automation using Arduino by Aditya Prasad
home automation using Arduino by Aditya Prasadhome automation using Arduino by Aditya Prasad
home automation using Arduino by Aditya Prasadaditya806802
 
Steel Structures - Building technology.pptx
Steel Structures - Building technology.pptxSteel Structures - Building technology.pptx
Steel Structures - Building technology.pptxNikhil Raut
 
System Simulation and Modelling with types and Event Scheduling
System Simulation and Modelling with types and Event SchedulingSystem Simulation and Modelling with types and Event Scheduling
System Simulation and Modelling with types and Event SchedulingBootNeck1
 
Indian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.pptIndian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.pptMadan Karki
 
US Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of ActionUS Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of ActionMebane Rash
 

Recently uploaded (20)

complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...
 
Main Memory Management in Operating System
Main Memory Management in Operating SystemMain Memory Management in Operating System
Main Memory Management in Operating System
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptx
 
Industrial Safety Unit-IV workplace health and safety.ppt
Industrial Safety Unit-IV workplace health and safety.pptIndustrial Safety Unit-IV workplace health and safety.ppt
Industrial Safety Unit-IV workplace health and safety.ppt
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
 
Class 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm SystemClass 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm System
 
The SRE Report 2024 - Great Findings for the teams
The SRE Report 2024 - Great Findings for the teamsThe SRE Report 2024 - Great Findings for the teams
The SRE Report 2024 - Great Findings for the teams
 
Internet of things -Arshdeep Bahga .pptx
Internet of things -Arshdeep Bahga .pptxInternet of things -Arshdeep Bahga .pptx
Internet of things -Arshdeep Bahga .pptx
 
Industrial Safety Unit-I SAFETY TERMINOLOGIES
Industrial Safety Unit-I SAFETY TERMINOLOGIESIndustrial Safety Unit-I SAFETY TERMINOLOGIES
Industrial Safety Unit-I SAFETY TERMINOLOGIES
 
Virtual memory management in Operating System
Virtual memory management in Operating SystemVirtual memory management in Operating System
Virtual memory management in Operating System
 
Energy Awareness training ppt for manufacturing process.pptx
Energy Awareness training ppt for manufacturing process.pptxEnergy Awareness training ppt for manufacturing process.pptx
Energy Awareness training ppt for manufacturing process.pptx
 
Research Methodology for Engineering pdf
Research Methodology for Engineering pdfResearch Methodology for Engineering pdf
Research Methodology for Engineering pdf
 
Arduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptArduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.ppt
 
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsyncWhy does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
home automation using Arduino by Aditya Prasad
home automation using Arduino by Aditya Prasadhome automation using Arduino by Aditya Prasad
home automation using Arduino by Aditya Prasad
 
Steel Structures - Building technology.pptx
Steel Structures - Building technology.pptxSteel Structures - Building technology.pptx
Steel Structures - Building technology.pptx
 
System Simulation and Modelling with types and Event Scheduling
System Simulation and Modelling with types and Event SchedulingSystem Simulation and Modelling with types and Event Scheduling
System Simulation and Modelling with types and Event Scheduling
 
Indian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.pptIndian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.ppt
 
US Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of ActionUS Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of Action
 

Erlang Developments: The Good, The Bad and The Ugly

  • 1. Erlang Developments Enrique Paz @quiquepaz 1/22
  • 2. Introduction About me Erlang Developer since 2008 Developing voteraise.com in Ocaml Trying tech leadership @KPN 2/22
  • 3. Introduction Disclaimer sort_for_talk([Good,Bad,Ugly])- [Bad,Ugly,Good]. All comments to come are personal opinions. Read others’ in the WWW before making up your own 3/22
  • 5. The Bad (Un)Suitability Erlang is not a silver bullet Number Crunching Text/String Processing XML and SOAP based Web Services “All can be done given time and money” - Ferenc Holzhauser 5/22
  • 6. The Bad Learning Curve Design: Processes VS Objects I Technical knowledge required I Domain knowledge is harder to map Functional Programming I Awesome (if you’ve felt the imperative pain) I Risk of callback hell 6/22
  • 7. The Bad What has improved Learn You Some Erlang Erlang Solutions Webinars Erlang OTP in Action Designing for Scalability with Erlang OTP 7/22
  • 9. The Ugly Syntax Erlang myfun(Opts) - What = proplists:get_value(what,Opts,some), io:format(Doing ~s~n, [What]), L = [1, 2, 3], lists:foldl(fun(X, Acc) - X + Acc end, 0, L). 9/22
  • 10. The Ugly Syntax Erlang myfun(Opts) - What = proplists:get_value(what,Opts,some), io:format(Doing ~s~n, [What]), L = [1, 2, 3], lists:foldl(fun(X, Acc) - X + Acc end, 0, L). Python myfun(what=some): print (Doing {thing}.format(thing=what) l = [1, 2, 3,], return reduce(lambda x, y: x + y, l, 0) 9/22
  • 11. The Ugly (lack of) Typesystem Erlang myfold(F, Acc, []) - Acc; myfold(F, Acc, [H|T]) - myfold(F, F(H,Acc), T). myfold(fun(X) - X + 1 end, 0, [1, 2, 3]). % Error on runtime!! 10/22
  • 12. The Ugly (lack of) Typesystem Erlang myfold(F, Acc, []) - Acc; myfold(F, Acc, [H|T]) - myfold(F, F(H,Acc), T). myfold(fun(X) - X + 1 end, 0, [1, 2, 3]). % Error on runtime!! Ocaml let rec myfold f acc = function | [] - Acc | h::t - myfold f (f h acc) t # val myfold:(’a -’b-’b)-’b-’a list-’b=fun myfold (fun x - x+1) 0 [1;2;3] # Compilation error!! (could have used (+)) 10/22
  • 13. The Ugly What has improved Elixir: a new language for the Erlang VM def myfun(what ’some’) do IO.puts Doing #{what} l = [1, 2, 3] List.foldl l, 0, (1 + 2) end 11/22
  • 14. The Ugly What has improved Elixir: a new language for the Erlang VM def myfun(what ’some’) do IO.puts Doing #{what} l = [1, 2, 3] List.foldl l, 0, (1 + 2) end I Direct mixing of Erlang and Elixir code I Ruby-like syntax I Adoption? 11/22
  • 15. The Ugly What has improved Dialyzer: Static type analyzer for Erlang code -type opt()::{what, string()}. -spec my_fun([opt()]) - pos_integer(). 12/22
  • 16. The Ugly What has improved Dialyzer: Static type analyzer for Erlang code -type opt()::{what, string()}. -spec my_fun([opt()]) - pos_integer(). I Improved error catching I Improved error reporting I Ideally, all the code you use should be typed I Still no support for ETS and debugger match_specs I Dialyxir for Elixir projects 12/22
  • 18. The Good Less Code Functional = re-usability OTP framework: structure and patterns In code assertions / Let it crash ok = file:write_file(MyFile, Hello!) Bit syntax ?IP_VERSION:4, HLen:4, SrvcType:8, TotLen:16, ID:16, Flgs:3, FragOff:13, TTL:8, Proto:8, HdrChkSum:16, SrcIP:32, DestIP:32, RestDgram/binary = IpPkg 14/22
  • 19. The Good Less Engineers High engineering level I Not trivial to learn I Usually not the 1st language The WhatsApp example: I 450M users I 25 Engineers building client Apps I 6 Erlang Engineers building the server I 75M users / Erlang Engineer 15/22
  • 20. The Good Highly Available Availability1 of Erlang based telephone switches in late 1980s AXD301 reported 9.99999999% (nine nines) availability 0.6 seconds per 20 years 1Joe Armstrong: http://pragprog.com/articles/erlang 16/22
  • 21. The Good Highly Available Supervision trees provide automatic recovery No downtime system upgrades 1. Create appup 2. Generate relup 3. Deploy relup 4. Instruct target system to upgrade itself 17/22
  • 22. The Good Scalable Light Parallel processes I Quick to create: 660K processes/sec I 300 words / standard process (2.4KB) I No shared memory 2 I 1 process per: user session, HTTP call. . . Well known bottlenecks I gen_server serialization I Long lived NIFs I Disk I/O 2almost 18/22
  • 23. The Good The community Erlang Mailing List Erlang Central LIVE chat Erlang Camp Erlang Factory (San Francisco) Erlang User Conference (Stockholm) Erlang Factory Lite: Berlin, Moscow, NY, Paris, Chicago. . . 19/22
  • 24. The Good What has improved Forced wake up (+sfwi) for schedulers ETS concurrency enif_schedule_nif/0 for partitioned NIF invocation Scalability on multicore (RELEASE) And a ton of awesome applications: I Nifty I Cowboy I Concuerror I Piqi I . . . and, of course. . . 20/22
  • 25. The Good What has improved 21/22