Microservices Live

Click here to load reader

  • date post

  • Category


  • view

  • download


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


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


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


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.


13A queue shares its work between how ever many workers


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



Metrics Collector Microservice


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


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


Off-the-shelf Microservices


Amazon Kinesis




Developer [email protected]

ThanksGlynn BirdBlog: www.glynnbird.comTwitter: @glynn_bird