• Save
Erlang, The Road Movie [GOTO:CPH 2011 Keynote]
Upcoming SlideShare
Loading in...5
×
 

Erlang, The Road Movie [GOTO:CPH 2011 Keynote]

on

  • 5,337 views

In November 2009 I set out on a journey to learn Erlang. And not just learn it: I wanted to immerse myself in it, get under it's skin, feel it, get to think like Erlang. I took it for a test drive, ...

In November 2009 I set out on a journey to learn Erlang. And not just learn it: I wanted to immerse myself in it, get under it's skin, feel it, get to think like Erlang. I took it for a test drive, and ended up spending 18 months in Erlang's company.

This is the story of my trip. Not so much a talk about Erlang itself, but about what I realized on the way about where things are going. The systems that we build are getting increasingly integrated, distributed, and fragile. And becoming so at a disturbing rate when I think about it.

Viewing the world from behind the steering wheel of this old beauty, I'll take you on a tour of some of the significant issues we're dealing with in today's software systems: cloud, multi-core, integration, high availability, and living with the fact that our software isn't perfect.

Statistics

Views

Total Views
5,337
Views on SlideShare
4,333
Embed Views
1,004

Actions

Likes
14
Downloads
0
Comments
0

23 Embeds 1,004

http://www.readwriteweb.com 742
http://readwrite.com 130
http://irr.posterous.com 69
http://lanyrd.com 33
http://www.slideshare.net 7
http://bit.ly 3
http://feedproxy.google.com 2
url_unknown 2
http://www.seofacts.biz 2
http://developersarena.com 1
http://ectimes.com 1
http://www.techgig.com 1
http://networqscience.com 1
https://lanyrd.com 1
http://quiddity.posterous.com 1
http://127.0.0.1:8795 1
http://elsterama.com 1
http://www.hanrss.com 1
http://proxy.my-addr.com 1
http://tweetedtimes.com 1
http://us-w1.rockmelt.com 1
http://10.0.1.2 1
http://www.365online.nu 1
More...

Accessibility

Upload Details

Uploaded via as Apple Keynote

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n

Erlang, The Road Movie [GOTO:CPH 2011 Keynote] Erlang, The Road Movie [GOTO:CPH 2011 Keynote] Presentation Transcript

  • Erlang, The Road Movie Lessons learned in Erlang Land @drkrab Kresten Krab Thorup CTO, Trifork1
  • About Me ■ Language Geek Emacs/TeX Hacker, GCC: Objective C, NeXT, Compiled Java, Ph.D. from Århus [language design] ■ Developer J2EE AppServer, CORBA/RMI, XA-TM, Java Firefighter ■ Trifork CTO Technology Adoption Conference Editor, GOTO/QCon2
  • ’90s Object Revolution3
  • ’90s Object Revolution Increased Complexity4
  • ’90s Object Revolution Increased Complexity Program Structure4
  • ’90s Object Revolution Increased Complexity Component Reuse Program Structure4
  • ’90s Object Revolution Increased Complexity Domain Modeling Component Reuse Program Structure4
  • Languages C# Ruby C++ Smalltalk Java Simula Objective-C5
  • Thinking Tools Patterns DDD UML OOA&D C# Ruby C++ Smalltalk Java Simula Objective-C6
  • American Scandinavian School School Increased Complexity Domain Modeling Component Reuse Program Structure7
  • American Scandinavian School School Increased Conceptual Complexity Modeling Pa rticipatory Design Domain Modeling Component Reuse Program Structure7
  • American Scandinavian School School Economics Increased Conceptual Reuse Complexity Modeling Engineering Pa rticipatory Design Domain Modeling Component Reuse Program Structure7
  • American Scandinavian School School Internet Increased Complexity Domain Modeling Component Reuse Program Structure8
  • Internet Increased Complexity Domain Modeling Component Reuse Program Structure9
  • More Complexity10
  • More Complexity Infrastructure made of Software10
  • More Complexity Infrastructure made of Software11
  • More Complexity Infrastructure made of Software12
  • More Complexity Infrastructure made of Software Fault Tolerance, Availability, QoS12
  • More Complexity Infrastructure made of Software Integration, Coordination Fault Tolerance, Availability, QoS12
  • More Complexity Infrastructure made of Software Cloud, Multi-Core Integration, Coordination Fault Tolerance, Availability, QoS12
  • More Complexity We ’re struggling to n dle these with an haSoftware Infrastructure made of object mindset! Cloud, Multi-Core Integration, Coordination Fault Tolerance, Availability, QoS12
  • Time for a new revolution? Cloud, Multi-Core Integration, Coordination Fault Tolerance, Availability, QoS13
  • What’s a Revolution? Thomas Kuhn The Structure of Scientific Revolutions14
  • paradigm paradigm15
  • paradigm paradigm15
  • paradigm paradigm normal science15
  • paradigm observe anomalies paradigm normal science15
  • paradigm observe anomalies paradigm CRISIS normal science15
  • paradigm observe anomalies paradigm CRISIS normal revolutionary science science15
  • paradigm observe anomalies normal science paradigm CRISIS normal revolutionary science science15
  • What is the right paradigm to cope with these? Cloud, Multi-Core Integration, Coordination Fault Tolerance, Availability, QoS16
  • What is the right paradigm to cope with these? Cloud, Multi-Core Integration, Coordination Fault Tolerance, Availability, QoS Parallel Compilers Erlang, Actor Models Functional, Data-Parallel16
  • Johnso n’s blog Ralph Next J ava” What is the “Erl ang, the right paradigm to a very with these? g to be cope rlang is goin Its main ... E uage ... imp orta nt lang erfectly e is tha t it is p a Cloud, Multi-Core core, web dvantag for the multi- suite d Integration, Coordinationt, i t is the future . In fac services -QoSd ck soli NLY ma ture, ro Fault Tolerance, Availability, ble for O ge that is suita lang ua Parallel stems able sy Compilers hly scal ing hig Erlang, Actor iModels h nes. writ ore mac run on multic to Functional, Data-Parallel16
  • Objects Actors17
  • Actors Objects17
  • Actors Objects American School Performance Engineering17
  • Actors Objects American Scandinavian School School Performance Conceptual Engineering Modeling17
  • Actors anomalies Objects American Scandinavian School School Performance Conceptual Engineering Modeling17
  • Actors Quest in this talk: anomalies Objects If Actor-Prog ramming Paradigm, is the new Scandinavian American School re the What a anomalies School ance uld see Coow? tual Perform sho we n ncep Engineering Modeling17
  • 18
  • Making reliable distributed control systems in the presence of errors19
  • Making reliable distributed control systems in the presence of errors19
  • Making reliable distributed control systems in the presence of errors ■ The “secret weapon” for Ericsson’s market leading, real-time telephony systems.19
  • Making reliable distributed control systems in the presence of errors ■ The “secret weapon” for Ericsson’s market leading, real-time telephony systems. ■ 20+ years of experience to learn from.19
  • Erlang/OTP Open Telecommunications Platform ■ Embedded Distributed Systems ■ High Availability ■ In-Production Upgrades20
  • How to Learn Erlang21
  • How to Learn Erlang diss ect a frog, Don’t Build One! Nicolas Negropont e21
  • Your Erlang Program Platform Framework BEAM BEAM Emulator BIFs Your favorite OS22
  • Your Erlang Program Platform Framework BEAM BEAM Emulator BIFs Your favorite OS22
  • Your Erlang Program Platform Framework BEAM ERJANG BIFs JVM Java Virtual Machine Your favorite OS23
  • Anomalies in the object-oriented world view24
  • Figure 2-1 Interface and implementation interface implementation 11 10 9 8 7 625 Looking at such a unit from the inside, as the implem Graphics from Object-Oriented Programming with Objective C, Apple, 2011
  • Figure 3-1 An object Encapsulation m et h o d me et h o d data thod m m et h o d26
  • and a data structure that serves Figure 3-1 An object fields of its data structure are it hide them from the rest of the The insight of object-oriented programming is to combine st m et h o da high-level unit, an object, and to give it language su data—in Figure 3-1 An object me and a data structure that serves those functions. The function m et h o d data thod fields of its data structure are its instanceovariables. The met hide them from the rest of the program, m et has Figure 3-1 illustrat d me m et h o d m et h o d data thod Figure 3-1 An object m et h o d m et h o d If you’ve ever tackled any kind of difficult programming problem groups of functions that work on a particular kind of data—implic me m et h o d Object-oriented programming makes these function groups expl data thod group, rather than its components.If you’ve ever tackled any kind The only way to an object’s dat m et h o d groups of functions that work o Object-oriented programming By combining both state and behavior in a single unit, an object b really is greater than the sum of itsgroup, rather thanis a componen parts. An object its kind of se over a specific functional area. It can play a full-fledged modular If you’ve ever tackled any kind By difficult programmingand be of combining both state prob really is greater than the sum o groups of functions that work on a particular kind of data—im27 Terminology: Object-oriented terminology varies from language
  • and a data structure that serves Figure 3-1 An object fields of its data structure are it hide them from the rest of the The insight of object-oriented programming is to combine st m et h o da high-level unit, an object, and to give it language su data—in Figure 3-1 An object me and a data structure that serves those functions. The function m et h o d data thod fields of its data structure are its instanceovariables. The met hide them from the rest of the program, m et has Figure 3-1 illustrat d me m et h o d m et h o d data thod Figure 3-1 An object m et h o d m et h o d If you’ve ever tackled any kind of difficult programming problem groups of functions that work on a particular kind of data—implic me m et h o d Object-oriented programming makes these function groups expl data thod group, rather than its components.If you’ve ever tackled any kind The only way to an object’s dat m et h o d groups of functions that work o Object-oriented programming By combining both state and behavior in a single unit, an object b really is greater than the sum of itsgroup, rather thanis a componen parts. An object its kind of se over a specific functional area. It can play a full-fledged modular If you’ve ever tackled any kind By difficult programmingand be of combining both state prob really is greater than the sum o groups of functions that work on a particular kind of data—im27 Terminology: Object-oriented terminology varies from language
  • and a data structure that serves Figure 3-1 An object fields of its data structure are it hide them from the rest of the The insight of object-oriented programming is to combine st m et h o da high-level unit, an object, and to give it language su data—in Figure 3-1 An object me and a data structure that serves those functions. The function m et h o d data thod fields of its data structure are its instanceovariables. The met hide them from the rest of the program, m et has Figure 3-1 illustrat d me m et h o d m et h o d data thod Figure 3-1 An object m et h o d m et h o d If you’ve ever tackled any kind of difficult programming problem groups of functions that work on a particular kind of data—implic me m et h o d Object-oriented programming makes these function groups expl data thod group, rather than its components.If you’ve ever tackled any kind The only way to an object’s dat m et h o d groups of functions that work o Object-oriented programming By combining both state and behavior in a single unit, an object b really is greater than the sum of itsgroup, rather thanis a componen parts. An object its kind of se over a specific functional area. It can play a full-fledged modular If you’ve ever tackled any kind By difficult programmingand be of combining both state prob really is greater than the sum o groups of functions that work on a particular kind of data—im27 Terminology: Object-oriented terminology varies from language
  • and a data structure that serves Figure 3-1 An object fields of its data structure are it hide them from the rest of the The insight of object-oriented programming is to combine st m et h o da high-level unit, an object, and to give it language su data—in Figure 3-1 An object me and a data structure that serves those functions. The function m et h o d data thod fields of its data structure are its instanceovariables. The met hide them from the rest of the program, m et has Figure 3-1 illustrat d me m et h o d m et h o d data thod Figure 3-1 An object m et h o d m et h o d If you’ve ever tackled any kind of difficult programming problem groups of functions that work on a particular kind of data—implic me m et h o d Object-oriented programming makes these function groups expl data thod group, rather than its components.If you’ve ever tackled any kind The only way to an object’s dat m et h o d groups of functions that work o Object-oriented programming By combining both state and behavior in a single unit, an object b really is greater than the sum of itsgroup, rather thanis a componen parts. An object its kind of se over a specific functional area. It can play a full-fledged modular If you’ve ever tackled any kind By difficult programmingand be of combining both state prob really is greater than the sum o groups of functions that work on a particular kind of data—im27 Terminology: Object-oriented terminology varies from language
  • and a data structure that serves Figure 3-1 An object fields of its data structure are it hide them from the rest of the The insight of object-oriented programming is to combine st m et h o da high-level unit, an object, and to give it language su data—in Figure 3-1 An object me and a data structure that serves those functions. The function m et h o d data thod fields of its data structure are its instanceovariables. The met hide them from the rest of the program, m et has Figure 3-1 illustrat d me m et h o d m et h o d data thod Figure 3-1 An object m et h o d m et h o d If you’ve ever tackled any kind of difficult programming problem groups of functions that work on a particular kind of data—implic me m et h o d Object-oriented programming makes these function groups expl data thod group, rather than its components.If you’ve ever tackled any kind The only way to an object’s dat m et h o d groups of functions that work o Object-oriented programming By combining both state and behavior in a single unit, an object b really is greater than the sum of itsgroup, rather thanis a componen parts. An object its kind of se over a specific functional area. It can play a full-fledged modular If you’ve ever tackled any kind By difficult programmingand be of combining both state prob really is greater than the sum o groups of functions that work on a particular kind of data—im27 Terminology: Object-oriented terminology varies from language
  • and a data structure that serves Figure 3-1 An object fields of its data structure are it hide them from the rest of the The insight of object-oriented programming is to combine st m et h o da high-level unit, an object, and to give it language su data—in Figure 3-1 An object ma ly no me and a data structure that serves those functions. The function m et h o d data A thod fields of its data structure are its instanceovariables. The met hide them from the rest of the program, m et has Figure 3-1 illustrat d me m et h o d m et h o d data thod Figure 3-1 An object m et h o d m et h o d If you’ve ever tackled any kind of difficult programming problem groups of functions that work on a particular kind of data—implic me m et h o d Object-oriented programming makes these function groups expl data thod group, rather than its components.If you’ve ever tackled any kind The only way to an object’s dat m et h o d groups of functions that work o Object-oriented programming By combining both state and behavior in a single unit, an object b really is greater than the sum of itsgroup, rather thanis a componen parts. An object its kind of se over a specific functional area. It can play a full-fledged modular If you’ve ever tackled any kind By difficult programmingand be of combining both state prob really is greater than the sum o groups of functions that work on a particular kind of data—im27 Terminology: Object-oriented terminology varies from language
  • and a data structure that serves those functions. The functions are known as the object’s methods, a fields of its data structure are its instance variables. The methods wrap around the instance variable hide them from the rest of the program, as Figure 3-1 illustrates. The insight of object-oriented programming is to 3-1 Figure combineAn object behavior—data The insight of object-oriented programming is to combine state and and operations on CHAPTER a high-level unit, an object, and to give it language support. An object is a group of related functions data—in 3 data—in a high-level unit, an object, and to give it languag et h o d and a data structure that serves those functions.m functions are known as the object’s methods, and the serves those functions. The funct The and a data structure that fields of its data structure are its instance variables. The methods wrap around the instance variables and fields of its data structure are its instance variables. The m me m et h o d hide them from the rest of the program, as Figuredata illustrates. 3-1 hide them from the rest of the program, as Figure 3-1 illus thod Figure 3-1 An object m et h o d Figure 3-1 An object The Object Model m et h o d CHAPTER 3 m et h o d me me If you’ve ever tackled any kind of difficult programming problem, it’s likely that your design has inclu m et h o d m et h o d data groups of functions that work on a particular kind data thod thod of data—implicit “objects” without the language su Object-oriented programming makes these function groups explicit and permits you to think in terms m et h o d m et h o d group, rather than its components. The only way to an object’s data, the only interface, is through its me The insight of object-oriented programming is to combine state and behavior—data single unit, an object becomes more than either alone; the By combining both state and behavior in a and operations on The Object Model data—in a high-level unit, an object, and toreallyit language support.sumobjectparts. An object is a kind of self-sufficient “subprogram” with juris give is greater than the An of its is a group of related functions If you’ve ever tackled any kind of difficult programming problem, known that your design has included and a data structure that serves those functions. The functions areit’s likelyas the object’s methods,tackled any kind of difficult programming pr If you’ve ever and the over a specific functional area. It can play a full-fledged modular role within a larger program design groups its data structure are on a particular kind of The methods “objects” without groups variables and fields ofof functions that work its instance variables. data—implicitwrap around the instanceof functions that work on a particular kind of data— the language support. Object-oriented programming program, as function groups explicit and permits you to think in terms programming makes these function group hide them from the rest of the makes these Figure 3-1 illustrates. Object-oriented of the Terminology: Object-oriented terminology variesratherlanguage to language.The only way to an objec group, from than its components. For example, in C++, m group, rather than its components. The only way to an object’s data, the only interface, is through its methods. are called member functions and instance variables are known as data members. This document uses Figure 3-1 An object By combining both state and behavior in a terminology ofobject becomes more than basis in Smalltalk. state and behavior in a single unit, an o single unit, an Objective-C, which has its either alone; the whole By combining both The insighta kind of self-sufficient “subprogram” iscombinethan the sum of its parts. An object is a kin really is greater than the sum of its parts. An object is of object-oriented programming is to greater state and behavior—data and operations really with jurisdiction m et h o d functional area. It can play a full-fledged modular rolean object, and toover a specific functional area. It can play a full-fledged fun over a specific data—in a high-level unit, within a larger program design. support. An object is a group of related mo give it language For example, if you were to write a program that The functions are known as the object’s methods, a and a data structure that serves those functions. modeled home water usage, you might invent obje me m et h o d data fields of its data structure are its instance variables. The methods wrap around Faucet object that represent the various components of the water-delivery system. One might be a the instance variable thod Terminology: Object-oriented terminology varies from language and stopprogram, ofTerminology:methods hide methods to start to language. flow as water, set the rate of have them from the rest of the the For example, in3-1 illustrates.flow, return the amount of water con Figure C++, Object-oriented terminology varies from lan are called member functions and instance variables are known as so on. To do this work, acalled member functions and instance variables to keep m et h o d in a given period, and data members. This document uses the would need instance variables are kno are Faucet object terminology of Objective-C, which has its basis in Smalltalk. is open or shut, how much water is being used, andwhich has its basis in Smalltal of whether the tap object terminology of Objective-C, where the water is coming fr Figure 3-1 An Clearly, a programmatic Faucet object can be smarter than a real one (it’s analogous to a mechanical For example, if you were to write a program thatm et h o d problem,water usage, you mightexample, if you to If you’ve ever tackled any kind of difficult programming home it’s likely that attached). invent includedwere to like anyprogramcomponent, ex modeled For objects write a that modeled with lots of gauges and instruments your design hasBut even a real faucet, system represent functions that work on a particular kind of data—implicit “objects”be a Faucet language support. groups of the various components of the water-delivery system. One might without represent theyou need programming the water-delivery th the object that wouldcomponents of units, like objects, sy various me m et h o d both state and behavior. To effectively model a system, have methods toprogramming makes thesewater, data rate of flow, return the amountthink in terms of theand stop the flow of water, set the ra Object-oriented start and stop the flow ofcombine state and behavior. permits you to of methods to start set the have water consumed thod function groups explicit and in a given period, and so on. To doThe only wayFaucet object would need instance variables toperiod, and so on. To do this work, a Faucet ob group, rather than its components. this work, a to an object’s data, the only interface, is through its methods. in a given keep track of whether the tap is open or shut, how much water is being used,network of interconnected objects that open or shut, how much water part o A program consists of a and where the water is coming from.is call upon each other to solve a is bei m et h o d of whether the tap By combining both state and behavior in a puzzle unit, an objectin Figure 3-2 (page 16)). Each object has a specific role to play in the overall des single (as illustrated becomes more than either alone; the whole Clearly, a programmatic Faucet its parts. An object is athan a real one (it’s analogous Clearly, a programmatic Faucet object can be smarter tha really is greater than the sum of object can be smarter kind of self-sufficient “subprogram” with jurisdiction to a mechanical faucet the program and is able to communicate with other objects. Objects communicate through messages with a specific functional area. It can attached). But evenmodular role within a larger program design. over lots of gauges and instruments play a full-fledged to perform methods. systemwith lots of gauges and instruments attached). But even a a real faucet, like any component, exhibits are requests both state and behavior. To effectively model a system, you need programming units, like objects, that also it’s likely that your design has inclu If you’ve ever tackled any kind of difficult programming problem, To effectively model a system, yo both state and behavior. combine state and behavior. groups of functions that work on a particular kind ofstate and behavior. combine data—implicit “objects” without the language su Terminology: Object-oriented terminology varies from language to language. For example, in C++, methods and permits you to think in terms Object-oriented programming makes these function groups explicit28 are called member functions and instance variables are known ascall upon each otherdocument part of the a network interface, is through its me group, rather than its data members. This A solvean object’s of A program consists of a network of interconnected objects thatcomponents. The onlytoprogramuses thedata, the only of interconnected object way to a consists
  • and a data structure that serves those functions. The functions are known as the object’s methods, a fields of its data structure are its instance variables. The methods wrap around the instance variable hide them from the rest of the program, as Figure 3-1 illustrates. The insight of object-oriented programming is to 3-1 Figure combineAn object behavior—data The insight of object-oriented programming is to combine state and and operations on CHAPTER a high-level unit, an object, and to give it language support. An object is a group of related functions data—in 3 data—in a high-level unit, an object, and to give it languag et h o d and a data structure that serves those functions.m functions are known as the object’s methods, and the serves those functions. The funct The and a data structure that fields of its data structure are its instance variables. The methods wrap around the instance variables and fields of its data structure are its instance variables. The m me m et h o d hide them from the rest of the program, as Figuredata illustrates. 3-1 hide them from the rest of the program, as Figure 3-1 illus thod Figure 3-1 An object m et h o d Figure 3-1 An object The Object Model m et h o d CHAPTER 3 m et h o d me me If you’ve ever tackled any kind of difficult programming problem, it’s likely that your design has inclu m et h o d m et h o d data groups of functions that work on a particular kind data thod thod of data—implicit “objects” without the language su Object-oriented programming makes these function groups explicit and permits you to think in terms m et h o d m et h o d group, rather than its components. The only way to an object’s data, the only interface, is through its me The insight of object-oriented programming is to combine state and behavior—data single unit, an object becomes more than either alone; the By combining both state and behavior in a and operations on The Object Model data—in a high-level unit, an object, and toreallyit language support.sumobjectparts. An object is a kind of self-sufficient “subprogram” with juris give is greater than the An of its is a group of related functions If you’ve ever tackled any kind of difficult programming problem, known that your design has included and a data structure that serves those functions. The functions areit’s likelyas the object’s methods,tackled any kind of difficult programming pr If you’ve ever and the over a specific functional area. It can play a full-fledged modular role within a larger program design groups its data structure are on a particular kind of The methods “objects” without groups variables and fields ofof functions that work its instance variables. data—implicitwrap around the instanceof functions that work on a particular kind of data— the language support. Object-oriented programming program, as function groups explicit and permits you to think in terms programming makes these function group hide them from the rest of the makes these Figure 3-1 illustrates. Object-oriented of the Terminology: Object-oriented terminology variesratherlanguage to language.The only way to an objec group, from than its components. For example, in C++, m group, rather than its components. The only way to an object’s data, the only interface, is through its methods. are called member functions and instance variables are known as data members. This document uses Figure 3-1 An object By combining both state and behavior in a terminology ofobject becomes more than basis in Smalltalk. state and behavior in a single unit, an o single unit, an Objective-C, which has its either alone; the whole By combining both The insighta kind of self-sufficient “subprogram” iscombinethan the sum of its parts. An object is a kin really is greater than the sum of its parts. An object is of object-oriented programming is to greater state and behavior—data and operations really with jurisdiction m et h o d functional area. It can play a full-fledged modular rolean object, and toover a specific functional area. It can play a full-fledged fun over a specific data—in a high-level unit, within a larger program design. support. An object is a group of related mo give it language For example, if you were to write a program that The functions are known as the object’s methods, a and a data structure that serves those functions. modeled home water usage, you might invent obje me m et h o d data fields of its data structure are its instance variables. The methods wrap around Faucet object that represent the various components of the water-delivery system. One might be a the instance variable thod Terminology: Object-oriented terminology varies from language and stopprogram, ofTerminology:methods hide methods to start to language. flow as water, set the rate of have them from the rest of the the For example, in3-1 illustrates.flow, return the amount of water con Figure C++, Object-oriented terminology varies from lan are called member functions and instance variables are known as so on. To do this work, acalled member functions and instance variables to keep m et h o d in a given period, and data members. This document uses the would need instance variables are kno are Faucet object terminology of Objective-C, which has its basis in Smalltalk. is open or shut, how much water is being used, andwhich has its basis in Smalltal of whether the tap object terminology of Objective-C, where the water is coming fr Figure 3-1 An Clearly, a programmatic Faucet object can be smarter than a real one (it’s analogous to a mechanical For example, if you were to write a program thatm et h o d problem,water usage, you mightexample, if you to If you’ve ever tackled any kind of difficult programming home it’s likely that attached). invent includedwere to like anyprogramcomponent, ex modeled For objects write a that modeled with lots of gauges and instruments your design hasBut even a real faucet, system represent functions that work on a particular kind of data—implicit “objects”be a Faucet language support. groups of the various components of the water-delivery system. One might without represent theyou need programming the water-delivery th the object that wouldcomponents of units, like objects, sy various me m et h o d both state and behavior. To effectively model a system, have methods toprogramming makes thesewater, data rate of flow, return the amountthink in terms of theand stop the flow of water, set the ra Object-oriented start and stop the flow ofcombine state and behavior. permits you to of methods to start set the have water consumed thod function groups explicit and in a given period, and so on. To doThe only wayFaucet object would need instance variables toperiod, and so on. To do this work, a Faucet ob group, rather than its components. this work, a to an object’s data, the only interface, is through its methods. in a given keep track of whether the tap is open or shut, how much water is being used,network of interconnected objects that open or shut, how much water part o A program consists of a and where the water is coming from.is call upon each other to solve a is bei m et h o d of whether the tap By combining both state and behavior in a puzzle unit, an objectin Figure 3-2 (page 16)). Each object has a specific role to play in the overall des single (as illustrated becomes more than either alone; the whole Clearly, a programmatic Faucet its parts. An object is athan a real one (it’s analogous Clearly, a programmatic Faucet object can be smarter tha really is greater than the sum of object can be smarter kind of self-sufficient “subprogram” with jurisdiction to a mechanical faucet the program and is able to communicate with other objects. Objects communicate through messages with a specific functional area. It can attached). But evenmodular role within a larger program design. over lots of gauges and instruments play a full-fledged to perform methods. systemwith lots of gauges and instruments attached). But even a a real faucet, like any component, exhibits are requests both state and behavior. To effectively model a system, you need programming units, like objects, that also it’s likely that your design has inclu If you’ve ever tackled any kind of difficult programming problem, To effectively model a system, yo both state and behavior. combine state and behavior. groups of functions that work on a particular kind ofstate and behavior. combine data—implicit “objects” without the language su Terminology: Object-oriented terminology varies from language to language. For example, in C++, methods and permits you to think in terms Object-oriented programming makes these function groups explicit28 are called member functions and instance variables are known ascall upon each otherdocument part of the a network interface, is through its me group, rather than its data members. This A solvean object’s of A program consists of a network of interconnected objects thatcomponents. The onlytoprogramuses thedata, the only of interconnected object way to a consists
  • and a data structure that serves those functions. The functions are known as the object’s methods, a fields of its data structure are its instance variables. The methods wrap around the instance variable hide them from the rest of the program, as Figure 3-1 illustrates. The insight of object-oriented programming is to 3-1 Figure combineAn object behavior—data The insight of object-oriented programming is to combine state and and operations on CHAPTER 3 CHAPTER a high-level unit, an object, and to give it language support. An object is a group of related functions data—in 3 data—in a high-level unit, an object, and to give it languag et h o d and a data structure that serves those functions.m functions are known as the object’s methods, and the serves those functions. The funct The and a data structure that fields of its data structure are its instance variables. The methods wrap around the instance variables and fields of its data structure are its instance variables. The m me m et h o d hide them from the rest of the program, as Figuredata illustrates. 3-1 hide them from the rest of the program, as Figure 3-1 illus thod Figure 3-1 An object Figure 3-1 An object The Object Model m et h o d The Object Model m et h o d CHAPTER 3 m et h o d me me If you’ve ever tackled any kind of difficult programming problem, it’s likely that your design has inclu m et h o d m et h o d data groups of functions that work on a particular kind data thod thod of data—implicit “objects” without the language su Object-oriented programming makes these function groups explicit and permits you to think in terms m et h o d m et h o d group, rather than its components. The only way to an object’s data, the only interface, is through its me The insight of object-oriented programming is to combine The insight of object-oriented programming is to combine state and behavior—data data—in a high-level unit, an object, and to give it languag and operations on The Object Model By combining both state and behavior in a single unit, an object becomes more than either alone; the data—in a high-level unit, an object, and toreallyit language support.sumobjectparts. An object is a kind of self-sufficient “subprogram” withfunct give is greater than the An of its is a group of related functions serves those functions. The juris and a data structure that If you’ve ever tackled any kind of difficult programming problem, known that your design has included and a data structure that serves those functions. The functions areit’s likelyas the object’s methods,tackled any kind ofinstance programming pr If you’ve its data structure fields of ever and the difficult variables. The over a specific functional area. It can play a full-fledged modular roleare its a larger program designm within groups its data structure are on a particular kind of The methods “objects” without groups variables and work program, as Figure 3-1 illus fields ofof functions that work its instance variables. data—implicitwrap around the instanceof functions that of theon a particular kind of data— hidelanguage support. the them from the rest Object-oriented programming program, as function groups explicit and permits you to think in terms programming makes these function group hide them from the rest of the makes these Figure 3-1 illustrates. Object-oriented of the Terminology: Object-oriented terminology variesratherlanguage to language.The only way to an objec group, from than its components. For example, in C++, m group, rather than its components. The only way to an object’s data, the only interface, is through its methods. Figure 3-1 are called member functions and instance variables are knownobject members. This document uses An as data Figure 3-1 An object By combining both state and behavior in a terminology ofobject becomes more than basis in Smalltalk. state and behavior in a single unit, an o single unit, an Objective-C, which has its either alone; the whole By combining both The insighta kind of self-sufficient “subprogram”m combinethan the sum of its parts. An object is a kin really is greater than the sum of its parts. An object is of object-oriented programming is to et h ojurisdictionand behavior—data and operations really is greater state with d et h o d over a specific functional area. It can play a full-fledged modular rolean object, and toover a specific functional area. It can play a full-fledged fun m data—in a high-level unit, within a larger program design. support. An object is a group of related mo give it language me m et h o d For example, if you were to write a program that The functions are known as the object’s methods, a and a data structure that serves those functions. modeled home water usage, you might invent obje me m et h o d data thod data fields of its data structure are its instance variables. The methods wrap around Faucet object that represent the various components of the water-delivery system. One might be a the instance variable thod Terminology: Object-oriented terminology varies from language and stopprogram, ofTerminology:methods hide methods to start to language. flow as water, set the rate of have them from the rest of the the For example, in3-1 illustrates.flow, return the amount of water con Figure C++, Object-oriented terminology varies from lan m et h o d are called member functions and instance variables are known as so on. To do this work, acalled member functions and instance variables to keep m et h o d in a given period, and data members. This document uses the would need instance variables are kno are Faucet object terminology of Objective-C, which has its basis in Smalltalk. is open or shut, how much water is being used, andwhich has its basis in Smalltal of whether the tap object terminology of Objective-C, where the water is coming fr Figure 3-1 An Clearly, a programmatic Faucet object can be smarter than a real one (it’sof difficult programming pr analogous to a mechanical For example, if you were to write a program thatm et h o d problem,water usage, you mightexample, if you to anyto write a program that modeled modeled home it’s likely that your design has includedwere kind If you’ve ever tackled any kind of difficult programming If you’ve ever tackled For invent objects with lots of gauges and instruments attached). But even a real faucet, like any system component, ex represent functions that work on a particular kind of data—implicit “objects”be a Faucet language support. work on a particular kind of data— groups of the various components of the water-delivery system. One might without groups of functions that represent the various components of the water-delivery sy the object that would me m et h o d both state and behavior. To effectively model a system, you need programming units, like objects, th have methods toprogramming makes thesewater, data rate of flow, return the amountthink in terms of theand stop the flow of function the ra Object-oriented programming makes thesewater, set group Object-oriented start and stop the flow ofcombine state and behavior. permits you to of methods to start set the have water consumed thod function groups explicit and in a given period, and so on. To doThe only wayFaucet object would need instance variables toperiod, and so on. To doThe only wayFaucet ob group, rather than its components. this work, a to an objec group, rather than its components. this work, a to an object’s data, the only interface, is through its methods. in a given keep track of whether the tap is open or shut, how much water is being used,network of interconnected objects that open or shut, how much water part o A program consists of a and where the watercombining from.is calland behavior in a single unit, an o of whether the tap is coming is bei both state upon each other to solve a m et h o d By By combining both state and behavior in a puzzle unit, an objectin Figure 3-2 (page 16)). Each greater has a the sumrole to play in the overall des single (as illustrated becomes more than either alone; thethan specific of object whole Clearly, a programmatic Faucet its parts. An object is athan a real one (it’s analogous really is a programmatic Faucet its parts. An object is atha really is greater than the sum of object can be smarter kind of self-sufficient “subprogram” with jurisdiction Clearly, to a mechanical faucet object can be smarter kin the program and is able to communicate with other objects. Objects communicate through messages over a specific functional area. It can play a full-fledged mo with a specific functional area. It can attached). But evenmodular role within a larger program design. over lots of gauges and instruments play a full-fledged to perform methods. systemwith lots of gauges and instruments attached). But even a a real faucet, like any component, exhibits are requests both state and behavior. To effectively model a system, you need programming units, like objects, that also it’s likely that your design has inclu If you’ve ever tackled any kind of difficult programming problem, To effectively model a system, yo both state and behavior. combine state and behavior. groups of functions that work on a particular kind ofstate Object-oriented terminology varies from lan combine data—implicit “objects” without the language su Terminology: and behavior. Terminology: Object-oriented terminology varies from language to language. For example, in C++, methods and permits youvariablesin terms Object-oriented programming makes these function memberexplicit and instance to think are kno are called groups functions28 are called member functions and instance variables are known ascall upon each otherdocument part of the a network interface,basis in Smalltal data members. This A programuses Objective-C, only ofhas its is through its me group, rather than its terminology of the of A program consists of a network of interconnected objects thatcomponents. The onlyto solvean object’s data, the which interconnected object way to a consists
  • Active Object + State Machine Figure 3-1 An object mailbox m et h o d me et h o d data thod m m et h o d29
  • Active Object + State Machine Figure 3-1 An object mailbox m et h o d me et h o d data thod m m et h o d29
  • Active Object + State Machine Figure 3-1 An object mailbox m et h o d me et h o d data thod m m et h o d30
  • Active Object + State Machine Figure 3-1 An object mailbox m et h o d me et h o d data thod m m et h o d30
  • box empty full(X)31
  • box empty {‘put’,X} full(X)31
  • box empty {‘put’,X} {‘take’,From} / send(From, X) full(X)31
  • box() ➞ empty(). empty() ➞ box receive {‘put’, X} ➞ full(X) end. empty full(X) ➞ {‘put’,X} {‘take’,From} / send(From, X) receive {‘take’, From} ➞ full(X) From ! X, empty() end.32
  • box() ➞ empty(). empty() ➞ box receive {‘put’, X} ➞ full(X) end. empty full(X) ➞ {‘put’,X} {‘take’,From} / send(From, X) receive {‘take’, From} ➞ full(X) From ! X, empty() end. {‘peek’,From} / send(From,{‘ok’, X})33
  • box() ➞ empty(). empty() ➞ box receive {‘put’, X} ➞ full(X) end. empty full(X) ➞ {‘put’,X} {‘take’,From} / send(From, X) receive {‘take’, From} ➞ full(X) From ! X, empty(); {‘peek’, From} ➞ {‘peek’,From} / send(From,{‘ok’, X}) From ! {‘ok’, X}, full(X) end.34
  • box() ➞ empty(). empty() ➞ box receive {‘put’, X} ➞ full(X) end. empty full(X) ➞ {‘put’,X} {‘take’,From} / send(From, X) receive {‘take’, From} ➞ full(X) From ! X, empty(); {‘peek’, From} ➞ {‘peek’,From} / send(From,{‘ok’, X}) From ! {‘ok’, X}, full(X) end.34
  • box() ➞ empty(). empty() ➞ receive {‘put’, X} ➞ full(X) end. full(X) ➞ receive {‘take’, From} ➞ From ! X, empty(); {‘peek’, From} ➞ From ! {‘ok’, X}, full(X) end.35
  • box() ➞ empty(). Box = spawn(fun box/0), empty() ➞ receive {‘put’, X} ➞ full(X) end. full(X) ➞ receive {‘take’, From} ➞ From ! X, empty(); {‘peek’, From} ➞ From ! {‘ok’, X}, full(X) end.35
  • box() ➞ empty(). Box = spawn(fun box/0), empty() ➞ Box ! {‘put’, 27}, receive {‘put’, X} ➞ full(X) end. full(X) ➞ receive {‘take’, From} ➞ From ! X, empty(); {‘peek’, From} ➞ From ! {‘ok’, X}, full(X) end.35
  • box() ➞ empty(). Box = spawn(fun box/0), empty() ➞ Box ! {‘put’, 27}, receive {‘put’, X} ➞ Box ! {‘take’, self()}, full(X) receive end. Value ➞ print(Value) end full(X) ➞ receive {‘take’, From} ➞ From ! X, empty(); {‘peek’, From} ➞ From ! {‘ok’, X}, full(X) end.35
  • Interface Objects Fixed API Protocol Actors API changes with internal state36
  • ma ly A no Interface Objects Fixed API Protocol Actors API changes with internal state36
  • Pull vs. Push37
  • Pull vs. Push37
  • Pull vs. Push37
  • Pull vs. Push37
  • Pull vs. Push37
  • Pull vs. Push37
  • But isn’t this expensive?38
  • But isn’t this expensive? ... heard in the ‘90s Use Objects!38
  • But isn’t this expensive? ... heard in the ‘90s 100.000’s of objects, Use Objects! are you crazy?38
  • But isn’t this expensive? ... heard yesterday Use Actors!38
  • But isn’t this expensive? ... heard yesterday 100.000’s of processes, Use Actors! silly you!38
  • fields of its data structu hide them from the rest Effect Containment 3-1 Figure An obje m et h o d ■ Functional languages me et h o d disallow effects data thod ■ Many object-oriented m m et h o d styles encourage side effects. ■ Actors confine effects If you’ve ever tackled an groups of functions tha Object-oriented program39 group, rather than its co
  • From C++ to Java Garbage Collection From Java to Erlang State Containment40
  • Activity Composition The Object Model The Object Model The insight of object-oriented programming is to combine state and behavior—data and operations on The insight of object-oriented programming is to combine state and data—in a high-level unit, an object, and to give it language support. An object is a group of related functions give it language support. data—in a high-level unit, an object, and to and a data the object’s methods, and the and a data structure that serves those functions. The functions are known asstructure that serves those functions. The functions are k fields of its data structure are its instance variables. The methods wrap around the instance variables and variables. The methods w fields of its data structure are its instance hide them from the rest of the program, as Figure 3-1 illustrates. hide them from the rest of the program, as Figure 3-1 illustrates. Figure 3-1 An object Figure 3-1 An object m et h o d me spawn m et h o d me m et h o d m et h o d data data thod thod m et h o d m et h o d If you’ve ever tackled any kind of difficult programming problem,If you’ve ever tackled any kind included programming problem, it’ it’s likely that your design has of difficult groups of functions that work on a particular kind of data—implicit “objects” without the language a particular kind of data—implicit “ groups of functions that work on support. Object-oriented programming makes these function groups explicit and permits you to think in terms ofthese function groups explicit Object-oriented programming makes the group, rather than its components. The only way to an object’s data, the only interface, iscomponents. The only way to an object’s data, th group, rather than its through its methods. By combining both state and behavior in a single unit, an object becomes more than eitherand behavior in a single unit, an object bec By combining both state alone; the whole really is greater than the sum of its parts. An object is a kind of self-sufficient “subprogram”sum of its parts. An object is a kind of self-s really is greater than the with jurisdiction over a specific functional area. It can play a full-fledged modular role within a larger program design. play a full-fledged modular role over a specific functional area. It can Terminology: Object-oriented terminology varies from language to language. For example, in C++, methods varies from language to Terminology: Object-oriented terminology are called member functions and instance variables are known as data members. Thisfunctions and instance variables are known as da are called member document uses the terminology of Objective-C, which has its basis in Smalltalk. terminology of Objective-C, which has its basis in Smalltalk. For example, if you were to write a program that modeled home water usage, you might invent objects to that modeled home wa For example, if you were to write a program represent the various components of the water-delivery system. One mightthe a Faucet object thatof the water-delivery system. On represent be various components would have methods to start and stop the flow of water, set the rate of flow, return the amount and stop consumed water, set the rate of flow have methods to start of water the flow of41 in a given period, and so on. To do this work, a Faucet object would need instanceand so on.to keep track in a given period, variables To do this work, a Faucet object woul
  • Activity Composition The Object Model The Object Model The insight of object-oriented programming is to combine state and behavior—data and operations on The insight of object-oriented programming is to combine state and data—in a high-level unit, an object, and to give it language support. An object is a group of related functions give it language support. data—in a high-level unit, an object, and to and a data the object’s methods, and the and a data structure that serves those functions. The functions are known asstructure that serves those functions. The functions are k fields of its data structure are its instance variables. The methods wrap around the instance variables and variables. The methods w fields of its data structure are its instance hide them from the rest of the program, as Figure 3-1 illustrates. hide them from the rest of the program, as Figure 3-1 illustrates. Figure 3-1 An object Figure 3-1 An object m et h o d me link m et h o d me m et h o d m et h o d data data thod thod m et h o d m et h o d If you’ve ever tackled any kind of difficult programming problem,If you’ve ever tackled any kind included programming problem, it’ it’s likely that your design has of difficult groups of functions that work on a particular kind of data—implicit “objects” without the language a particular kind of data—implicit “ groups of functions that work on support. Object-oriented programming makes these function groups explicit and permits you to think in terms ofthese function groups explicit Object-oriented programming makes the group, rather than its components. The only way to an object’s data, the only interface, iscomponents. The only way to an object’s data, th group, rather than its through its methods. By combining both state and behavior in a single unit, an object becomes more than eitherand behavior in a single unit, an object bec By combining both state alone; the whole really is greater than the sum of its parts. An object is a kind of self-sufficient “subprogram”sum of its parts. An object is a kind of self-s really is greater than the with jurisdiction over a specific functional area. It can play a full-fledged modular role within a larger program design. play a full-fledged modular role over a specific functional area. It can Terminology: Object-oriented terminology varies from language to language. For example, in C++, methods varies from language to Terminology: Object-oriented terminology are called member functions and instance variables are known as data members. Thisfunctions and instance variables are known as da are called member document uses the terminology of Objective-C, which has its basis in Smalltalk. terminology of Objective-C, which has its basis in Smalltalk. For example, if you were to write a program that modeled home water usage, you might invent objects to that modeled home wa For example, if you were to write a program represent the various components of the water-delivery system. One mightthe a Faucet object thatof the water-delivery system. On represent be various components would have methods to start and stop the flow of water, set the rate of flow, return the amount and stop consumed water, set the rate of flow have methods to start of water the flow of42 in a given period, and so on. To do this work, a Faucet object would need instanceand so on.to keep track in a given period, variables To do this work, a Faucet object woul
  • Activity Composition The Object Model The Object Model The insight of object-oriented programming is to combine state and behavior—data and operations on The insight of object-oriented programming is to combine state and data—in a high-level unit, an object, and to give it language support. An object is a group of related functions give it language support. data—in a high-level unit, an object, and to and a data the object’s methods, and the and a data structure that serves those functions. The functions are known asstructure that serves those functions. The functions are k fields of its data structure are its instance variables. The methods wrap around the instance variables and variables. The methods w fields of its data structure are its instance hide them from the rest of the program, as Figure 3-1 illustrates. hide them from the rest of the program, as Figure 3-1 illustrates. Figure 3-1 An object Figure 3-1 An object m et h o d me link m et h o d me m et h o d m et h o d data data thod thod m et h o d m et h o d host host If you’ve ever tackled any kind of difficult programming problem,If you’ve ever tackled any kind included programming problem, it’ it’s likely that your design has of difficult groups of functions that work on a particular kind of data—implicit “objects” without the language a particular kind of data—implicit “ groups of functions that work on support. Object-oriented programming makes these function groups explicit and permits you to think in terms ofthese function groups explicit Object-oriented programming makes the group, rather than its components. The only way to an object’s data, the only interface, iscomponents. The only way to an object’s data, th group, rather than its through its methods. By combining both state and behavior in a single unit, an object becomes more than eitherand behavior in a single unit, an object bec By combining both state alone; the whole really is greater than the sum of its parts. An object is a kind of self-sufficient “subprogram”sum of its parts. An object is a kind of self-s really is greater than the with jurisdiction over a specific functional area. It can play a full-fledged modular role within a larger program design. play a full-fledged modular role over a specific functional area. It can Terminology: Object-oriented terminology varies from language to language. For example, in C++, methods varies from language to Terminology: Object-oriented terminology are called member functions and instance variables are known as data members. Thisfunctions and instance variables are known as da are called member document uses the terminology of Objective-C, which has its basis in Smalltalk. terminology of Objective-C, which has its basis in Smalltalk. For example, if you were to write a program that modeled home water usage, you might invent objects to that modeled home wa For example, if you were to write a program represent the various components of the water-delivery system. One mightthe a Faucet object thatof the water-delivery system. On represent be various components would have methods to start and stop the flow of water, set the rate of flow, return the amount and stop consumed water, set the rate of flow have methods to start of water the flow of42 in a given period, and so on. To do this work, a Faucet object would need instanceand so on.to keep track in a given period, variables To do this work, a Faucet object woul
  • “Let it Fail” philosophy m et h o d me et h o d data thod m m et h o d43
  • “Let it Fail” philosophy m et h o d ■ Write code with lots of assertions me et h o d data thod m m et h o d43
  • “Let it Fail” philosophy m et h o d ■ Write code with lots of assertions me et h o d ■ Let a meta-level do fault handling data thod m m et h o d43
  • “Let it Fail” philosophy m et h o d ■ Write code with lots of assertions me et h o d ■ Let a meta-level do fault handling data thod m ■ Defensive code is a symptom of a m et h o d weak platform (segfaults, memory leaks, ...)43
  • “Let it Fail” philosophy m et h o d ■ Write code with lots of assertions me et h o d ■ Let a meta-level do fault handling data thod m ■ Defensive code is a symptom of a m et h o d weak platform (segfaults, memory ly leaks, ...) ma A no43
  • Martin Fowler’s First Law of Distributed Objects Design rpc Starbucks doesn’t use transactions Steve Vinoski: RPC and its Offspring: Convenient, Yet Fundamentally Flawed44
  • Martin Fowler’s First Law of Distributed Objects Design rpc ma ly Starbucks doesn’t use A no transactions Steve Vinoski: RPC and its Offspring: Convenient, Yet Fundamentally Flawed44
  • Abstractions45
  • Abstractions ■ Any abstraction (hiding code) is problematic distribute, persist, etc.45
  • Abstractions ■ Any abstraction (hiding code) is problematic distribute, persist, etc. ■ You want to distribute/persist simple data (as in sql databases, document stores)45
  • Abstractions ■ Any abstraction (hiding code) is problematic distribute, persist, etc. ■ You want to distribute/persist simple data (as in sql databases, document stores) ■ JSON’s popularity is a testament to this anomaly.45
  • Abstractions ■ Any abstraction (hiding code) is problematic distribute, persist, etc. ■ You want to distribute/persist simple data (as in sql databases, document stores) ■ JSON’s popularity is a testament to this anomaly. m a ly A no45
  • Simple Values46
  • Simple Values ■ Tuple, List, Record, Number, String46
  • Simple Values ■ Tuple, List, Record, Number, String ■ Pattern matching is polymorphism for values46
  • Simple Values ■ Tuple, List, Record, Number, String ■ Pattern matching is polymorphism for values ■ Erlang data stores (like Mnesia) just store values, not bytes or objects.46
  • Simple Values ■ Tuple, List, Record, Number, String ■ Pattern matching is polymorphism for values ■ Erlang data stores (like Mnesia) just store values, not bytes or objects. ■ Too much of my Java programs are boilerplate code.46
  • “Object” Model Anomalies ■ Thread & Locks ■ Interfaces with Fixed API ■ Defensive Code ■ RPC/RMI ■ Boilerplate code for persistence47
  • Actor “Solutions” ■ Processes w/ state containment ■ Protocols ■ Let it Fail ■ Async Messaging ■ Send & store simple Data48
  • Erlang Systems49
  • OTP Actor Behaviors ■ Servers ■ Event Handlers ■ Finite State Machine ■ Supervisors ■ Networking: TCP, HTTP50
  • real problems that need to be solved to realize the potential of cloud computing51
  • real problems that need to be solved to realize the potential of cloud computing51
  • real problems that need to be solved to realize the potential of cloud computing51
  • real problems that need to be solved to realize the potential of cloud computing51
  • real problems that need to be solved to realize the potential of cloud computing51
  • real problems that need to be solved to realize the potential of cloud computing51
  • 52
  • 52
  • 53
  • Async Messaging53
  • Async Messaging State [Fault] Containment53
  • Async Messaging State [Fault] Containment Fault Monitoring53
  • 54
  • Common Medicine Card55
  • Common Medicine Card55
  • Common Medicine Card56
  • Who Else Uses Erlang?57
  • Revolution? Smalltalk58
  • Revolution? Java, Internet Smalltalk58
  • Erlang59
  • Multicore, Cloud Erlang59
  • Multicore, Cloud Erlang American Scandinavian School School59
  • Multicore, Cloud Erlang American Scandinavian School School Performance Engineering59
  • Multicore, Cloud Erlang American Scandinavian School School Performance Conceptual Engineering Modeling59
  • Thank You. @drkrab60
  • Java either steps up, or something else will. —Cameron Purdy Thank You. @drkrab61
  • Java either steps up, or something else will. —Cameron Purdy Thank You. @drkrab61