SlideShare a Scribd company logo
1 of 97
Elixir 그리고 MSA
MSA?
http://www.slideshare.net/andrewdohyunjung/msa-43702981
http://www.slideshare.net/andrewdohyunjung/msa-43702981
http://www.slideshare.net/andrewdohyunjung/msa-43702981
Elixir 와 MSA가 무슨 연관이?
Erlang
Elixir
사실 MSA에 묻어가려고…
MSA 개발/운영 시에 있으면 좋
을꺼 같은것들(매우 주관적)
• 서비스들이 죽지 않았으면 좋겠다.
• 운영중에 패치가 편했으면 좋겠다.
• 클러스터링 가능 했으면 좋겠다.
• 서비스들간의 통신이 편했으면 좋겠다.
• 서비스들이 죽지 않았으면 좋겠다. Supervisor
• 운영중에 패치가 편했으면 좋겠다. Hot Code Swapping
• 클러스터링 가능 했으면 좋겠다. Cluster
• 서비스들간의 통신이 편했으면 좋겠다. MessagePassing/RPC
Erlang
Elixir
Erlang/Elixir
1986: 에릭슨사 개발
1998: 오픈소스화
2016: Erlang/OTP18.3
Erlang
• 함수형 언어.
• 불변 변수(Immutable variables)
• 강타입, 동적 타입 자료형 체계(strong, dynamic typing)
• 병행성(Concurrency) 모델중 Actor model.
https://www.youtube.com/watch?v=B4rOG9Bc65Q
https://www.youtube.com/watch?v=B4rOG9Bc65Q
http://stackoverflow.com/questions/1636455/where-is-erlang-used-and-why/1637137#1637137
2012: José Valim 개발
2016: Elixir 1.2
Elixir
• Erlang의 특징을 계승.
• Elixir 컴파일러가 BEAM(Erlang VM)용 바이트코트로 컴파일.
• 도큐먼트 제공
• 툴 제공(ExUnit, iex, Mix)
• 페키지 관리 (Hex packages)
https://www.youtube.com/watch?v=lly-1UYmnFI
http://www.slideshare.net/gabriele.lana/the-magic-of-elixir
–Joe Armstrong
“Erlang was designed for writing concurrent programs that run
forever”
Concurrency model
Erlang/Elixir Actor model
Node.js
Single thread,
Event driven
Go CSP
Actor = Process + Data +
Code
http://www.slideshare.net/christophevg/actors-la-akka
Actor Actor Actor
Actor Actor Actor
data data
datadata
data
Input
Output
http://www.slideshare.net/eonblast/why-erlang-gdc-online-2012
http://www.slideshare.net/eonblast/why-erlang-gdc-online-2012
Lightweight process
ProcessMail box
Heap
Stack
Garbage Collector
Message passing
P2
Receiver
P1
Sender
Mail box Mail box
message
message
Message passing
P2Mail box
message
P2
메시지 수신
메시지 라우팅
메시지 처리
메시지 응답
Message passing
P2
메시지 수신
메시지 라우팅
메시지 처리
메시지 응답
Message passing
P2
메시지 수신
메시지 라우팅
메시지 처리
메시지 응답
Message passing
P2
메시지 수신
메시지 라우팅
메시지 처리
메시지 응답
Message passing
P2
메시지 수신
메시지 라우팅
메시지 처리
메시지 응답
P3
메시지 수신
메시지 라우팅
메시지 처리
메시지 응답
PN
메시지 수신
메시지 라우팅
메시지 처리
메시지 응답
…
– erlang.org
“OTP (Open Telecom Platform) is a large collection of
libraries for Erlang to do everything from compiling ASN.1 to
providing a WWW server. Most projects using "Erlang" are
actually using "Erlang/OTP", i.e. the language and the
libraries. OTP is also open source.”
OTP Behaviours
• GenServer
• GenEvent
• GenFSM
• Supervisor
GenServer
Server
Client
Client
기본 프로세스 GenServer 프로세스
GenEvent
EventManage
r
Client Client Client
event
GenFSM
http://knewter.github.io/erlang_dc_workshop/deck/otp_with_elixir/finite_state_machines/slides/#/2
MSA 와 Elixir
• 서비스들이 죽지 않았으면 좋겠다. Supervisor
• 운영중에 패치가 편했으면 좋겠다. Hot Code Swapping
• 클러스터링 가능 했으면 좋겠다. Cluster
• 서비스들간의 통신이 편했으면 좋겠다. MessagePassing/RPC
Erlang
Elixir
Supervisor
Supervisor
ProcessProcess Process
Supervisor
ProcessProcess Process
Supervisor
ProcessProcess Process
Process
Supervisor
ProcessProcess Process
one_for_one
Supervisor
ProcessProcess Process
one_for_one
Supervisor
ProcessProcess Process
one_for_one
Process
Supervisor
ProcessProcess Process
one_for_all
Supervisor
ProcessProcess Process
one_for_all
Supervisor
ProcessProcess Process
one_for_all
Process Process Process
Supervisor
ProcessProcess Process
reset_for_all
Supervisor
ProcessProcess Process
reset_for_all
Supervisor
ProcessProcess Process
reset_for_all
Process Process
Supervisor
ProcessProcess Supervisor
ProcessProcess Process
Hot code swapping
Actor
Code Data
Process
Actor
Code Data
Process
New Code
Actor
Data
Process
New Code
Cluster
EndPoin
t
Paymen
t
Cart
Service
EndPoin
t
Paymen
t
Cart
Service
EndPoin
t
Paymen
t
Cart
Service
Proxy
Service
EndPoin
t
Paymen
t
Cart
특정 기능에만 부하가 집중된
다면
ServiceService
EndPoin
t
Paymen
t
Cart
EndPoin
t
Paymen
t
Cart
Proxy
Node#2Node#1
EndPoin
t
Paymen
t
Cart Cart
Cart
EndPoin
t
EndPoin
t
EndPoin
t …
Cart Cart
Paymen
t …
DMZEndpoint
Business
Client
Node
Node Node
Node
$ Node.connect(nodename)
Service/Node간 통신
SystemSystem
Node Node
Node Node
SystemSystem
SystemSystem
pid
사실 Thrift 씁니다..
Elixir에 관심이 생기셨다면..
http://elixir-lang.org
https://www.facebook.com/groups/elixir.korea/
감사합니다.

More Related Content

Viewers also liked

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
 
Control flow in_elixir
Control flow in_elixirControl flow in_elixir
Control flow in_elixirAnna Neyzberg
 
Flowex: Flow-Based Programming with Elixir GenStage - Anton Mishchuk
Flowex: Flow-Based Programming with Elixir GenStage - Anton MishchukFlowex: Flow-Based Programming with Elixir GenStage - Anton Mishchuk
Flowex: Flow-Based Programming with Elixir GenStage - Anton MishchukElixir Club
 
Phoenix: Inflame the Web - Alex Troush
Phoenix: Inflame the Web - Alex TroushPhoenix: Inflame the Web - Alex Troush
Phoenix: Inflame the Web - Alex TroushElixir Club
 
GenStage and Flow - Jose Valim
GenStage and Flow - Jose Valim GenStage and Flow - Jose Valim
GenStage and Flow - Jose Valim Elixir Club
 
Elixir & Phoenix 推坑
Elixir & Phoenix 推坑Elixir & Phoenix 推坑
Elixir & Phoenix 推坑Chao-Ju Huang
 
Proteome array - antibody based proteome arrays
Proteome array - antibody based proteome arrays Proteome array - antibody based proteome arrays
Proteome array - antibody based proteome arrays saraswathi rajakumar
 
Bottleneck in Elixir Application - Alexey Osipenko
 Bottleneck in Elixir Application - Alexey Osipenko  Bottleneck in Elixir Application - Alexey Osipenko
Bottleneck in Elixir Application - Alexey Osipenko Elixir Club
 
Anatomy of an elixir process and Actor Communication
Anatomy of an elixir process and Actor CommunicationAnatomy of an elixir process and Actor Communication
Anatomy of an elixir process and Actor CommunicationMustafa TURAN
 
Build Your Own Real-Time Web Service with Elixir Phoenix
Build Your Own Real-Time Web Service with Elixir PhoenixBuild Your Own Real-Time Web Service with Elixir Phoenix
Build Your Own Real-Time Web Service with Elixir PhoenixChi-chi Ekweozor
 
Professional Programmer (3 Years Later)
Professional Programmer (3 Years Later)Professional Programmer (3 Years Later)
Professional Programmer (3 Years Later)Gabriele Lana
 
Embedded Erlang, Nerves, and SumoBots
Embedded Erlang, Nerves, and SumoBotsEmbedded Erlang, Nerves, and SumoBots
Embedded Erlang, Nerves, and SumoBotsFrank Hunleth
 
Elixir and Dialyzer, Types and Typespecs, using and understanding them
Elixir and Dialyzer, Types and Typespecs, using and understanding themElixir and Dialyzer, Types and Typespecs, using and understanding them
Elixir and Dialyzer, Types and Typespecs, using and understanding themDan Janowski
 
How Elixir helped us scale our Video User Profile Service for the Olympics
How Elixir helped us scale our Video User Profile Service for the OlympicsHow Elixir helped us scale our Video User Profile Service for the Olympics
How Elixir helped us scale our Video User Profile Service for the OlympicsEmerson Macedo
 
Elixir – Peeking into Elixir's Processes, OTP and Supervisors
Elixir – Peeking into Elixir's Processes, OTP and SupervisorsElixir – Peeking into Elixir's Processes, OTP and Supervisors
Elixir – Peeking into Elixir's Processes, OTP and SupervisorsBenjamin Tan
 

Viewers also liked (20)

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
 
Control flow in_elixir
Control flow in_elixirControl flow in_elixir
Control flow in_elixir
 
Spring IO for startups
Spring IO for startupsSpring IO for startups
Spring IO for startups
 
Flowex: Flow-Based Programming with Elixir GenStage - Anton Mishchuk
Flowex: Flow-Based Programming with Elixir GenStage - Anton MishchukFlowex: Flow-Based Programming with Elixir GenStage - Anton Mishchuk
Flowex: Flow-Based Programming with Elixir GenStage - Anton Mishchuk
 
Phoenix: Inflame the Web - Alex Troush
Phoenix: Inflame the Web - Alex TroushPhoenix: Inflame the Web - Alex Troush
Phoenix: Inflame the Web - Alex Troush
 
GenStage and Flow - Jose Valim
GenStage and Flow - Jose Valim GenStage and Flow - Jose Valim
GenStage and Flow - Jose Valim
 
Elixir & Phoenix 推坑
Elixir & Phoenix 推坑Elixir & Phoenix 推坑
Elixir & Phoenix 推坑
 
Proteome array - antibody based proteome arrays
Proteome array - antibody based proteome arrays Proteome array - antibody based proteome arrays
Proteome array - antibody based proteome arrays
 
Bottleneck in Elixir Application - Alexey Osipenko
 Bottleneck in Elixir Application - Alexey Osipenko  Bottleneck in Elixir Application - Alexey Osipenko
Bottleneck in Elixir Application - Alexey Osipenko
 
Anatomy of an elixir process and Actor Communication
Anatomy of an elixir process and Actor CommunicationAnatomy of an elixir process and Actor Communication
Anatomy of an elixir process and Actor Communication
 
Build Your Own Real-Time Web Service with Elixir Phoenix
Build Your Own Real-Time Web Service with Elixir PhoenixBuild Your Own Real-Time Web Service with Elixir Phoenix
Build Your Own Real-Time Web Service with Elixir Phoenix
 
Elixir basics
Elixir basicsElixir basics
Elixir basics
 
Play vs Rails
Play vs RailsPlay vs Rails
Play vs Rails
 
Professional Programmer (3 Years Later)
Professional Programmer (3 Years Later)Professional Programmer (3 Years Later)
Professional Programmer (3 Years Later)
 
Embedded Erlang, Nerves, and SumoBots
Embedded Erlang, Nerves, and SumoBotsEmbedded Erlang, Nerves, and SumoBots
Embedded Erlang, Nerves, and SumoBots
 
Elixir and Dialyzer, Types and Typespecs, using and understanding them
Elixir and Dialyzer, Types and Typespecs, using and understanding themElixir and Dialyzer, Types and Typespecs, using and understanding them
Elixir and Dialyzer, Types and Typespecs, using and understanding them
 
Scala vs Ruby
Scala vs RubyScala vs Ruby
Scala vs Ruby
 
How Elixir helped us scale our Video User Profile Service for the Olympics
How Elixir helped us scale our Video User Profile Service for the OlympicsHow Elixir helped us scale our Video User Profile Service for the Olympics
How Elixir helped us scale our Video User Profile Service for the Olympics
 
Elixir basics-2
Elixir basics-2Elixir basics-2
Elixir basics-2
 
Elixir – Peeking into Elixir's Processes, OTP and Supervisors
Elixir – Peeking into Elixir's Processes, OTP and SupervisorsElixir – Peeking into Elixir's Processes, OTP and Supervisors
Elixir – Peeking into Elixir's Processes, OTP and Supervisors
 

Similar to 나프다 웨비너 1604: Elixir와 함수형 프로그래밍을 이용한 웹 개발

MSA와 infra
MSA와 infraMSA와 infra
MSA와 infraJe Hun Kim
 
2017 tensor flow dev summit
2017 tensor flow dev summit2017 tensor flow dev summit
2017 tensor flow dev summitTae Young Lee
 
AWSKRUG DS - 데이터 엔지니어가 실무에서 맞닥뜨리는 문제들
AWSKRUG DS - 데이터 엔지니어가 실무에서 맞닥뜨리는 문제들AWSKRUG DS - 데이터 엔지니어가 실무에서 맞닥뜨리는 문제들
AWSKRUG DS - 데이터 엔지니어가 실무에서 맞닥뜨리는 문제들Woong Seok Kang
 
Concurreny programming
Concurreny programmingConcurreny programming
Concurreny programmingJaejin Yun
 
[NDC18] 야생의 땅 듀랑고의 데이터 엔지니어링 이야기: 로그 시스템 구축 경험 공유 (2부)
[NDC18] 야생의 땅 듀랑고의 데이터 엔지니어링 이야기: 로그 시스템 구축 경험 공유 (2부)[NDC18] 야생의 땅 듀랑고의 데이터 엔지니어링 이야기: 로그 시스템 구축 경험 공유 (2부)
[NDC18] 야생의 땅 듀랑고의 데이터 엔지니어링 이야기: 로그 시스템 구축 경험 공유 (2부)Hyojun Jeon
 
Kafka introduce kr
Kafka introduce krKafka introduce kr
Kafka introduce krJung soo Ahn
 
멸종하는 공룡이 되지 않으려면
멸종하는 공룡이 되지 않으려면멸종하는 공룡이 되지 않으려면
멸종하는 공룡이 되지 않으려면Byeongsu Kang
 
Auto Scalable 한 Deep Learning Production 을 위한 AI Serving Infra 구성 및 AI DevOps...
Auto Scalable 한 Deep Learning Production 을 위한 AI Serving Infra 구성 및 AI DevOps...Auto Scalable 한 Deep Learning Production 을 위한 AI Serving Infra 구성 및 AI DevOps...
Auto Scalable 한 Deep Learning Production 을 위한 AI Serving Infra 구성 및 AI DevOps...hoondong kim
 
Assembly 스터디 1
Assembly 스터디 1Assembly 스터디 1
Assembly 스터디 1Jinkyoung Kim
 
1 mysql아키텍쳐 v1
1 mysql아키텍쳐 v11 mysql아키텍쳐 v1
1 mysql아키텍쳐 v1resoliwan
 
MANTL을 MANTL답게! ELK로 만들어갑니다
MANTL을 MANTL답게! ELK로 만들어갑니다MANTL을 MANTL답게! ELK로 만들어갑니다
MANTL을 MANTL답게! ELK로 만들어갑니다CiscoKorea
 
Going asynchronous with netty - SOSCON 2015
Going asynchronous with netty - SOSCON 2015Going asynchronous with netty - SOSCON 2015
Going asynchronous with netty - SOSCON 2015Kris Jeong
 
지금 핫한 Real-time In-memory Stream Processing 이야기
지금 핫한 Real-time In-memory Stream Processing 이야기지금 핫한 Real-time In-memory Stream Processing 이야기
지금 핫한 Real-time In-memory Stream Processing 이야기Ted Won
 
Concurrent Programming (Java thread 다루기)
Concurrent Programming (Java thread 다루기)Concurrent Programming (Java thread 다루기)
Concurrent Programming (Java thread 다루기)JungGeun Lee
 
AWS 9월 웨비나 | Amazon Aurora Deep Dive
AWS 9월 웨비나 | Amazon Aurora Deep DiveAWS 9월 웨비나 | Amazon Aurora Deep Dive
AWS 9월 웨비나 | Amazon Aurora Deep DiveAmazon Web Services Korea
 
[2B5]nBase-ARC Redis Cluster
[2B5]nBase-ARC Redis Cluster[2B5]nBase-ARC Redis Cluster
[2B5]nBase-ARC Redis ClusterNAVER D2
 
함수형 프로그래밍
함수형 프로그래밍함수형 프로그래밍
함수형 프로그래밍CWMin
 
1st cardano korea_meetup
1st cardano korea_meetup1st cardano korea_meetup
1st cardano korea_meetupWangjea Lee
 
백억개의 로그를 모아 검색하고 분석하고 학습도 시켜보자 : 로기스
백억개의 로그를 모아 검색하고 분석하고 학습도 시켜보자 : 로기스백억개의 로그를 모아 검색하고 분석하고 학습도 시켜보자 : 로기스
백억개의 로그를 모아 검색하고 분석하고 학습도 시켜보자 : 로기스NAVER D2
 
[224] backend 개발자의 neural machine translation 개발기 김상경
[224] backend 개발자의 neural machine translation 개발기 김상경[224] backend 개발자의 neural machine translation 개발기 김상경
[224] backend 개발자의 neural machine translation 개발기 김상경NAVER D2
 

Similar to 나프다 웨비너 1604: Elixir와 함수형 프로그래밍을 이용한 웹 개발 (20)

MSA와 infra
MSA와 infraMSA와 infra
MSA와 infra
 
2017 tensor flow dev summit
2017 tensor flow dev summit2017 tensor flow dev summit
2017 tensor flow dev summit
 
AWSKRUG DS - 데이터 엔지니어가 실무에서 맞닥뜨리는 문제들
AWSKRUG DS - 데이터 엔지니어가 실무에서 맞닥뜨리는 문제들AWSKRUG DS - 데이터 엔지니어가 실무에서 맞닥뜨리는 문제들
AWSKRUG DS - 데이터 엔지니어가 실무에서 맞닥뜨리는 문제들
 
Concurreny programming
Concurreny programmingConcurreny programming
Concurreny programming
 
[NDC18] 야생의 땅 듀랑고의 데이터 엔지니어링 이야기: 로그 시스템 구축 경험 공유 (2부)
[NDC18] 야생의 땅 듀랑고의 데이터 엔지니어링 이야기: 로그 시스템 구축 경험 공유 (2부)[NDC18] 야생의 땅 듀랑고의 데이터 엔지니어링 이야기: 로그 시스템 구축 경험 공유 (2부)
[NDC18] 야생의 땅 듀랑고의 데이터 엔지니어링 이야기: 로그 시스템 구축 경험 공유 (2부)
 
Kafka introduce kr
Kafka introduce krKafka introduce kr
Kafka introduce kr
 
멸종하는 공룡이 되지 않으려면
멸종하는 공룡이 되지 않으려면멸종하는 공룡이 되지 않으려면
멸종하는 공룡이 되지 않으려면
 
Auto Scalable 한 Deep Learning Production 을 위한 AI Serving Infra 구성 및 AI DevOps...
Auto Scalable 한 Deep Learning Production 을 위한 AI Serving Infra 구성 및 AI DevOps...Auto Scalable 한 Deep Learning Production 을 위한 AI Serving Infra 구성 및 AI DevOps...
Auto Scalable 한 Deep Learning Production 을 위한 AI Serving Infra 구성 및 AI DevOps...
 
Assembly 스터디 1
Assembly 스터디 1Assembly 스터디 1
Assembly 스터디 1
 
1 mysql아키텍쳐 v1
1 mysql아키텍쳐 v11 mysql아키텍쳐 v1
1 mysql아키텍쳐 v1
 
MANTL을 MANTL답게! ELK로 만들어갑니다
MANTL을 MANTL답게! ELK로 만들어갑니다MANTL을 MANTL답게! ELK로 만들어갑니다
MANTL을 MANTL답게! ELK로 만들어갑니다
 
Going asynchronous with netty - SOSCON 2015
Going asynchronous with netty - SOSCON 2015Going asynchronous with netty - SOSCON 2015
Going asynchronous with netty - SOSCON 2015
 
지금 핫한 Real-time In-memory Stream Processing 이야기
지금 핫한 Real-time In-memory Stream Processing 이야기지금 핫한 Real-time In-memory Stream Processing 이야기
지금 핫한 Real-time In-memory Stream Processing 이야기
 
Concurrent Programming (Java thread 다루기)
Concurrent Programming (Java thread 다루기)Concurrent Programming (Java thread 다루기)
Concurrent Programming (Java thread 다루기)
 
AWS 9월 웨비나 | Amazon Aurora Deep Dive
AWS 9월 웨비나 | Amazon Aurora Deep DiveAWS 9월 웨비나 | Amazon Aurora Deep Dive
AWS 9월 웨비나 | Amazon Aurora Deep Dive
 
[2B5]nBase-ARC Redis Cluster
[2B5]nBase-ARC Redis Cluster[2B5]nBase-ARC Redis Cluster
[2B5]nBase-ARC Redis Cluster
 
함수형 프로그래밍
함수형 프로그래밍함수형 프로그래밍
함수형 프로그래밍
 
1st cardano korea_meetup
1st cardano korea_meetup1st cardano korea_meetup
1st cardano korea_meetup
 
백억개의 로그를 모아 검색하고 분석하고 학습도 시켜보자 : 로기스
백억개의 로그를 모아 검색하고 분석하고 학습도 시켜보자 : 로기스백억개의 로그를 모아 검색하고 분석하고 학습도 시켜보자 : 로기스
백억개의 로그를 모아 검색하고 분석하고 학습도 시켜보자 : 로기스
 
[224] backend 개발자의 neural machine translation 개발기 김상경
[224] backend 개발자의 neural machine translation 개발기 김상경[224] backend 개발자의 neural machine translation 개발기 김상경
[224] backend 개발자의 neural machine translation 개발기 김상경
 

나프다 웨비너 1604: Elixir와 함수형 프로그래밍을 이용한 웹 개발