SlideShare une entreprise Scribd logo
1  sur  13
Erlang/Elixir and OTP
Gil Meir, CTO, Spectory
Erlang
• Erlang is a dynamically-typed, garbage-collected,
concurrent, functional programming language that
compiles to byte code and runs on a virtual machine
• Created at Ericsson in 1986 and is completely open
sourced (Apache v2)
• Syntax is loosely based on Prolog
Erlang (cont.)
• Share-nothing message passing (a.k.a Actor Model)
• Light weight processes (a.k.a Green Threads)
• Immutable Data Structures
• Type annotations
• Per Process Garbage Collector (soft real-time)
• Hot code loading
• Location transparency
• Runtime system monitoring and observation
• Built-in NoSQL database with ACID transactions
Open Telecom Platform
• A set of design guidelines and libs for developing
fault-tolerant, soft real-time, distributed systems
• Battle tested for over 30 years in the Telecom
industry and more recently at most of the leading
Internet companies
• Promotes a “let-it-crash” + “software watchdogs”
approach for fault-tolerance, normalizes some
aspects of Erlang
Why Elixir?
• Modern Syntax
• Unicode Strings
• Fix Accidental Complexity (dict/orddict/gb_tree)
• Meta-Programming, Protocols, Pipeline Operator, ..
• Advanced tooling and interactive development
• Superb web framework (Phoenix)
Some Fun with Elixir
More Fun with Elixir
Simple Message Passing
OTP Concepts
• Messages handled in order they are received to
avoid message leak
• Supervisor Trees – watchdogs for processes with
multiple monitor and restart strategies
• Well-defined sets of callbacks for processes that
follow the same pattern (e.g GenServer implements
start, init, handle_call, handle_cast, handle_info,
code_change, …)
• Applications – bundle modules, servers, supervisors
and configs as a single logical unit (e.g. Logger, Db)
• Release – A complete system of multiple applications
bundled together under a version number with
support for differential upgrades
Runtime Observer
• Connect to remote system
• View running processes
• View process mailboxes
• Trace messages
• View Applications
• View Supervision Trees
• View Performance Metrics
• View Logs
• Restart Processes
• View System Information
Phoenix Performance
Language Framework Throughput (req/s)
Go Gin 51,483
Elixir Phoenix 43,063
JavaScript (NodeJS) Express 9,966
Ruby Rails 3,275
• Benchmarks should never be taken too literally
• Express Cluster and Rails5 make better use of multi-core CPUs and exhibit better throughput
• YMMV
Elixir @ Spectory
Websites and Webapps
Mobile Backends
IoT Backends
Scripts
Load Testers
Web Scrapers
Chat Servers (obviously)
Jump in, the water’s fine 
Thank You
https://www.spectory.com

Contenu connexe

Tendances

Tendances (20)

SignalR 101
SignalR 101SignalR 101
SignalR 101
 
Introduction to keras
Introduction to kerasIntroduction to keras
Introduction to keras
 
What's new in ASP.NET vNext
What's new in ASP.NET vNextWhat's new in ASP.NET vNext
What's new in ASP.NET vNext
 
Deploying microservices on AWS
Deploying microservices on AWSDeploying microservices on AWS
Deploying microservices on AWS
 
Architecture Sustaining LINE Sticker services
Architecture Sustaining LINE Sticker servicesArchitecture Sustaining LINE Sticker services
Architecture Sustaining LINE Sticker services
 
How to setup a development environment for ONAP
How to setup a development environment for ONAPHow to setup a development environment for ONAP
How to setup a development environment for ONAP
 
How to contribute to an open source project and don’t die during the Code Rev...
How to contribute to an open source project and don’t die during the Code Rev...How to contribute to an open source project and don’t die during the Code Rev...
How to contribute to an open source project and don’t die during the Code Rev...
 
Gradual migration to MicroProfile
Gradual migration to MicroProfileGradual migration to MicroProfile
Gradual migration to MicroProfile
 
MuleSoft London Community November 2019 - MuleSoft and CICD
MuleSoft London Community November 2019 - MuleSoft and CICDMuleSoft London Community November 2019 - MuleSoft and CICD
MuleSoft London Community November 2019 - MuleSoft and CICD
 
Serverless Architecture Patterns - Manoj Ganapathi - Serverless Summit
Serverless Architecture Patterns - Manoj Ganapathi - Serverless SummitServerless Architecture Patterns - Manoj Ganapathi - Serverless Summit
Serverless Architecture Patterns - Manoj Ganapathi - Serverless Summit
 
Serverless Summit - Quiz
Serverless Summit - QuizServerless Summit - Quiz
Serverless Summit - Quiz
 
Logic appsforbeginners
Logic appsforbeginnersLogic appsforbeginners
Logic appsforbeginners
 
Infrastructure as Code
Infrastructure as CodeInfrastructure as Code
Infrastructure as Code
 
Infrastructure as code
Infrastructure as codeInfrastructure as code
Infrastructure as code
 
Validating latest changes with XCI
Validating latest changes with XCIValidating latest changes with XCI
Validating latest changes with XCI
 
Microservice Architecture
Microservice ArchitectureMicroservice Architecture
Microservice Architecture
 
Threading Made Easy! A Busy Developer’s Guide to Kotlin Coroutines
Threading Made Easy! A Busy Developer’s Guide to Kotlin CoroutinesThreading Made Easy! A Busy Developer’s Guide to Kotlin Coroutines
Threading Made Easy! A Busy Developer’s Guide to Kotlin Coroutines
 
Передача состояния с iPhone на Apple Watch
Передача состояния с iPhone на Apple WatchПередача состояния с iPhone на Apple Watch
Передача состояния с iPhone на Apple Watch
 
XPDDS19: Secure Unikraft Applications with Solo5 - Haibo Xu, ARM
XPDDS19: Secure Unikraft Applications with Solo5 - Haibo Xu, ARMXPDDS19: Secure Unikraft Applications with Solo5 - Haibo Xu, ARM
XPDDS19: Secure Unikraft Applications with Solo5 - Haibo Xu, ARM
 
Computer fundamental
Computer fundamentalComputer fundamental
Computer fundamental
 

Similaire à Erlang/Elixir and OTP

Cody_Zeng_HPE_Intern_Poster
Cody_Zeng_HPE_Intern_PosterCody_Zeng_HPE_Intern_Poster
Cody_Zeng_HPE_Intern_Poster
Cody Zeng
 
Oracle ExaLogic Overview
Oracle ExaLogic OverviewOracle ExaLogic Overview
Oracle ExaLogic Overview
Peter Doolan
 
Extent3 exante broker_for_algorithmic_trading_2012
Extent3 exante broker_for_algorithmic_trading_2012Extent3 exante broker_for_algorithmic_trading_2012
Extent3 exante broker_for_algorithmic_trading_2012
extentconf Tsoy
 
Typesafe stack - Scala, Akka and Play
Typesafe stack - Scala, Akka and PlayTypesafe stack - Scala, Akka and Play
Typesafe stack - Scala, Akka and Play
Luka Zakrajšek
 
Erlang及其应用
Erlang及其应用Erlang及其应用
Erlang及其应用
Feng Yu
 

Similaire à Erlang/Elixir and OTP (20)

Elixir
ElixirElixir
Elixir
 
Learning Elixir as a Rubyist
Learning Elixir as a RubyistLearning Elixir as a Rubyist
Learning Elixir as a Rubyist
 
Kubernetes Infra 2.0
Kubernetes Infra 2.0Kubernetes Infra 2.0
Kubernetes Infra 2.0
 
Cody_Zeng_HPE_Intern_Poster
Cody_Zeng_HPE_Intern_PosterCody_Zeng_HPE_Intern_Poster
Cody_Zeng_HPE_Intern_Poster
 
Whole Platform LWC11 Submission
Whole Platform LWC11 SubmissionWhole Platform LWC11 Submission
Whole Platform LWC11 Submission
 
ODP Presentation LinuxCon NA 2014
ODP Presentation LinuxCon NA 2014ODP Presentation LinuxCon NA 2014
ODP Presentation LinuxCon NA 2014
 
Hot to build continuously processing for 24/7 real-time data streaming platform?
Hot to build continuously processing for 24/7 real-time data streaming platform?Hot to build continuously processing for 24/7 real-time data streaming platform?
Hot to build continuously processing for 24/7 real-time data streaming platform?
 
Technology Fundamentals
Technology FundamentalsTechnology Fundamentals
Technology Fundamentals
 
Technology Fundamentals
Technology FundamentalsTechnology Fundamentals
Technology Fundamentals
 
Oracle ExaLogic Overview
Oracle ExaLogic OverviewOracle ExaLogic Overview
Oracle ExaLogic Overview
 
Monolithic to Microservices Architecture
Monolithic to Microservices ArchitectureMonolithic to Microservices Architecture
Monolithic to Microservices Architecture
 
Linux-Internals-and-Networking
Linux-Internals-and-NetworkingLinux-Internals-and-Networking
Linux-Internals-and-Networking
 
Extent3 exante broker_for_algorithmic_trading_2012
Extent3 exante broker_for_algorithmic_trading_2012Extent3 exante broker_for_algorithmic_trading_2012
Extent3 exante broker_for_algorithmic_trading_2012
 
Typesafe stack - Scala, Akka and Play
Typesafe stack - Scala, Akka and PlayTypesafe stack - Scala, Akka and Play
Typesafe stack - Scala, Akka and Play
 
VTU 6th Sem Elective CSE - Module 3 cloud computing
VTU 6th Sem Elective CSE - Module 3 cloud computingVTU 6th Sem Elective CSE - Module 3 cloud computing
VTU 6th Sem Elective CSE - Module 3 cloud computing
 
8. Software Development Security
8. Software Development Security8. Software Development Security
8. Software Development Security
 
Erlang及其应用
Erlang及其应用Erlang及其应用
Erlang及其应用
 
Embedded Systems: Lecture 5: A Tour in RTOS Land
Embedded Systems: Lecture 5: A Tour in RTOS LandEmbedded Systems: Lecture 5: A Tour in RTOS Land
Embedded Systems: Lecture 5: A Tour in RTOS Land
 
CISSP Prep: Ch 9. Software Development Security
CISSP Prep: Ch 9. Software Development SecurityCISSP Prep: Ch 9. Software Development Security
CISSP Prep: Ch 9. Software Development Security
 
LinuxONE cavemen mmit 20160505 v1.0
LinuxONE cavemen mmit 20160505 v1.0LinuxONE cavemen mmit 20160505 v1.0
LinuxONE cavemen mmit 20160505 v1.0
 

Dernier

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 

Dernier (20)

Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 

Erlang/Elixir and OTP

  • 1. Erlang/Elixir and OTP Gil Meir, CTO, Spectory
  • 2. Erlang • Erlang is a dynamically-typed, garbage-collected, concurrent, functional programming language that compiles to byte code and runs on a virtual machine • Created at Ericsson in 1986 and is completely open sourced (Apache v2) • Syntax is loosely based on Prolog
  • 3. Erlang (cont.) • Share-nothing message passing (a.k.a Actor Model) • Light weight processes (a.k.a Green Threads) • Immutable Data Structures • Type annotations • Per Process Garbage Collector (soft real-time) • Hot code loading • Location transparency • Runtime system monitoring and observation • Built-in NoSQL database with ACID transactions
  • 4. Open Telecom Platform • A set of design guidelines and libs for developing fault-tolerant, soft real-time, distributed systems • Battle tested for over 30 years in the Telecom industry and more recently at most of the leading Internet companies • Promotes a “let-it-crash” + “software watchdogs” approach for fault-tolerance, normalizes some aspects of Erlang
  • 5. Why Elixir? • Modern Syntax • Unicode Strings • Fix Accidental Complexity (dict/orddict/gb_tree) • Meta-Programming, Protocols, Pipeline Operator, .. • Advanced tooling and interactive development • Superb web framework (Phoenix)
  • 6. Some Fun with Elixir
  • 7. More Fun with Elixir
  • 9. OTP Concepts • Messages handled in order they are received to avoid message leak • Supervisor Trees – watchdogs for processes with multiple monitor and restart strategies • Well-defined sets of callbacks for processes that follow the same pattern (e.g GenServer implements start, init, handle_call, handle_cast, handle_info, code_change, …) • Applications – bundle modules, servers, supervisors and configs as a single logical unit (e.g. Logger, Db) • Release – A complete system of multiple applications bundled together under a version number with support for differential upgrades
  • 10. Runtime Observer • Connect to remote system • View running processes • View process mailboxes • Trace messages • View Applications • View Supervision Trees • View Performance Metrics • View Logs • Restart Processes • View System Information
  • 11. Phoenix Performance Language Framework Throughput (req/s) Go Gin 51,483 Elixir Phoenix 43,063 JavaScript (NodeJS) Express 9,966 Ruby Rails 3,275 • Benchmarks should never be taken too literally • Express Cluster and Rails5 make better use of multi-core CPUs and exhibit better throughput • YMMV
  • 12. Elixir @ Spectory Websites and Webapps Mobile Backends IoT Backends Scripts Load Testers Web Scrapers Chat Servers (obviously) Jump in, the water’s fine 