Pragmatic Event-Driven Microservices

Slides:



Advertisements
Similar presentations
Web Applications Development Using Coldbox Platform Eddie Johnston.
Advertisements

Service Oriented Architectures in Heterogeneous Environments
Technical Architectures
Week 2 IBS 685. Static Page Architecture The user requests the page by typing a URL in a browser The Browser requests the page from the Web Server The.
Component Based Systems Analysis Introduction. Why Components? t Development alternatives: –In-house software –Standard packages –Components 60% of the.
The Architecture of Transaction Processing Systems
ECSE Software Engineering 1I HO 7 © HY 2012 Lecture 7 Publish/Subscribe.
Oakkar Fall The Need for Decision Engine Automate business processes Implement complex business decision logic Separation of rules and process Business.
Software Development Architectures Ankur K. Rajopadhye Louisiana Tech University.
How WebMD Maintains Operational Flexibility with NoSQL Rajeev Borborah, Sr. Director, Engineering Matt Wilson – Director, Production Engineering – Consumer.
Data Integration in Service Oriented Architectures Rahul Patel Sr. Director R & D, BEA Systems Liquid Data – XML-based data access and integration for.
GOVERNMENT SERVICES INTEGRATION INDUSTRY SOLUTION.
Behavioral Patterns  Behavioral patterns are patterns whose purpose is to facilitate the work of algorithmic calculations and communication between classes.
Introduction to the Enterprise Library. Sounds familiar? Writing a component to encapsulate data access Building a component that allows you to log errors.
Todd Snyder Development Team Lead Infragistics Experience Design Group.
Building an Offline Smart Client using Domain-Driven Design Principles Tim McCarthy.
1 Introduction to Middleware. 2 Outline What is middleware? Purpose and origin Why use it? What Middleware does? Technical details Middleware services.
Software Architectural Styles Andrew Midwinter, Mark Mullen, Kevin Wong, Matt Jones 1.
Architectural Patterns Support Lecture. Software Architecture l Architecture is OVERLOADED System architecture Application architecture l Architecture.
Enterprise Integration Patterns CS3300 Fall 2015.
Model View Controller MVC Web Software Architecture.
Clinical Research Platform Center for Biomedical Informatics (CBMI)
Today: Distributed Objects and Components 1. Me Greg Paperin MSci Computer Science href= 2.
Copyright 2007, Information Builders. Slide 1 iWay Web Services and WebFOCUS Consumption Michael Florkowski Information Builders.
Breaking Up Is Hard To Do From Monolith to Microservices.
EJB Enterprise Java Beans JAVA Enterprise Edition
Expense Tracking System Developed by: Ardhita Maharindra Muskan Regmi Nir Gurung Sudeep Karki Tikaprem Gurung Date: December 05 th, 2008.
September 28, 2010COMS W41561 COMS W4156: Advanced Software Engineering Prof. Gail Kaiser
Submitted by: Moran Mishan. Instructed by: Osnat (Ossi) Mokryn, Dr.
E-commerce Architecture Ayşe Başar Bener. Client Server Architecture E-commerce is based on client/ server architecture –Client processes requesting service.
1 BizTalk Server 2004, “Indigo” And “Yukon” Scott Woodgate Lead Product Manager E-Business Microsoft Corporation Scott Woodgate Lead Product Manager E-Business.
Extinction of Dinosaurs -> Rise of Microservices.
1 Copyright © 2008, Oracle. All rights reserved. Repository Basics.
Enterprise Java Beans. Contents  Understanding EJBs  Practice Section.
Oracle Database Native Sharding: a customer perspective ©2016 PayPal Inc. Confidential and proprietary. John Kanagaraj, Sr. Member of Technical Staff,
The Holmes Platform and Applications
J2EE Platform Overview (Application Architecture)
Self-Contained Systems
Connected Health Solution
Web Development Web Servers.
WEB SERVICES From Chapter 19 of Distributed Systems Concepts and Design,4th Edition, By G. Coulouris, J. Dollimore and T. Kindberg Published by Addison.
Gang of Four’s Design Patterns for Microservices
MVC and Design Patterns
Enterprise Computing Collaboration System Example
Connected Health Solution
CHAPTER 3 Architectures for Distributed Systems
PHP / MySQL Introduction
Software Architecture in Practice
#01 Client/Server Computing
Enterprise Application Architecture
Exploring Azure Event Grid
Design and Maintenance of Web Applications in J2EE
Java Messaging Service (JMS)
Java Messaging Service (JMS)
Interpreter Style Examples
Software Architecture
Java Messaging Service (JMS)
Lecture 1: Multi-tier Architecture Overview
Web Application Architectures
ARCH-1: Application Architecture made Simple
Tiers vs. Layers.
Web Application Architectures
MORE ON ARCHITECTURES The main reasons for using an architecture are maintainability and performance. We want to structure the software into reasonably.
WEB SERVICES From Chapter 19, Distributed Systems
Enterprise Java Beans.
Standards, APIs, and Applications
Web Application Architectures
Software Architecture & Design
Microservice Message Routing on Kubernetes
#01 Client/Server Computing
Presentation transcript:

Pragmatic Event-Driven Microservices Allard Buijze – @allardbz – allard@axoniq.io

Service Service Service

‘Normal’ SQL QUERY 22 JOINS 6 SUBQUERIES

Layered architecture User Interface Domain Model Service Layer Data Access Layer Domain Model Method invocation Cache Worker pools Web Cache Session replication Distributed 2nd level cache Query Cache

Source: http://www.sabisabi.com/images/DungBeetle-on-dung.JPG

AxonFramework

Monoliths St Breock Downs Monolith - www.cornwalls.co.uk

Microservices vs Monoliths Almost all the successful microservice stories have started with a monolith that got too big and was broken up Microservices system Almost all the cases where I've heard of a system that was built as a microservice system from scratch, it has ended up in serious trouble. Martin Fowler Source: http://martinfowler.com/bliki/MonolithFirst.html

Are you tall enough? Source: martinfowler.com/bliki/MicroservicePrerequisites.html

Microservice journey

Command Query Responsibility Segregation Events Command model Projections Client

Location transparency A component should neither be aware of nor make any assumptions about the location of components it interacts with. Location transparency starts with good API design (but doesn’t end there) A Component should not be aware, nor make any assumptions, of the location of Components it interacts with

Reasons to send a message Event Something has happened

‘Event-Driven’ Microservices OrderCreated ItemAdded ItemRemoved OrderConfirmed Order service Need to know ordered items

3 reasons to send a message Event Something has happened Command I want the system to do something Query I want to know something

Something has happened - Event Data change Deadline passing Or anything else that’s relevant in the domain

Publish-subscribe Want to know Something happened! Want to know

Exclusive consumers One of us wants to know Something happened! Want to know

Competing consumers One of us wants to know Something happened! Want to know

Balanced consumers One of us wants to know If (%) Something happened! Want to know

I want something done - Command Request-a-side-effect Change data / application state Send email Exactly 1 destination OK / NOK reply Maybe some data

Command Routing Can do something Can do something Do something!

I want to know something - Query Desire for information The response has more value than the question (Usually) side-effect free Different messaging patterns Single destination Scatter – gather query

Query – point to point Result = Price Price = 49

Query – scatter-gather Price = 199 Result = Min(Price) (wait 100ms) If (…) Price = 149

Query – scatter-gather Price = 199 Result = Min(Price) (wait 100ms) If (…) Price = 99 If (…) Price = 149

‘Event-Driven’ Microservices OrderCreated OrderConfirmed ItemAdded GetOrderDetails ItemRemoved OrderDetails OrderConfirmed Order service Need to know ordered items

At scale, different rules apply

How do you route all events to all components? How will this scale?

You Don't! It Won't!

As shipping module, I want to know when an order is placed Unmanageable mess Order Created Item Added to Order Shipping Address Added Billing Address Added Order Confirmed As shipping module, I want to know when an order is placed

Bounded context Explicitly define the context within which a model applies. Explicitly set boundaries in terms of team organization, usage within specific parts of the application, and physical manifestations such as code bases and database schemas. Keep the model strictly consistent within these bounds, but don’t be distracted or confused by issues outside.

Within a context, share ‘everything’

Between contexts, share ‘consciously’ As shipping module, I want to know when an order is placed Order Created + Item Added + Order Confirmed  Order Placed Order Created Item Added to Order Shipping Address Added Billing Address Added Order Confirmed

Where does Axon Framework fit? Inside each component in bounded context Axon provides the Java APIs towards platform EventBus, CommandBus, QueryBus Separation of business logic and infrastructure logic

It’s hard to get messaging right

We’re all solving the same problems

“Just enough” intelligence AxonIQ Messaging Platform Understands difference between Commands, Events, Queries and their routing patterns. Does not care about the content of these messages. Message Broker Sends messages. Main value add is reliability. Enterprise Service Bus Understands message content. Hard to configure and maintain. dumb smart

Our mission Provide the APIs and implementations necessary for event-driven microservices to cooperate harmoniously, allowing each of them to focus on the business logic.

More info? Too late for that now… AxonFramework.org AxonIQ.io Allard Buijze allard@axoniq.io @allardbz Visit our booth Too late for that now…