SlideShare a Scribd company logo
1 of 16
PROCESSE
ELIXIR
OVERVIEW
TODAY’S AGENDA - PROCESSES
▸Why processes?
▸Conceptual framework
▸Basic usage
▸Next steps
ELIXIR PROCESSES
WHY PROCESSES?
▸Need more throughput
▸Run parallel computations
▸Concurrency causes problems
▸Control of failure
GIVEN A LIST
OF CITIES
AND A
WEATHER API
User Story
PROCESSES
OVERVIEW
▸ Not a server process or thread
▸ A process in the Erlang VM (BEAM)
▸ Lightweight
▸ Utilizes all cores
ELIXIR PROCESSES
ELIXIR PROCESSES
▸send and receive messages
▸unique process id
▸message mailbox
▸execute asynchronously
▸isolated - no shared memory
▸hold state
ELIXIR PROCESSES
DRAW IT
OUTPROCESS INTERACTIONS CAN BE DIFFICULT TO REASON ABOUT
A SIMPLE DIAGRAM CAN MAKE IT MUCH EASIER
GIVEN A LIST
OF CITIES
AND A
WEATHER API
User Story
ELIXIR PROCESSES VS
RUBY OBJECTS
▸ #spawn #new
▸ process id instance
▸ #send/#receive .
▸ has state has state
▸ isolated memory shared memory
▸ asynchronous synchronous
live coding - spawn, send, receive
GIVEN A LIST
OF CITIES
AND A
WEATHER API
User Story
ELIXIR PROCESSES
LINKING PROCESSES
▸Link processes with #spawn_link
▸Linking creates a parent-child relationship
▸Child exits by default cause the parent to exit
▸Exits can be “trapped” by a parent
▸Trapped exits let parents make a decision
live coding - linking processes and trapping exits
ELIXIR PROCESSES
WHAT HAVE WE GAINED?
▸More throughput
▸Easy, parallel computations
▸Avoidance of key concurrency problems
▸Failure control
ELIXIR PROCESSES
OTP IS NEXT
▸ "Open Telecom Platform" is an
outdated name
▸ Let's just call it OTP
▸ A set of tools and abstractions to
manage BEAM processes
‣ User story solution: https://github.com/adsteel/metex
‣ Live coding examples: https://gist.github.com/adsteel/3fb26673edc6892583c9fed588452d25
‣ Elixir Process Ping Pong - http://eddwardo.github.io/elixir/2015/10/22/elixir-pingpong-table/
‣ Trapping exits - http://www.akitaonrails.com/2015/11/22/observing-processes-in-elixir-the-little-elixir-otp-
guidebook
‣ The Little Elixir and OTP Guidebook, by Benjamin Tan Wei Hao
‣ The Actor Model - https://www.youtube.com/watch?v=7erJ1DV_Tlo
Additional Resources

More Related Content

What's hot

Kubernetes and elixir
Kubernetes and elixirKubernetes and elixir
Kubernetes and elixirJeffrey Chan
 
Counters At Scale - A Cautionary Tale
Counters At Scale - A Cautionary TaleCounters At Scale - A Cautionary Tale
Counters At Scale - A Cautionary TaleEric Lubow
 
Anton Boyko "The future of serverless computing"
Anton Boyko "The future of serverless computing"Anton Boyko "The future of serverless computing"
Anton Boyko "The future of serverless computing"Fwdays
 
Making It To Veteren Cassandra Status
Making It To Veteren Cassandra StatusMaking It To Veteren Cassandra Status
Making It To Veteren Cassandra StatusEric Lubow
 
Deploy Nodejs on Docker
Deploy Nodejs on DockerDeploy Nodejs on Docker
Deploy Nodejs on DockerWill Button
 
How Much Kafka?
How Much Kafka?How Much Kafka?
How Much Kafka?confluent
 
Containerization - The DevOps Revolution
Containerization - The DevOps RevolutionContainerization - The DevOps Revolution
Containerization - The DevOps RevolutionYulian Slobodyan
 
NDC Oslo - The Hybrid Docker Swarm
NDC Oslo - The Hybrid Docker SwarmNDC Oslo - The Hybrid Docker Swarm
NDC Oslo - The Hybrid Docker SwarmElton Stoneman
 
Stabilizing SE Build - Selenium conf 2013
Stabilizing SE Build - Selenium conf 2013 Stabilizing SE Build - Selenium conf 2013
Stabilizing SE Build - Selenium conf 2013 dimakovalenko
 
OSMC 2013 | Zabbix: A Practical Demo by Rihards Olups
OSMC 2013 | Zabbix: A Practical Demo by Rihards OlupsOSMC 2013 | Zabbix: A Practical Demo by Rihards Olups
OSMC 2013 | Zabbix: A Practical Demo by Rihards OlupsNETWAYS
 
A brief introduction to CloudFormation
A brief introduction to CloudFormationA brief introduction to CloudFormation
A brief introduction to CloudFormationSWIFTotter Solutions
 
Pablo Chico de Guzman | Introducción a Docker y Kubernetes | Codemotion Madri...
Pablo Chico de Guzman | Introducción a Docker y Kubernetes | Codemotion Madri...Pablo Chico de Guzman | Introducción a Docker y Kubernetes | Codemotion Madri...
Pablo Chico de Guzman | Introducción a Docker y Kubernetes | Codemotion Madri...Codemotion
 
Multi host container networking
Multi host container networkingMulti host container networking
Multi host container networkingWeaveworks
 
Introduction to scaling your WordPress site past a single node using AWS
Introduction to scaling your WordPress site past a single node using AWSIntroduction to scaling your WordPress site past a single node using AWS
Introduction to scaling your WordPress site past a single node using AWSWP Engine
 
Docker - for all // just a_first date
Docker - for all // just a_first dateDocker - for all // just a_first date
Docker - for all // just a_first dateNicolas Piquot
 
Docker Container automatisiert nach AWS deployen - Continuous Lifecycle 2016
Docker Container automatisiert nach AWS deployen  - Continuous Lifecycle 2016Docker Container automatisiert nach AWS deployen  - Continuous Lifecycle 2016
Docker Container automatisiert nach AWS deployen - Continuous Lifecycle 2016Philipp Garbe
 
Designing a Docker Stack for Symfony apps: lessons learned
Designing a Docker Stack  for Symfony apps: lessons learnedDesigning a Docker Stack  for Symfony apps: lessons learned
Designing a Docker Stack for Symfony apps: lessons learnedGaetano Giunta
 

What's hot (20)

OpenShift on IBM Cloud BMS
OpenShift on IBM Cloud BMSOpenShift on IBM Cloud BMS
OpenShift on IBM Cloud BMS
 
Kubernetes and elixir
Kubernetes and elixirKubernetes and elixir
Kubernetes and elixir
 
Counters At Scale - A Cautionary Tale
Counters At Scale - A Cautionary TaleCounters At Scale - A Cautionary Tale
Counters At Scale - A Cautionary Tale
 
Anton Boyko "The future of serverless computing"
Anton Boyko "The future of serverless computing"Anton Boyko "The future of serverless computing"
Anton Boyko "The future of serverless computing"
 
Making It To Veteren Cassandra Status
Making It To Veteren Cassandra StatusMaking It To Veteren Cassandra Status
Making It To Veteren Cassandra Status
 
Windows Package Manager Concept
Windows Package Manager ConceptWindows Package Manager Concept
Windows Package Manager Concept
 
Deploy Nodejs on Docker
Deploy Nodejs on DockerDeploy Nodejs on Docker
Deploy Nodejs on Docker
 
How Much Kafka?
How Much Kafka?How Much Kafka?
How Much Kafka?
 
Containerization - The DevOps Revolution
Containerization - The DevOps RevolutionContainerization - The DevOps Revolution
Containerization - The DevOps Revolution
 
NDC Oslo - The Hybrid Docker Swarm
NDC Oslo - The Hybrid Docker SwarmNDC Oslo - The Hybrid Docker Swarm
NDC Oslo - The Hybrid Docker Swarm
 
Stabilizing SE Build - Selenium conf 2013
Stabilizing SE Build - Selenium conf 2013 Stabilizing SE Build - Selenium conf 2013
Stabilizing SE Build - Selenium conf 2013
 
OSMC 2013 | Zabbix: A Practical Demo by Rihards Olups
OSMC 2013 | Zabbix: A Practical Demo by Rihards OlupsOSMC 2013 | Zabbix: A Practical Demo by Rihards Olups
OSMC 2013 | Zabbix: A Practical Demo by Rihards Olups
 
A brief introduction to CloudFormation
A brief introduction to CloudFormationA brief introduction to CloudFormation
A brief introduction to CloudFormation
 
Pablo Chico de Guzman | Introducción a Docker y Kubernetes | Codemotion Madri...
Pablo Chico de Guzman | Introducción a Docker y Kubernetes | Codemotion Madri...Pablo Chico de Guzman | Introducción a Docker y Kubernetes | Codemotion Madri...
Pablo Chico de Guzman | Introducción a Docker y Kubernetes | Codemotion Madri...
 
Multi host container networking
Multi host container networkingMulti host container networking
Multi host container networking
 
Introduction to scaling your WordPress site past a single node using AWS
Introduction to scaling your WordPress site past a single node using AWSIntroduction to scaling your WordPress site past a single node using AWS
Introduction to scaling your WordPress site past a single node using AWS
 
How Postman adopted Docker
How Postman adopted DockerHow Postman adopted Docker
How Postman adopted Docker
 
Docker - for all // just a_first date
Docker - for all // just a_first dateDocker - for all // just a_first date
Docker - for all // just a_first date
 
Docker Container automatisiert nach AWS deployen - Continuous Lifecycle 2016
Docker Container automatisiert nach AWS deployen  - Continuous Lifecycle 2016Docker Container automatisiert nach AWS deployen  - Continuous Lifecycle 2016
Docker Container automatisiert nach AWS deployen - Continuous Lifecycle 2016
 
Designing a Docker Stack for Symfony apps: lessons learned
Designing a Docker Stack  for Symfony apps: lessons learnedDesigning a Docker Stack  for Symfony apps: lessons learned
Designing a Docker Stack for Symfony apps: lessons learned
 

Similar to Elixir Processes

Stockholm Serverless Meetup - Serverless Challenges
Stockholm Serverless Meetup - Serverless ChallengesStockholm Serverless Meetup - Serverless Challenges
Stockholm Serverless Meetup - Serverless Challengesİbrahim Gürses
 
Automated scaling of microservice stacks for JavaEE applications - JEEConf 2017
Automated scaling of microservice stacks for JavaEE applications - JEEConf 2017Automated scaling of microservice stacks for JavaEE applications - JEEConf 2017
Automated scaling of microservice stacks for JavaEE applications - JEEConf 2017Jelastic Multi-Cloud PaaS
 
Using Behavior to Protect Cloud Servers
Using Behavior to Protect Cloud ServersUsing Behavior to Protect Cloud Servers
Using Behavior to Protect Cloud Serversbanerjeea
 
Cloud Native Microservices with Spring Cloud
Cloud Native Microservices with Spring CloudCloud Native Microservices with Spring Cloud
Cloud Native Microservices with Spring CloudConor Svensson
 
Java Microservices with Netflix OSS & Spring
Java Microservices with Netflix OSS & Spring Java Microservices with Netflix OSS & Spring
Java Microservices with Netflix OSS & Spring Conor Svensson
 
Java in the Cloud : PaaS Platforms in Comparison
Java in the Cloud : PaaS Platforms in Comparison Java in the Cloud : PaaS Platforms in Comparison
Java in the Cloud : PaaS Platforms in Comparison Eberhard Wolff
 
Java in the Cloud : PaaS Platforms in Comparison
Java in the Cloud : PaaS Platforms in ComparisonJava in the Cloud : PaaS Platforms in Comparison
Java in the Cloud : PaaS Platforms in Comparisonadesso AG
 
ITB2019 Serverless CFML on AWS Lambda - Pete Freitag
ITB2019  Serverless CFML on AWS Lambda - Pete FreitagITB2019  Serverless CFML on AWS Lambda - Pete Freitag
ITB2019 Serverless CFML on AWS Lambda - Pete FreitagOrtus Solutions, Corp
 
The Serverless Cloud @ JAX London 2016
The Serverless Cloud @ JAX London 2016The Serverless Cloud @ JAX London 2016
The Serverless Cloud @ JAX London 2016Bart Blommaerts
 
Automated Scaling of Microservice Stacks for JavaEE Applications
Automated Scaling of Microservice Stacks for JavaEE ApplicationsAutomated Scaling of Microservice Stacks for JavaEE Applications
Automated Scaling of Microservice Stacks for JavaEE ApplicationsJelastic Multi-Cloud PaaS
 
Webinar slides: 9 DevOps Tips for Going in Production with Galera Cluster for...
Webinar slides: 9 DevOps Tips for Going in Production with Galera Cluster for...Webinar slides: 9 DevOps Tips for Going in Production with Galera Cluster for...
Webinar slides: 9 DevOps Tips for Going in Production with Galera Cluster for...Severalnines
 
Cloud Native Microservices with Spring Cloud
Cloud Native Microservices with Spring CloudCloud Native Microservices with Spring Cloud
Cloud Native Microservices with Spring CloudConor Svensson
 
How to scale up, out or down in Windows Azure
How to scale up, out or down in Windows AzureHow to scale up, out or down in Windows Azure
How to scale up, out or down in Windows AzureCommon Sense
 
Devops (start walking in the same direction) by ops
Devops (start walking in the same direction) by opsDevops (start walking in the same direction) by ops
Devops (start walking in the same direction) by opsDemis Rizzotto
 
Application modernization patterns with apache kafka, debezium, and kubernete...
Application modernization patterns with apache kafka, debezium, and kubernete...Application modernization patterns with apache kafka, debezium, and kubernete...
Application modernization patterns with apache kafka, debezium, and kubernete...Bilgin Ibryam
 
Run tests at scale with on-demand Selenium Grid using AWS Fargate
Run tests at scale with on-demand Selenium Grid using AWS FargateRun tests at scale with on-demand Selenium Grid using AWS Fargate
Run tests at scale with on-demand Selenium Grid using AWS FargateMegha Mehta
 
Spring Cloud Into Production
Spring Cloud Into ProductionSpring Cloud Into Production
Spring Cloud Into ProductionTodd Miller
 
Going Serverless on AWS with Golang and SAM
Going Serverless on AWS with Golang and SAMGoing Serverless on AWS with Golang and SAM
Going Serverless on AWS with Golang and SAMGeorge Tourkas
 

Similar to Elixir Processes (20)

Stockholm Serverless Meetup - Serverless Challenges
Stockholm Serverless Meetup - Serverless ChallengesStockholm Serverless Meetup - Serverless Challenges
Stockholm Serverless Meetup - Serverless Challenges
 
Automated scaling of microservice stacks for JavaEE applications - JEEConf 2017
Automated scaling of microservice stacks for JavaEE applications - JEEConf 2017Automated scaling of microservice stacks for JavaEE applications - JEEConf 2017
Automated scaling of microservice stacks for JavaEE applications - JEEConf 2017
 
JEEconf 2017
JEEconf 2017JEEconf 2017
JEEconf 2017
 
Using Behavior to Protect Cloud Servers
Using Behavior to Protect Cloud ServersUsing Behavior to Protect Cloud Servers
Using Behavior to Protect Cloud Servers
 
Cloud Native Microservices with Spring Cloud
Cloud Native Microservices with Spring CloudCloud Native Microservices with Spring Cloud
Cloud Native Microservices with Spring Cloud
 
Java Microservices with Netflix OSS & Spring
Java Microservices with Netflix OSS & Spring Java Microservices with Netflix OSS & Spring
Java Microservices with Netflix OSS & Spring
 
Java in the Cloud : PaaS Platforms in Comparison
Java in the Cloud : PaaS Platforms in Comparison Java in the Cloud : PaaS Platforms in Comparison
Java in the Cloud : PaaS Platforms in Comparison
 
Java in the Cloud : PaaS Platforms in Comparison
Java in the Cloud : PaaS Platforms in ComparisonJava in the Cloud : PaaS Platforms in Comparison
Java in the Cloud : PaaS Platforms in Comparison
 
ITB2019 Serverless CFML on AWS Lambda - Pete Freitag
ITB2019  Serverless CFML on AWS Lambda - Pete FreitagITB2019  Serverless CFML on AWS Lambda - Pete Freitag
ITB2019 Serverless CFML on AWS Lambda - Pete Freitag
 
The Serverless Cloud @ JAX London 2016
The Serverless Cloud @ JAX London 2016The Serverless Cloud @ JAX London 2016
The Serverless Cloud @ JAX London 2016
 
Automated Scaling of Microservice Stacks for JavaEE Applications
Automated Scaling of Microservice Stacks for JavaEE ApplicationsAutomated Scaling of Microservice Stacks for JavaEE Applications
Automated Scaling of Microservice Stacks for JavaEE Applications
 
CQRS and Event Sourcing with Axon Framework
CQRS and Event Sourcing with Axon FrameworkCQRS and Event Sourcing with Axon Framework
CQRS and Event Sourcing with Axon Framework
 
Webinar slides: 9 DevOps Tips for Going in Production with Galera Cluster for...
Webinar slides: 9 DevOps Tips for Going in Production with Galera Cluster for...Webinar slides: 9 DevOps Tips for Going in Production with Galera Cluster for...
Webinar slides: 9 DevOps Tips for Going in Production with Galera Cluster for...
 
Cloud Native Microservices with Spring Cloud
Cloud Native Microservices with Spring CloudCloud Native Microservices with Spring Cloud
Cloud Native Microservices with Spring Cloud
 
How to scale up, out or down in Windows Azure
How to scale up, out or down in Windows AzureHow to scale up, out or down in Windows Azure
How to scale up, out or down in Windows Azure
 
Devops (start walking in the same direction) by ops
Devops (start walking in the same direction) by opsDevops (start walking in the same direction) by ops
Devops (start walking in the same direction) by ops
 
Application modernization patterns with apache kafka, debezium, and kubernete...
Application modernization patterns with apache kafka, debezium, and kubernete...Application modernization patterns with apache kafka, debezium, and kubernete...
Application modernization patterns with apache kafka, debezium, and kubernete...
 
Run tests at scale with on-demand Selenium Grid using AWS Fargate
Run tests at scale with on-demand Selenium Grid using AWS FargateRun tests at scale with on-demand Selenium Grid using AWS Fargate
Run tests at scale with on-demand Selenium Grid using AWS Fargate
 
Spring Cloud Into Production
Spring Cloud Into ProductionSpring Cloud Into Production
Spring Cloud Into Production
 
Going Serverless on AWS with Golang and SAM
Going Serverless on AWS with Golang and SAMGoing Serverless on AWS with Golang and SAM
Going Serverless on AWS with Golang and SAM
 

Recently uploaded

What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsMehedi Hasan Shohan
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 

Recently uploaded (20)

Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software Solutions
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 

Elixir Processes

  • 2. OVERVIEW TODAY’S AGENDA - PROCESSES ▸Why processes? ▸Conceptual framework ▸Basic usage ▸Next steps
  • 3. ELIXIR PROCESSES WHY PROCESSES? ▸Need more throughput ▸Run parallel computations ▸Concurrency causes problems ▸Control of failure
  • 4. GIVEN A LIST OF CITIES AND A WEATHER API User Story
  • 5. PROCESSES OVERVIEW ▸ Not a server process or thread ▸ A process in the Erlang VM (BEAM) ▸ Lightweight ▸ Utilizes all cores ELIXIR PROCESSES
  • 6. ELIXIR PROCESSES ▸send and receive messages ▸unique process id ▸message mailbox ▸execute asynchronously ▸isolated - no shared memory ▸hold state ELIXIR PROCESSES
  • 7. DRAW IT OUTPROCESS INTERACTIONS CAN BE DIFFICULT TO REASON ABOUT A SIMPLE DIAGRAM CAN MAKE IT MUCH EASIER
  • 8. GIVEN A LIST OF CITIES AND A WEATHER API User Story
  • 9. ELIXIR PROCESSES VS RUBY OBJECTS ▸ #spawn #new ▸ process id instance ▸ #send/#receive . ▸ has state has state ▸ isolated memory shared memory ▸ asynchronous synchronous
  • 10. live coding - spawn, send, receive
  • 11. GIVEN A LIST OF CITIES AND A WEATHER API User Story
  • 12. ELIXIR PROCESSES LINKING PROCESSES ▸Link processes with #spawn_link ▸Linking creates a parent-child relationship ▸Child exits by default cause the parent to exit ▸Exits can be “trapped” by a parent ▸Trapped exits let parents make a decision
  • 13. live coding - linking processes and trapping exits
  • 14. ELIXIR PROCESSES WHAT HAVE WE GAINED? ▸More throughput ▸Easy, parallel computations ▸Avoidance of key concurrency problems ▸Failure control
  • 15. ELIXIR PROCESSES OTP IS NEXT ▸ "Open Telecom Platform" is an outdated name ▸ Let's just call it OTP ▸ A set of tools and abstractions to manage BEAM processes
  • 16. ‣ User story solution: https://github.com/adsteel/metex ‣ Live coding examples: https://gist.github.com/adsteel/3fb26673edc6892583c9fed588452d25 ‣ Elixir Process Ping Pong - http://eddwardo.github.io/elixir/2015/10/22/elixir-pingpong-table/ ‣ Trapping exits - http://www.akitaonrails.com/2015/11/22/observing-processes-in-elixir-the-little-elixir-otp- guidebook ‣ The Little Elixir and OTP Guidebook, by Benjamin Tan Wei Hao ‣ The Actor Model - https://www.youtube.com/watch?v=7erJ1DV_Tlo Additional Resources