integration patterns for microservices architectures
TRANSCRIPT
Integration Patterns forMicroservices Architectures
NATS in the [Multi-Cloud] Enterprise
David WilliamsCo-Founder & Partner Williams & Garcia
@DavWilliams
NATS in the [Multi-Cloud] Enterprise Integration Patterns for Microservices ArchitecturesNATS in the [Multi-Cloud] Enterprise
Williams & Garcia“Full-stack” consultants based in Atlanta, GA.
Leveraging the ecosystem of modern application technologies to improve the development, deployment, and operability of enterprise applications.
NATS in the [Multi-Cloud] Enterprise Integration Patterns for Microservices Architectures
My background:sysadmin, architect <- consultant -> product dev
My 20+ years in the industry:application infrastructure aka middleware aka platforms, and the infrastructure they depend on.
My passion:traditional enterprise it -> disruptive technologies
NATS in the [Multi-Cloud] Enterprise Integration Patterns for Microservices Architectures
what’s this NATS thing?Introduced to NATS through Cloud Foundry
NATS in the [Multi-Cloud] Enterprise Integration Patterns for Microservices Architectures
pos·si·bil·i·tiesthings that may be chosen or done out of several possible alternatives.
NATS in the [Multi-Cloud] Enterprise Integration Patterns for Microservices Architectures
A pattern catalog describing 65 integration patterns
Source: http://www.enterpriseintegrationpatterns.com/patterns/messaging/
NATS in the [Multi-Cloud] Enterprise Integration Patterns for Microservices Architectures
• Applications were tightly-coupled
• Applications were large monoliths
• Enterprise applications were written in a single language, the majority in Java
• Messaging systems were big and complex
These patterns were “harvested” and documented in a time when …
NATS in the [Multi-Cloud] Enterprise Integration Patterns for Microservices Architectures
anti-patternsproblem -> bad solution
NATS in the [Multi-Cloud] Enterprise Integration Patterns for Microservices Architectures
the most common anti-patternin microservices architectures
StovepipeWhen existing software systems are migrated to a distributed infrastructure. Arises when converting the existing software interfaces to distributed interfaces.
NATS in the [Multi-Cloud] Enterprise Integration Patterns for Microservices Architectures
Example of likely anti-patterns for microservices architectures
Any patterns that is transactional in nature:Transactional Client, Competing Consumers, Message Expiration
Any pattern that requires the messaging system to persist messages:Durable Subscriber, *Guaranteed Delivery, Claim Check
Any pattern where the messaging system inspects or modifies messages, selectively routes message, or transforms message content:Message Filter, Content Enricher, Content-Based Routing, Recipient List, Routing Slip and Process Manager
NATS in the [Multi-Cloud] Enterprise Integration Patterns for Microservices Architectures
* For a opinion of the fallacy of “Guaranteed Delivery”, visit: http://bravenewgeek.com/what-you-want-is-what-you-dont-understanding-trade-offs-in-distributed-messaging/
NATS in the [Multi-Cloud] Enterprise Integration Patterns for Microservices Architectures
so what are “good”patterns for
micromessaging?
NATS in the [Multi-Cloud] Enterprise Integration Patterns for Microservices Architectures
Basic design patterns you’re already familiar with…
Publish / Subscribe
Queueing
Request / ReplySource: http://www.slideshare.net/derekcollison/nats-a-new-nervous-system-for-distributed-cloud-platforms
NATS in the [Multi-Cloud] Enterprise Integration Patterns for Microservices Architectures
putting those patternsto usewith NATS
NATS in the [Multi-Cloud] Enterprise Integration Patterns for Microservices Architectures
Design Pattern: Interservice Communication
Microservices communicate with each other via NATS messages. All business and routing logic in the service, not the messaging system.
NATS in the [Multi-Cloud] Enterprise Integration Patterns for Microservices Architectures
Design Pattern: Control Plane
Service state changes triggered by receipt of messages from “controller” service.
NATS in the [Multi-Cloud] Enterprise Integration Patterns for Microservices Architectures
Design Pattern: Heartbeat
Each microservice publishes heartbeat (health) information via NATS.
NATS in the [Multi-Cloud] Enterprise Integration Patterns for Microservices Architectures
Design Pattern: Real-Time Stream Processing
Ingest through NATS into stream processor. Output processed stream via NATS to a SSE microservice.
NATS in the [Multi-Cloud] Enterprise Integration Patterns for Microservices Architectures
Design Pattern: Event Store
Data written to, updated, or deleted from data store. Notification message of event change sent via NATS.
NATS in the [Multi-Cloud] Enterprise Integration Patterns for Microservices Architectures
Design Pattern: Data Pump
Universal “database driver” using microservices as data writers/readers
NATS in the [Multi-Cloud] Enterprise Integration Patterns for Microservices Architectures
let’s go global
NATS in the [Multi-Cloud] Enterprise Integration Patterns for Microservices Architectures
Design Pattern: Bridgehead
Information exchange between different sites/regions via NATS
NATS in the [Multi-Cloud] Enterprise Integration Patterns for Microservices Architectures
why should developershave all the fun?
NATS in the [Multi-Cloud] Enterprise Integration Patterns for Microservices Architectures
Design Pattern: DevOps Gone Wild
Messaging as part of the infrastructure engineering & the DevOps toolchain
NATS in the [Multi-Cloud] Enterprise Integration Patterns for Microservices Architectures
Design Pattern: Global Domination
All services, everywhere, communicating via NATS
NATS in the [Multi-Cloud] Enterprise Integration Patterns for Microservices Architectures
don’t be like this guy
NATS in the [Multi-Cloud] Enterprise Integration Patterns for Microservices Architectures
in summaryMicroservices architectures provide an
opportunity to re-evaluate the way we think about communication in the composable enterprise.
NATS in the [Multi-Cloud] Enterprise Integration Patterns for Microservices Architectures
resourcesProject site:http://nats.io/
Referenced in deck:http://bravenewgeek.com/what-you-want-is-what-you-dont-understanding-trade-offs-in-distributed-messaging/ http://slideshare.net/derekcollison/nats-a-new-nervous-system-for-distributed-cloud-platforms
Get it here:http://nats.io/download/ https://hub.docker.com/_/nats/ https://github.com/nats-io/gnatsd
NATS in the [Multi-Cloud] Enterprise Integration Patterns for Microservices Architectures
questions?