SlideShare a Scribd company logo
Game On!
Exploring Microservices with a
Text-Based Adventure
Erin Schnabel @ebullientworks
September 2016
Microservices are used to…
• compose a complex application using
– “small”
– independent (autonomous)
– replaceable
– processes
• that communicate via
– language-agnostic APIs
Microservice
MicroserviceMicroservice
Microservice
Microservices application
Subscribe
REST
(JSON/HTTP)
Microservice
Microservice
broker
API
Microservice
Publish
API
REST
(JSON/HTTP)
Publish
Service
Registry
API
Microservice
Why?
• Accommodate differences
– SQL, NoSQL, Graph…
– Change cycles
– Scaling profiles
– Security zoning
• Facilitate growth
– Polyglot explosion
• Agility!
– Bounded context
(code + data)
– Faster iteration cycles
• Reduce risk  try new things
– Isolate legacy vs. unknown
https://twitter.com/adrianco/status/441883572618948608
“Twitter microservices
map looks just like the
Netflix one. We called
this the ‘Death Star’
diagram”
— Adrian Cockcroft
via twitter
Interaction patterns
Fallacies of distributed computing
• The network is reliable
• Latency is zero
• Bandwidth is infinite
• The network is secure
• Topology doesn’t change
• There is one administrator
• Transport cost is zero
• The network is homogenous
-- L Peter Deutsch, 1994
https://en.wikipedia.org/wiki/Fallacies_of_distributed_computing
Eventual consistency
Bounded Contexts
DevOps
Automation
Conway’s law
Testing?
Microservices Sample Apps…
• Create a single service
• Rebuild a pre-baked microservices application
7
Clueless
No idea
Confident
Has read all the
things!
Experienced
Hands-on understanding
Puzzled / Realistic
Challenges are real
The premise …
• Hands on with microservices
• Stick with ’Hello World’ simplicity
• Choose your own adventure
• Fast path to the hard stuff
• Build something cool (to you!)
• Learn as you go
/go N
Retro, text-only interface
Status updates
Simple text commands
kafkaELK amalgam8couchdb
room
PlayerAuth
SweepProxystatic
MediatorMap
This is what
we run
kafkaELK amalgam8couchdb
room
PlayerAuth
SweepProxystatic
MediatorMap
Rooms are what
you build.
What happens when…
1. Build a basic room
2. Scale that room (multiple instances)
– Where are players?
– What about items or shared state?
– Latency, managing calls to additional services
Exploration of solutions for caching, circuit breakers, service interaction patterns
12
Twelve Factors
Twelve factor applications
• “a methodology for building
software-as-a-service applications”
– Created by developers at Heroku
• Factors are independent of
– programming language,
– backing services,
– cloud provider
• http://12factor.net/
Git + Submodules (Factor 1: codebase)
• Root repository: https://github.com/gameontext/gameon
– Optional use of submodules
• Key: Only builds update submodule commit levels
– Prevents conflicts and confusion caused by humans
15
Containers
• Encapsulation of all dependencies
• Parity: dev -> test -> prod
• Configuration passed in via environment
• Local: Docker Compose or Vagrant
– Pre-built images in dockerhub (this came later.. )
– Overlays for local editing
• Independent build pipelines per service to deploy containers
16
(Factor 2: dependencies, 5: build/release/run,
6: Processes, 8: concurrency, 10: dev/prod
parity)
Liberty (Factor 2, 10, 3: config, 4: backing services, 7: port binding, 9:
disposability)
• Java services are Liberty-based
• Customizable features: Cachable Docker Layers
– Explicit app server dependencies
– Self-contained immutable artifact
– Smaller war (smaller delta)
• Environment variables in server config
– Common configuration across environments
– Config munging not necessary
– Composable configuration w/ dropins if required
<couchdb id="couchdb"
jndiName="couchdb/connector"
libraryRef="couchdb-lib"
password="${env.COUCHDB_PASSWORD}"
url="${env.COUCHDB_SERVICE_URL}"
username="${env.COUCHDB_USER}"/>
17
Service composition
ELK mongo
room
Player
Proxy
JSON/HTTP (REST)
Concierge
• Player managed ”all interactions with the player”
• Concierge: tell player service which room is next
(/go N)
• Room (had to have one!)
ELK mongo
room
Player
Proxy
JSON/HTTP (REST)
Concierge
• Language separation
• Scaling worries
– websockets are long-running
– Simple CRUD operations
static
Mediator
ELK couchdb
room
Player
Proxy
JSON/HTTP (REST)
Concierge
• Bad metaphor
– Concierge just hands out keys
– Room registration required knowledge of neighbors
static
MediatorMap
kafkaELK couchdb
room
PlayerAuth
SweepProxystatic
MediatorMap
Messaging / Events
Serverless (time)
Security
OAuth & JWTs
• OAuth proxy
– Application id w/ different front-end
– Could be a gateway instead
• Access token converted into signed JWT
• System services deal only with JWT
– game-on.org SSL certificate
– Well-known public key
24
Hashed message authentication codes
(HMACs)
• Shared secrets
– Credentials not sent on the wire
– Used to verify identity of sender
• Map operations
– Mutable operations require HMAC signature
– Hashed signature used to prevent replays
• Room handshake for WebSocket
– It is the game calling the room
– Room answering the game
• https://book.game-on.org/microservices/ApplicationSecurity.html
25
Shared Library
Service discovery
Service registration and discovery
• Required for load balancing and scaling
• Services need to find each other
• Environment changes constantly
• Client-side or server-side?
• Client library, sidecar, or proxy?
Microservice
Microservice
Microservice
Service
Registry
Client library
Service
Proxy
app
sidecar
• Basics
– Service registration
– Service discovery
– Client-side load balancing
• How
– Sidecar model. 2 options:
• An independent process running in the same container as the app
• An independent container running in the same pod as the app
container
Successful?
Questions?
Thank You!
Erin Schnabel | schnabel@us.ibm.com | @ebullientworks
Play – http://game-on.org
Learn more – http://book.game-on.org

More Related Content

What's hot

Hyperledger Fabric EVM Integration Feb 20, 2018
Hyperledger Fabric EVM Integration Feb 20, 2018Hyperledger Fabric EVM Integration Feb 20, 2018
Hyperledger Fabric EVM Integration Feb 20, 2018
Arnaud Le Hors
 
Hyperledger Cello Feb 20, 2018
Hyperledger Cello Feb 20, 2018Hyperledger Cello Feb 20, 2018
Hyperledger Cello Feb 20, 2018
Arnaud Le Hors
 
ROS - an open-source Robot Operating System
ROS - an open-source Robot Operating SystemROS - an open-source Robot Operating System
ROS - an open-source Robot Operating System
abirpahlwan
 
NGSIv2 Overview for Developers That Already Know NGSIv1
NGSIv2 Overview for Developers That Already Know NGSIv1NGSIv2 Overview for Developers That Already Know NGSIv1
NGSIv2 Overview for Developers That Already Know NGSIv1
Fermin Galan
 
Microservices: The OSGi way A different vision on microservices
Microservices: The OSGi way A different vision on microservicesMicroservices: The OSGi way A different vision on microservices
Microservices: The OSGi way A different vision on microservicesMiguel Pastor
 
Agents and P2P Networks
Agents and P2P NetworksAgents and P2P Networks
Agents and P2P Networks
James Salter
 
Hyperledger community update 201805
Hyperledger community update 201805Hyperledger community update 201805
Hyperledger community update 201805
Arnaud Le Hors
 
Transforming monolith systems to microservices
Transforming monolith systems to microservicesTransforming monolith systems to microservices
Transforming monolith systems to microservices
Alon Yair
 
Доклад Владимира Бичева на третьем митапе сообщества блокчейн-разработчиков С...
Доклад Владимира Бичева на третьем митапе сообщества блокчейн-разработчиков С...Доклад Владимира Бичева на третьем митапе сообщества блокчейн-разработчиков С...
Доклад Владимира Бичева на третьем митапе сообщества блокчейн-разработчиков С...
Дмитрий Плахов
 
20180711 Metamask
20180711 Metamask 20180711 Metamask
20180711 Metamask
Hu Kenneth
 

What's hot (10)

Hyperledger Fabric EVM Integration Feb 20, 2018
Hyperledger Fabric EVM Integration Feb 20, 2018Hyperledger Fabric EVM Integration Feb 20, 2018
Hyperledger Fabric EVM Integration Feb 20, 2018
 
Hyperledger Cello Feb 20, 2018
Hyperledger Cello Feb 20, 2018Hyperledger Cello Feb 20, 2018
Hyperledger Cello Feb 20, 2018
 
ROS - an open-source Robot Operating System
ROS - an open-source Robot Operating SystemROS - an open-source Robot Operating System
ROS - an open-source Robot Operating System
 
NGSIv2 Overview for Developers That Already Know NGSIv1
NGSIv2 Overview for Developers That Already Know NGSIv1NGSIv2 Overview for Developers That Already Know NGSIv1
NGSIv2 Overview for Developers That Already Know NGSIv1
 
Microservices: The OSGi way A different vision on microservices
Microservices: The OSGi way A different vision on microservicesMicroservices: The OSGi way A different vision on microservices
Microservices: The OSGi way A different vision on microservices
 
Agents and P2P Networks
Agents and P2P NetworksAgents and P2P Networks
Agents and P2P Networks
 
Hyperledger community update 201805
Hyperledger community update 201805Hyperledger community update 201805
Hyperledger community update 201805
 
Transforming monolith systems to microservices
Transforming monolith systems to microservicesTransforming monolith systems to microservices
Transforming monolith systems to microservices
 
Доклад Владимира Бичева на третьем митапе сообщества блокчейн-разработчиков С...
Доклад Владимира Бичева на третьем митапе сообщества блокчейн-разработчиков С...Доклад Владимира Бичева на третьем митапе сообщества блокчейн-разработчиков С...
Доклад Владимира Бичева на третьем митапе сообщества блокчейн-разработчиков С...
 
20180711 Metamask
20180711 Metamask 20180711 Metamask
20180711 Metamask
 

Viewers also liked

CDI Best Practices with Real-Life Examples - TUT3287
CDI Best Practices with Real-Life Examples - TUT3287CDI Best Practices with Real-Life Examples - TUT3287
CDI Best Practices with Real-Life Examples - TUT3287
Ahmad Gohar
 
Don't Wait! Develop responsive applications with Java EE7 instead
Don't Wait! Develop responsive applications with Java EE7 insteadDon't Wait! Develop responsive applications with Java EE7 instead
Don't Wait! Develop responsive applications with Java EE7 instead
Erin Schnabel
 
12-factor applications using WAS Liberty, IBM Bluemix, and Docker
12-factor applications using WAS Liberty, IBM Bluemix, and Docker12-factor applications using WAS Liberty, IBM Bluemix, and Docker
12-factor applications using WAS Liberty, IBM Bluemix, and Docker
Erin Schnabel
 
IBM InterConnect: Java vs JavaScript for Enterprise WebApps
IBM InterConnect: Java vs JavaScript for Enterprise WebAppsIBM InterConnect: Java vs JavaScript for Enterprise WebApps
IBM InterConnect: Java vs JavaScript for Enterprise WebApps
Chris Bailey
 
Secure Your APIs with Amazon API Gateway
Secure Your APIs with Amazon API GatewaySecure Your APIs with Amazon API Gateway
Secure Your APIs with Amazon API Gateway
Mohammed Badran
 
Evolving a monolithic Java EE application to microservices
Evolving a monolithic Java EE application to microservicesEvolving a monolithic Java EE application to microservices
Evolving a monolithic Java EE application to microservices
Erin Schnabel
 
Security enforcement of Java Microservices with Apiman & Keycloak
Security enforcement of Java Microservices with Apiman & KeycloakSecurity enforcement of Java Microservices with Apiman & Keycloak
Security enforcement of Java Microservices with Apiman & Keycloak
Charles Moulliard
 
muCon 2016: Authentication in Microservice Systems By David Borsos
muCon 2016: Authentication in Microservice Systems By David BorsosmuCon 2016: Authentication in Microservice Systems By David Borsos
muCon 2016: Authentication in Microservice Systems By David Borsos
OpenCredo
 
API Connect Presentation
API Connect PresentationAPI Connect Presentation
API Connect Presentation
xband
 
Hardening Microservices Security: Building a Layered Defense Strategy
Hardening Microservices Security: Building a Layered Defense StrategyHardening Microservices Security: Building a Layered Defense Strategy
Hardening Microservices Security: Building a Layered Defense Strategy
Cloudflare
 
Handling Eventual Consistency in JVM Microservices with Event Sourcing (javao...
Handling Eventual Consistency in JVM Microservices with Event Sourcing (javao...Handling Eventual Consistency in JVM Microservices with Event Sourcing (javao...
Handling Eventual Consistency in JVM Microservices with Event Sourcing (javao...
Chris Richardson
 
Build Features, Not Apps
Build Features, Not AppsBuild Features, Not Apps
Build Features, Not Apps
Natasha Murashev
 

Viewers also liked (12)

CDI Best Practices with Real-Life Examples - TUT3287
CDI Best Practices with Real-Life Examples - TUT3287CDI Best Practices with Real-Life Examples - TUT3287
CDI Best Practices with Real-Life Examples - TUT3287
 
Don't Wait! Develop responsive applications with Java EE7 instead
Don't Wait! Develop responsive applications with Java EE7 insteadDon't Wait! Develop responsive applications with Java EE7 instead
Don't Wait! Develop responsive applications with Java EE7 instead
 
12-factor applications using WAS Liberty, IBM Bluemix, and Docker
12-factor applications using WAS Liberty, IBM Bluemix, and Docker12-factor applications using WAS Liberty, IBM Bluemix, and Docker
12-factor applications using WAS Liberty, IBM Bluemix, and Docker
 
IBM InterConnect: Java vs JavaScript for Enterprise WebApps
IBM InterConnect: Java vs JavaScript for Enterprise WebAppsIBM InterConnect: Java vs JavaScript for Enterprise WebApps
IBM InterConnect: Java vs JavaScript for Enterprise WebApps
 
Secure Your APIs with Amazon API Gateway
Secure Your APIs with Amazon API GatewaySecure Your APIs with Amazon API Gateway
Secure Your APIs with Amazon API Gateway
 
Evolving a monolithic Java EE application to microservices
Evolving a monolithic Java EE application to microservicesEvolving a monolithic Java EE application to microservices
Evolving a monolithic Java EE application to microservices
 
Security enforcement of Java Microservices with Apiman & Keycloak
Security enforcement of Java Microservices with Apiman & KeycloakSecurity enforcement of Java Microservices with Apiman & Keycloak
Security enforcement of Java Microservices with Apiman & Keycloak
 
muCon 2016: Authentication in Microservice Systems By David Borsos
muCon 2016: Authentication in Microservice Systems By David BorsosmuCon 2016: Authentication in Microservice Systems By David Borsos
muCon 2016: Authentication in Microservice Systems By David Borsos
 
API Connect Presentation
API Connect PresentationAPI Connect Presentation
API Connect Presentation
 
Hardening Microservices Security: Building a Layered Defense Strategy
Hardening Microservices Security: Building a Layered Defense StrategyHardening Microservices Security: Building a Layered Defense Strategy
Hardening Microservices Security: Building a Layered Defense Strategy
 
Handling Eventual Consistency in JVM Microservices with Event Sourcing (javao...
Handling Eventual Consistency in JVM Microservices with Event Sourcing (javao...Handling Eventual Consistency in JVM Microservices with Event Sourcing (javao...
Handling Eventual Consistency in JVM Microservices with Event Sourcing (javao...
 
Build Features, Not Apps
Build Features, Not AppsBuild Features, Not Apps
Build Features, Not Apps
 

Similar to Game On! Exploring Microservices with a Text-Based Adventure Game

.Net Microservices with Event Sourcing, CQRS, Docker and... Windows Server 20...
.Net Microservices with Event Sourcing, CQRS, Docker and... Windows Server 20....Net Microservices with Event Sourcing, CQRS, Docker and... Windows Server 20...
.Net Microservices with Event Sourcing, CQRS, Docker and... Windows Server 20...
Javier García Magna
 
Alex lakatos state of mobile web
Alex lakatos   state of mobile webAlex lakatos   state of mobile web
Alex lakatos state of mobile web
Codecamp Romania
 
Matrix, The Year To Date, Ben Parsons, TADSummit 2018
Matrix, The Year To Date, Ben Parsons, TADSummit 2018Matrix, The Year To Date, Ben Parsons, TADSummit 2018
Matrix, The Year To Date, Ben Parsons, TADSummit 2018
Alan Quayle
 
Metarhia: Node.js Macht Frei
Metarhia: Node.js Macht FreiMetarhia: Node.js Macht Frei
Metarhia: Node.js Macht Frei
Timur Shemsedinov
 
Hyperledger Fabric Update - June 2018
Hyperledger Fabric Update - June 2018Hyperledger Fabric Update - June 2018
Hyperledger Fabric Update - June 2018
Arnaud Le Hors
 
Open source building blocks for the Internet of Things - Jfokus 2013
Open source building blocks for the Internet of Things - Jfokus 2013Open source building blocks for the Internet of Things - Jfokus 2013
Open source building blocks for the Internet of Things - Jfokus 2013
Benjamin Cabé
 
XPDS14: OpenXT - Security and the Properties of a Xen Virtualisation Platform...
XPDS14: OpenXT - Security and the Properties of a Xen Virtualisation Platform...XPDS14: OpenXT - Security and the Properties of a Xen Virtualisation Platform...
XPDS14: OpenXT - Security and the Properties of a Xen Virtualisation Platform...
The Linux Foundation
 
John adams talk cloudy
John adams   talk cloudyJohn adams   talk cloudy
John adams talk cloudy
John Adams
 
Cloud for Game Developers – Myth or Real Scenarios?
Cloud for Game Developers – Myth or Real Scenarios?Cloud for Game Developers – Myth or Real Scenarios?
Cloud for Game Developers – Myth or Real Scenarios?
DevGAMM Conference
 
Vert.x introduction
Vert.x introductionVert.x introduction
Vert.x introductionGR8Conf
 
Summer 2017 undergraduate research powerpoint
Summer 2017 undergraduate research powerpointSummer 2017 undergraduate research powerpoint
Summer 2017 undergraduate research powerpoint
Christopher Dubois
 
Debugging the Web with Fiddler
Debugging the Web with FiddlerDebugging the Web with Fiddler
Debugging the Web with Fiddler
Ido Flatow
 
RPC in Smalltalk
 RPC in Smalltalk RPC in Smalltalk
RPC in Smalltalk
ESUG
 
Exploring microservices in a Microsoft landscape
Exploring microservices in a Microsoft landscapeExploring microservices in a Microsoft landscape
Exploring microservices in a Microsoft landscape
Alex Thissen
 
Chirp 2010: Scaling Twitter
Chirp 2010: Scaling TwitterChirp 2010: Scaling Twitter
Chirp 2010: Scaling Twitter
John Adams
 
Cont0519
Cont0519Cont0519
Cont0519
Samuel Dratwa
 

Similar to Game On! Exploring Microservices with a Text-Based Adventure Game (20)

Node.js
Node.jsNode.js
Node.js
 
.Net Microservices with Event Sourcing, CQRS, Docker and... Windows Server 20...
.Net Microservices with Event Sourcing, CQRS, Docker and... Windows Server 20....Net Microservices with Event Sourcing, CQRS, Docker and... Windows Server 20...
.Net Microservices with Event Sourcing, CQRS, Docker and... Windows Server 20...
 
Alex lakatos state of mobile web
Alex lakatos   state of mobile webAlex lakatos   state of mobile web
Alex lakatos state of mobile web
 
Matrix, The Year To Date, Ben Parsons, TADSummit 2018
Matrix, The Year To Date, Ben Parsons, TADSummit 2018Matrix, The Year To Date, Ben Parsons, TADSummit 2018
Matrix, The Year To Date, Ben Parsons, TADSummit 2018
 
Metarhia: Node.js Macht Frei
Metarhia: Node.js Macht FreiMetarhia: Node.js Macht Frei
Metarhia: Node.js Macht Frei
 
Node.js architecture (EN)
Node.js architecture (EN)Node.js architecture (EN)
Node.js architecture (EN)
 
Hyperledger Fabric Update - June 2018
Hyperledger Fabric Update - June 2018Hyperledger Fabric Update - June 2018
Hyperledger Fabric Update - June 2018
 
20120306 dublin js
20120306 dublin js20120306 dublin js
20120306 dublin js
 
Open source building blocks for the Internet of Things - Jfokus 2013
Open source building blocks for the Internet of Things - Jfokus 2013Open source building blocks for the Internet of Things - Jfokus 2013
Open source building blocks for the Internet of Things - Jfokus 2013
 
XPDS14: OpenXT - Security and the Properties of a Xen Virtualisation Platform...
XPDS14: OpenXT - Security and the Properties of a Xen Virtualisation Platform...XPDS14: OpenXT - Security and the Properties of a Xen Virtualisation Platform...
XPDS14: OpenXT - Security and the Properties of a Xen Virtualisation Platform...
 
John adams talk cloudy
John adams   talk cloudyJohn adams   talk cloudy
John adams talk cloudy
 
Cloud for Game Developers – Myth or Real Scenarios?
Cloud for Game Developers – Myth or Real Scenarios?Cloud for Game Developers – Myth or Real Scenarios?
Cloud for Game Developers – Myth or Real Scenarios?
 
Vert.x introduction
Vert.x introductionVert.x introduction
Vert.x introduction
 
Summer 2017 undergraduate research powerpoint
Summer 2017 undergraduate research powerpointSummer 2017 undergraduate research powerpoint
Summer 2017 undergraduate research powerpoint
 
Debugging the Web with Fiddler
Debugging the Web with FiddlerDebugging the Web with Fiddler
Debugging the Web with Fiddler
 
RPC in Smalltalk
 RPC in Smalltalk RPC in Smalltalk
RPC in Smalltalk
 
Exploring microservices in a Microsoft landscape
Exploring microservices in a Microsoft landscapeExploring microservices in a Microsoft landscape
Exploring microservices in a Microsoft landscape
 
Chirp 2010: Scaling Twitter
Chirp 2010: Scaling TwitterChirp 2010: Scaling Twitter
Chirp 2010: Scaling Twitter
 
Be faster then rabbits
Be faster then rabbitsBe faster then rabbits
Be faster then rabbits
 
Cont0519
Cont0519Cont0519
Cont0519
 

Recently uploaded

FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
RinaMondal9
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
Peter Spielvogel
 

Recently uploaded (20)

FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
 

Game On! Exploring Microservices with a Text-Based Adventure Game

  • 1. Game On! Exploring Microservices with a Text-Based Adventure Erin Schnabel @ebullientworks September 2016
  • 2. Microservices are used to… • compose a complex application using – “small” – independent (autonomous) – replaceable – processes • that communicate via – language-agnostic APIs Microservice MicroserviceMicroservice Microservice Microservices application Subscribe REST (JSON/HTTP) Microservice Microservice broker API Microservice Publish API REST (JSON/HTTP) Publish Service Registry API Microservice
  • 3. Why? • Accommodate differences – SQL, NoSQL, Graph… – Change cycles – Scaling profiles – Security zoning • Facilitate growth – Polyglot explosion • Agility! – Bounded context (code + data) – Faster iteration cycles • Reduce risk  try new things – Isolate legacy vs. unknown
  • 4. https://twitter.com/adrianco/status/441883572618948608 “Twitter microservices map looks just like the Netflix one. We called this the ‘Death Star’ diagram” — Adrian Cockcroft via twitter Interaction patterns
  • 5. Fallacies of distributed computing • The network is reliable • Latency is zero • Bandwidth is infinite • The network is secure • Topology doesn’t change • There is one administrator • Transport cost is zero • The network is homogenous -- L Peter Deutsch, 1994 https://en.wikipedia.org/wiki/Fallacies_of_distributed_computing
  • 7. Microservices Sample Apps… • Create a single service • Rebuild a pre-baked microservices application 7 Clueless No idea Confident Has read all the things! Experienced Hands-on understanding Puzzled / Realistic Challenges are real
  • 8. The premise … • Hands on with microservices • Stick with ’Hello World’ simplicity • Choose your own adventure • Fast path to the hard stuff • Build something cool (to you!) • Learn as you go
  • 9. /go N Retro, text-only interface Status updates Simple text commands
  • 12. What happens when… 1. Build a basic room 2. Scale that room (multiple instances) – Where are players? – What about items or shared state? – Latency, managing calls to additional services Exploration of solutions for caching, circuit breakers, service interaction patterns 12
  • 14. Twelve factor applications • “a methodology for building software-as-a-service applications” – Created by developers at Heroku • Factors are independent of – programming language, – backing services, – cloud provider • http://12factor.net/
  • 15. Git + Submodules (Factor 1: codebase) • Root repository: https://github.com/gameontext/gameon – Optional use of submodules • Key: Only builds update submodule commit levels – Prevents conflicts and confusion caused by humans 15
  • 16. Containers • Encapsulation of all dependencies • Parity: dev -> test -> prod • Configuration passed in via environment • Local: Docker Compose or Vagrant – Pre-built images in dockerhub (this came later.. ) – Overlays for local editing • Independent build pipelines per service to deploy containers 16 (Factor 2: dependencies, 5: build/release/run, 6: Processes, 8: concurrency, 10: dev/prod parity)
  • 17. Liberty (Factor 2, 10, 3: config, 4: backing services, 7: port binding, 9: disposability) • Java services are Liberty-based • Customizable features: Cachable Docker Layers – Explicit app server dependencies – Self-contained immutable artifact – Smaller war (smaller delta) • Environment variables in server config – Common configuration across environments – Config munging not necessary – Composable configuration w/ dropins if required <couchdb id="couchdb" jndiName="couchdb/connector" libraryRef="couchdb-lib" password="${env.COUCHDB_PASSWORD}" url="${env.COUCHDB_SERVICE_URL}" username="${env.COUCHDB_USER}"/> 17
  • 19. ELK mongo room Player Proxy JSON/HTTP (REST) Concierge • Player managed ”all interactions with the player” • Concierge: tell player service which room is next (/go N) • Room (had to have one!)
  • 20. ELK mongo room Player Proxy JSON/HTTP (REST) Concierge • Language separation • Scaling worries – websockets are long-running – Simple CRUD operations static Mediator
  • 21. ELK couchdb room Player Proxy JSON/HTTP (REST) Concierge • Bad metaphor – Concierge just hands out keys – Room registration required knowledge of neighbors static MediatorMap
  • 24. OAuth & JWTs • OAuth proxy – Application id w/ different front-end – Could be a gateway instead • Access token converted into signed JWT • System services deal only with JWT – game-on.org SSL certificate – Well-known public key 24
  • 25. Hashed message authentication codes (HMACs) • Shared secrets – Credentials not sent on the wire – Used to verify identity of sender • Map operations – Mutable operations require HMAC signature – Hashed signature used to prevent replays • Room handshake for WebSocket – It is the game calling the room – Room answering the game • https://book.game-on.org/microservices/ApplicationSecurity.html 25 Shared Library
  • 27. Service registration and discovery • Required for load balancing and scaling • Services need to find each other • Environment changes constantly • Client-side or server-side? • Client library, sidecar, or proxy? Microservice Microservice Microservice Service Registry Client library Service Proxy app sidecar
  • 28. • Basics – Service registration – Service discovery – Client-side load balancing • How – Sidecar model. 2 options: • An independent process running in the same container as the app • An independent container running in the same pod as the app container
  • 30.
  • 32. Thank You! Erin Schnabel | schnabel@us.ibm.com | @ebullientworks Play – http://game-on.org Learn more – http://book.game-on.org