Microservices and Erlang/OTP. Christoph Iserlohn



Similar documents
Erlang a platform for developing distributed software systems

Building highly available systems in Erlang. Joe Armstrong

Building Hyper-Scale Platform-as-a-Service Microservices with Microsoft Azure. Patriek van Dorp and Alex Thissen

Refactoring Erlang Programs

Erlang in Production. I wish I'd known that when I started Or This is nothing like the brochure :-(

Computer Science Course Descriptions Page 1

Considerations for Adopting PaaS (Platform as a Service)

Reactive Applications: What if Your Internet of Things has 1000s of Things?

Course Descriptions. preparation.

WebSphere ESB Best Practices

Erlang The Driver behind WhatsApp s Success. Torben Hoffmann CTO, Erlang Solutions

How To Write An Erlang Based Software Update Platform For Mobile Devices

Course Agenda: Managing Active Directory with NetIQ Directory and Resource Administrator and NetIQ Exchange Administrator

Monitoring Hadoop with Akka. Clint Combs Senior Software Engineer at Collective

Decomposition into Parts. Software Engineering, Lecture 4. Data and Function Cohesion. Allocation of Functions and Data. Component Interfaces

Modern App Architecture for the Enterprise Delivering agility, portability and control with Docker Containers as a Service (CaaS)

September 18, Modular development in Magento 2. Igor Miniailo Magento

DevOps with Containers. for Microservices

EQMS TECHNOLOGY & TOOLS OF THE FUTURE PRESENTED BY: OLIVIER KLOSS, PRINCIPAL APPLICATION DEVELOPER & KEVIN BYRNE- LANGLOIS, SOLUTIONS ARCHITECT

What s New in SharePoint 2016 (On- Premise) for IT Pros

High-Availability Using Open Source Software

RED HAT CONTAINER STRATEGY

Course Descriptions. CS 101 Intro to Computer Science

Understand Troubleshooting Methodology

THE BASIC SERVER IN ERLANG

Design and Implementation of Client Server Network Management System for Ethernet LAN

20342 Advanced Solutions of Microsoft Exchange Server

Technical Notes P/N Rev 01

Exploring Oracle E-Business Suite Load Balancing Options. Venkat Perumal IT Convergence

Check Point and Security Best Practices. December 2013 Presented by David Rawle

Erlang in E-Commerce and Banking

Outline SSS Microsoft Windows Server 2008 Hyper-V Virtualization

Deep Freeze and Microsoft System Center Configuration Manager 2012 Integration

Managing IBM Lotus Notes Domino 7 Servers and Users. Course Description. Audience. Course Prerequisites. Machine Requirements.

Grid Computing Vs. Cloud Computing

<Insert Picture Here> Private Cloud with Fusion Middleware

A lap around Team Foundation Server 2015 en Visual Studio 2015

Structure of Presentation. The Role of Programming in Informatics Curricula. Concepts of Informatics 2. Concepts of Informatics 1

perspective Microservices A New Application Paradigm Abstract

Cloud Infrastructure Licensing, Packaging and Pricing

Application Monitor Application (APPMON)

Using Linux Clusters as VoD Servers

Vess A2000 Series HA Surveillance with Milestone XProtect VMS Version 1.0

PLUMgrid Toolbox: Tools to Install, Operate and Monitor Your Virtual Network Infrastructure

Database Administration

Above the Clouds: Introducing Akka

Microsoft Enterprise Search for IT Professionals Course 10802A; 3 Days, Instructor-led

Service Oriented Architecture (SOA) An Introduction

Windows Azure and private cloud

Microsoft Virtual Desktop Infrastructure (VDI) FAQ

A FULL-STACK SMTP PLATFORM Open & Scriptable, Targeted Specifically at Large-Scale Infrastructures

NE-20247D Configuring and Deploying a Private Cloud

Build. an Amazon-like experience for Cloud Services. Key Challenges. you click it. you see it. you got it. October

Scala Actors Library. Robert Hilbrich

LEARNING SOLUTIONS website milner.com/learning phone

Cloud Deployment Models

Getting Started with WebSphere Application Server v8.5 Version to Version Migrations

TPS Virtualization and Future Virtual Developments. Paul Hodge

How To Write A Windows Operating System (Windows) (For Linux) (Windows 2) (Programming) (Operating System) (Permanent) (Powerbook) (Unix) (Amd64) (Win2) (X

High Availability Solutions for the MariaDB and MySQL Database

Active Directory Management. Agent Deployment Guide

Software Life-Cycle Management

Configuring and Deploying a Private Cloud

Load Balancing Exchange 2007 SP1 Hub Transport Servers using Windows Network Load Balancing Technology

Installation Process

Modern Application Architecture for the Enterprise

Cloud Computing An Introduction

SharePoint What's New, What's Not. Colin Phillips :: SharePoint MVP & Consultant :: itgroove

Microsoft. Course 20463C: Implementing a Data Warehouse with Microsoft SQL Server

Course Outline. Module 1: Introduction to Data Warehousing

MS 20342B: Advanced Solutions of Microsoft Exchange Server 2013

Course 10751A: Configuring and Deploying a Private Cloud with System Center 2012

Print Audit 6 Technical Overview

Neptune. A Domain Specific Language for Deploying HPC Software on Cloud Platforms. Chris Bunch Navraj Chohan Chandra Krintz Khawaja Shams

SOLARWINDS ORION. Patch Manager Evaluation Guide for ConfigMgr 2012

50331D Windows 7, Enterprise Desktop Support Technician (Windows 10 Curriculum)

About Network Data Collector

ORACLE NOSQL DATABASE HANDS-ON WORKSHOP Cluster Deployment and Management

Software Defined Security Mechanisms for Critical Infrastructure Management

LinuxWorld Conference & Expo Server Farms and XML Web Services

Base One's Rich Client Architecture

An Oracle White Paper May Oracle Tuxedo: An Enterprise Platform for Dynamic Languages

Always On Infrastructure for Software as a Ser vice

UPDATE MANAGEMENT SERVICE The advantage of a smooth Software distribution

Advanced Solutions of Microsoft Exchange Server 2013

Avatier Identity Management Suite

Exclaimer Mail Archiver 3.04 Release Notes

Principles and characteristics of distributed systems and environments

Transcription:

Microservices and Erlang/OTP Christoph Iserlohn

About me Senior Consultant @ innoq MacPorts Team member

Agenda > Microservices > Erlang / OTP > How they fit together

Microservices

Attempt of definition > A system consisting of small, selfcontained services. All running isolated from each other, communicating only over the network.

Monoliths old and busted Old Step Van_MG_3279 by Kool Cats Photgraphy over 3 Million Views. Licensed under CC BY 2.0

Microservices the new hotness Hot Hot Hot" by flattop341. Licensed under CC BY 2.0

VS.

cognitive dimension Pinky & The Brain" by JD Hancock. Licensed under CC BY 2.0

on the service level: more comprehensible "Nasa earth" by NASA ESA - http://www.nasa.gov/. Licensed under Public Domain via Wikimedia Commons - http://commons.wikimedia.org/wiki/file:nasa_earth.jpg#mediaviewer/file:nasa_earth.jpg

on the system level: unable to see the big picture "Infant Stars in Orion" by NASA/JPL-Caltech/D. Barrado y Navascuàs (LAEFF-INTA) - http://www.spitzer.caltech.edu/images/2131-sig07-006-young-stars-emerge-from-orion-s-head. Licensed under Public Domain via Wikimedia Commons - http://commons.wikimedia.org/wiki/file:infant_stars_in_orion.jpg#mediaviewer/file:infant_stars_in_orion.jpg

organisational dimension Model of graphene structure by CORE-MATERIALS. Licensed under CC BY-SA 2.0

organized around business capabilities The Market Economy by Baer Tierkel. Licensed under CC BY 2.0

cross-functional teams Storm Squad by JD Hancock. Licensed under CC BY 2.0

you build it, you run it _DJM7077 by nubigena. Licensed under CC BY-ND 2.0

technological dimension Microchip e microciop by Fabrizio Sciami. Licensed under CC BY-SA 2.0

fault tolerance resilience broken macbook home key by Doctor Rose. Licensed under CC BY-ND 2.0

asynchronous communication Sept 25/10 Old German postbox by Judith Doyle. Licensed under CC BY-ND 2.0

coarse-grained interfaces phone by raindog808. Licensed under CC BY 2.0

sophisticated monitoring "Mission control center" by NASAOriginal uploader was Cjosefy at en.wikipedialater version(s) were uploaded by TheDJ at en.wikipedia. - http://spaceflight.nasa.gov/gallery/images/shuttle/sts-114/html/jsc2005e09159.htmltransferred from en.wikipedia. Licensed under Public Domain via Wikimedia Commons - http://commons.wikimedia.org/wiki/file:mission_control_center.jpg#mediaviewer/file:mission_control_center.jpg

infrastructure automation Tesla Robot Dance by Steve Jurvetson. Licensed under CC BY 2.0

Advantages > fast development cycle > it s easy to scale > flexibility of implementation > easy to get started for new developers > parts of the system can be replaced

Prerequisites > monitoring the whole system > central logging > tracing across service boundaries > automatic deployment > automatic provisioning

Challenges > service boundaries > contracts and governance > testing and refactoring > fallacies of distributed systems > support for a dozen technology stacks

Open questions > how big? > isn t this just SOA?

Summary > it s a promising approach, > but don t start with it mindlessly

Where are we now? "Gartner Hype Cycle" by Jeremykemp at en.wikipedia. Licensed under CC BY-SA 3.0 via Wikimedia Commons http://commons.wikimedia.org/wiki/file:gartner_hype_cycle.svg#mediaviewer/file:gartner_hype_cycle.svg

Erlang / OTP

What is Erlang / OTP? > a general purpose programming language > runtime environment and VM > Open Telecom Platform: libraries, tools and design patterns for building highly concurrent, distributed, fault tolerant systems

fault tolerant to software and hardware errors "BSoD in Windows 8" by Microsoft - Transferred from en.wikipedia to Commons.. Licensed under Public Domain via Wikimedia Commons - http://commons.wikimedia.org/wiki/file:bsod_in_windows_8.png#mediaviewer/file:bsod_in_windows_8.png

distributed systems "BalticServers data center" by Fleshas - I took this photo. Licensed under CC BY-SA 3.0 via Wikimedia Commons - http://commons.wikimedia.org/wiki/file:balticservers_data_center.jpg#mediaviewer/file:balticservers_data_center.jpg

non-stop running - continous operation over years "CEV-ISS" by NASA - http://www.nasa.gov/mission_pages/exploration/spacecraft/cev_hi_res.html. Licensed under Public Domain via Wikimedia Commons - http://commons.wikimedia.org/wiki/file:cev-iss.jpg#mediaviewer/file:cev-iss.jpg

Principles > lightweight concurrency > asynchronous communication > isolation > error handling > simple high-level language > tools not solutions or products

Erlang the language > high-level functional language > prolog inspired syntax > dynamically typed / safe > pattern matching everywhere > recursion > immutable data and variables

-module(factorial).! -export([factorial/1]).!! factorial(n) when N >= 0 -> factorial(n,1).!! factorial(0,acc) -> Acc;! factorial(n,acc) -> factorial(n-1,n*acc).!

Concurrency > millions of processes on one machine > processes are isolated > processes are used for everything: > concurrency > managing state > parallelism > no global data

Message passing > asynchronous > primitives: > fire & forget send > selective receive > more complex interactions can be built on top of these primitives

-module(pingpong). -export([start/1]). start(n) when N > 0 -> Pong = spawn(fun pong/0), ping(n, Pong). ping(0,pong) -> Pong! exit, ok; ping(n, Pong) -> Pong! {self(), ping}, receive pong -> io:format("pid ~p: got pong. ~p pings left~n", [self(), N-1]) end, ping(n - 1, Pong). pong() -> receive {From, ping} -> io:format("pid ~p: got ping from ~p~n", [self(), From]), From! pong, pong(); exit -> ok end.!

Error handling > avoid error checking code everywhere > let it crash > process based: > link - bidirectional > monitor - unidirectional > supervision trees

Supervision trees

Supervision trees

Supervision trees

Supervision trees

Distribution > loosely coupled nodes > mostly transparent > TCP/IP based

OTP > helps creating: > servers > finites state machines > event handler > supervisors > releases and upgrades

Hot code loading > module is unit of code handling > exists in two variants: old and current > controlled take over

Instrumentation > can trace almost everything: process events, send & receive messages, function calls > process introspection: memory, mailbox, links, cur. function... > interactive shell > SNMP based OAM

Summary > everything you need for building highly concurrent, distributed, robust systems > but not well suited for number crunching or maximum perfomance requirements

Where are we now? "Gartner Hype Cycle" by Jeremykemp at en.wikipedia. Licensed under CC BY-SA 3.0 via Wikimedia Commons http://commons.wikimedia.org/wiki/file:gartner_hype_cycle.svg#mediaviewer/file:gartner_hype_cycle.svg

Microservices & Erlang/OTP: how they fit together

How they fit together > Erlang / OTP has everything you need to build production-ready Microservices

How they fit together > fault tolerance / resilience > async communication is the default > amazing monitoring capabilites > tools for upgrading / downgrading running systems

Green Day 2010 Tour by Daniel D Auria. Licensed under CC BY-SA 2.0

Thank you! > Questions? > Comments? Christoph Iserlohn christoph.iserlohn@innoq.com