SlideShare a Scribd company logo
16. OTP Introduction

                Erlang TFT
• OPT
• Server – Basic
• Server – Transaction
• Server – Hot Code Swapping
• Server – More Fun
• gen_server
• gen_server Template
• my_bank.erl
OTP



•   Open Telecom Platform : Application Framework

•   Behavior – 비기능적인 부분
             ex) 무정지 기능 , Hot Code Swapping … )

•   Callback – 비즈니스 로직
Server – Basic




            •    Client Interface
            •    Callback
Server – Transaction




               •   서버 변경
               •   콜백은 그대로 유지
Server – Hot Code Swapping
Server – More Fun
gen_server
                                     http://www.erlang.org/doc/man/gen_server.html



1.Callback Module Name
     my_bank
2.Write Interface Routines
     start(), stop(),
     new_account(Who),
     deposit(Who, Amount),
     withdraw(Who, Amount)
3.Write Callback Routines
     init/1,
     handle_call/3, handle_cast/2, handle_info/2,
     terminate/2, code_change/3
gen_server Template
my_bank.erl

More Related Content

Similar to Chapter16

Software Architectures, Week 4 - Message-based Architectures, Message Bus
Software Architectures, Week 4 - Message-based Architectures, Message BusSoftware Architectures, Week 4 - Message-based Architectures, Message Bus
Software Architectures, Week 4 - Message-based Architectures, Message Bus
Angelos Kapsimanis
 
Seminar: CoinMP - Open Source Solver - Nov 2011
Seminar: CoinMP - Open Source Solver - Nov 2011Seminar: CoinMP - Open Source Solver - Nov 2011
Seminar: CoinMP - Open Source Solver - Nov 2011
Bjarni Kristjánsson
 
The 1990s Called. They Want Their Code Back.
The 1990s Called. They Want Their Code Back.The 1990s Called. They Want Their Code Back.
The 1990s Called. They Want Their Code Back.
Jonathan Oliver
 
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
 
Ims05 ims 100 k benchmark
Ims05   ims 100 k benchmarkIms05   ims 100 k benchmark
Ims05 ims 100 k benchmark
Robert Hain
 
Framework workshop
Framework workshopFramework workshop
Framework workshop
Nico Tristan
 

Similar to Chapter16 (20)

Software Architectures, Week 4 - Message-based Architectures, Message Bus
Software Architectures, Week 4 - Message-based Architectures, Message BusSoftware Architectures, Week 4 - Message-based Architectures, Message Bus
Software Architectures, Week 4 - Message-based Architectures, Message Bus
 
Seminar: CoinMP - Open Source Solver - Nov 2011
Seminar: CoinMP - Open Source Solver - Nov 2011Seminar: CoinMP - Open Source Solver - Nov 2011
Seminar: CoinMP - Open Source Solver - Nov 2011
 
The 1990s Called. They Want Their Code Back.
The 1990s Called. They Want Their Code Back.The 1990s Called. They Want Their Code Back.
The 1990s Called. They Want Their Code Back.
 
Rpc
RpcRpc
Rpc
 
High Performance Erlang - Pitfalls and Solutions
High Performance Erlang - Pitfalls and SolutionsHigh Performance Erlang - Pitfalls and Solutions
High Performance Erlang - Pitfalls and Solutions
 
Globe labs api_briefer_-_deck__1_
Globe labs api_briefer_-_deck__1_Globe labs api_briefer_-_deck__1_
Globe labs api_briefer_-_deck__1_
 
First impression of the new cloud native programming language ballerina
First impression of the new cloud native programming language ballerinaFirst impression of the new cloud native programming language ballerina
First impression of the new cloud native programming language ballerina
 
Autonomous transaction
Autonomous transactionAutonomous transaction
Autonomous transaction
 
High Performance Solr and JVM Tuning Strategies used for MapQuest’s Search Ah...
High Performance Solr and JVM Tuning Strategies used for MapQuest’s Search Ah...High Performance Solr and JVM Tuning Strategies used for MapQuest’s Search Ah...
High Performance Solr and JVM Tuning Strategies used for MapQuest’s Search Ah...
 
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
 
Spring One DC 2012: Building For Performance with Spring Integration & Spring...
Spring One DC 2012: Building For Performance with Spring Integration & Spring...Spring One DC 2012: Building For Performance with Spring Integration & Spring...
Spring One DC 2012: Building For Performance with Spring Integration & Spring...
 
代码大全(内训)
代码大全(内训)代码大全(内训)
代码大全(内训)
 
8 application servers_v2
8 application servers_v28 application servers_v2
8 application servers_v2
 
XPDDS17: Approach to Native Applications in XEN on ARM - Volodymyr Babchuk, E...
XPDDS17: Approach to Native Applications in XEN on ARM - Volodymyr Babchuk, E...XPDDS17: Approach to Native Applications in XEN on ARM - Volodymyr Babchuk, E...
XPDDS17: Approach to Native Applications in XEN on ARM - Volodymyr Babchuk, E...
 
Ims05 ims 100 k benchmark
Ims05   ims 100 k benchmarkIms05   ims 100 k benchmark
Ims05 ims 100 k benchmark
 
The Real World - Plugging the Enterprise Into It (nodejs)
The Real World - Plugging  the Enterprise Into It (nodejs)The Real World - Plugging  the Enterprise Into It (nodejs)
The Real World - Plugging the Enterprise Into It (nodejs)
 
IBM Impact 2014 AMC-1877: IBM WebSphere MQ for z/OS: Performance & Accounting
IBM Impact 2014 AMC-1877: IBM WebSphere MQ for z/OS: Performance & AccountingIBM Impact 2014 AMC-1877: IBM WebSphere MQ for z/OS: Performance & Accounting
IBM Impact 2014 AMC-1877: IBM WebSphere MQ for z/OS: Performance & Accounting
 
Async event based web server
Async event based web serverAsync event based web server
Async event based web server
 
Framework workshop
Framework workshopFramework workshop
Framework workshop
 
Purchase plus
Purchase plusPurchase plus
Purchase plus
 

Recently uploaded

Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
Bhaskar Mitra
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Peter Udo Diehl
 

Recently uploaded (20)

Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
In-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT ProfessionalsIn-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT Professionals
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
 
Optimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityOptimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through Observability
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara Laskowska
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 
IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
 
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone KomSalesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
 
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya HalderCustom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
 
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
 
UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
 

Chapter16

  • 1. 16. OTP Introduction Erlang TFT
  • 2. • OPT • Server – Basic • Server – Transaction • Server – Hot Code Swapping • Server – More Fun • gen_server • gen_server Template • my_bank.erl
  • 3. OTP • Open Telecom Platform : Application Framework • Behavior – 비기능적인 부분 ex) 무정지 기능 , Hot Code Swapping … ) • Callback – 비즈니스 로직
  • 4. Server – Basic • Client Interface • Callback
  • 5. Server – Transaction • 서버 변경 • 콜백은 그대로 유지
  • 6. Server – Hot Code Swapping
  • 8. gen_server http://www.erlang.org/doc/man/gen_server.html 1.Callback Module Name my_bank 2.Write Interface Routines start(), stop(), new_account(Who), deposit(Who, Amount), withdraw(Who, Amount) 3.Write Callback Routines init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3