Microservices Live

Click here to load reader

  • date post

    15-Apr-2017
  • Category

    Technology

  • view

    266
  • download

    0

Embed Size (px)

Transcript of Microservices Live

PowerPoint Presentation

Microservices LiveGlynn BirdDeveloper Advocate @ IBM Cloud Data [email protected]@glynn_bird www.glynnbird.com

The monolith

2A long time ago in a galaxy far, far away. There was a space station. It did everything. It was a troop carrier, weapon, command centre, space port, canteenNot only is it large and cumbersome (not agile), its difficult to scale or modify.

3But large systems have flaws. Flaws that are not easy to find, test and fix flaws that can be exploited by your enemies.

4With catastrophic results.

Unix philosophy

"Write programs that do one thing and do it well. Write programs to work together. "Doug McIllroy

5The Unix folks had it right: built simple tools that do one thing well that can be composed together

Command-line toolsSimple tools that do one jobCan be piped together to create streams of workShare common data format

6

Command-line toolscat test.txt | grep "cake" | sort u | wc -l

7Sometimes processing data on your machine is faster than more complicated, cloud solutions. Computers are fast!

Microservices approachSmall dedicated services that do one jobCan be composedShare common data format

8

The word MicroservicesDocker containersRESTtful APIsService Oriented Architecture

9The term Microservices means lots of things to lots of people. It can mean how you compose small services using Docker, how you build APIs that can be consumed by HTTP clients and building complex, discoverable SOAs with lots of layers and scaffolding.

My definition of MicroservicesSmall apps that do one jobFed by queue or API

10My definition is.

Traditional app

Metrics Collector v1Database

11A traditional app would collect data, be responsible for writing it to the database and might even add analytics, visualisation etc in a monolithic stack.

Microservices appMetrics Collector MicroServiceStorage

queue/pubsub

AnalyticsRT Dashboard

12An alternative microservices way is to make microservices to put data in a queue/pubsub, and others to consume the data. All services are simple, separate processes that can be scaled separately.

Queue

13A queue shares its work between how ever many workers

PubSub

14PubSub sends the same data to all subscribers

Queue/Hub/MessageBroker technologiesRedis in-memory database with list and pubsub features

RabbitMQ scalable message queue and pubsub hub

Apache Kafka hugely scalable message hub

15In increasing scale and complexity: Redis, RabbitMQ and Kafka all provide queue and pubsub features

Demo

16

Metrics Collector Microservice

17

Database-as-a-ServiceSpin up a databaseTry it outIf its not for you, kill itP.A.Y.G

compose.io

18Best to try out your chosen technology. See how you like it and whether it meets your needs. Understand each ones pros and cons. Cloudant NoSQL database is free for small volumes. Other services are available to try in a choice of data centres.

Off-the-shelf Microservices

19

Off-the-shelf Microservices

20

Amazon Kinesis

21

OpenWhisk

22

Developer [email protected]

ThanksGlynn BirdBlog: www.glynnbird.comTwitter: @glynn_bird