SlideShare a Scribd company logo
Micro Services Architecture
CSI – IT2020, IIT Mumbai, October 6th 2017
Computer Society of India, Mumbai Chapter
Araf Karsh Hamid : Co-Founder & CTO, MetaMagic Global Inc., NJ, USA
Twitter / Skype / LinkedIn : arafkarsh Email : araf.karsh@metamagic.in
A Micro Service will have its own Code Pipeline for build and deployment functionalities and it’s scope will be defined
by the Bounded Context focusing on the Business Capabilities and the interoperability between Micro Services will be
achieved using message based communication.
Pioneers in Microservices Implementation
10/8/2017 (C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA 2
New Entrants
Agenda
10/8/2017 3
• Pros and Cons
• Micro Services Characteristics
• Monolithic Vs. Micro Services Architecture
• SOA Vs. Micro Services Architecture
• App Scalability Based on Micro Services
• Hexagonal Architecture
Architecture Styles1
• Domain Driven Design
• Event Sourcing & CQRS
• Functional Reactive Programming
Design Styles2
• CAP Theorem
• Distributed Transactions : 2 Phase Commit
• SAGA Design Pattern
• Scalability Lessons from EBay
• Design Patterns
• References
Scalability3
(C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA
Pros
1. Adds Complexity
2. Skillset shortage
3. Confusion on getting the
right size
4. Team need to manage
end-to-end of the Service
(From UI to Backend to
Running in Production).
10/8/2017 4
1. Robust
2. Scalable
3. Testable (Local)
4. Easy to Change and
Replace
5. Easy to Deploy
6. Technology Agnostic
Cons
Pros and Cons1
(C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA

Recommended for you

Microservices
MicroservicesMicroservices
Microservices

Learn all about microservices from Product Marketing Manager Dan Giordano. We'll cover how to get started, the benefits, potential challenges, and how SmartBear can help.

microservicesmicroservices architectureapis
Introduction to microservices
Introduction to microservicesIntroduction to microservices
Introduction to microservices

This document provides an introduction to microservices, including: - Microservices are small, independently deployable services that work together and are modeled around business domains. - They allow for independent scaling, technology diversity, and enable resiliency through failure design. - Implementing microservices requires automation, high cohesion, loose coupling, and stable APIs. Identifying service boundaries and designing for orchestration and data management are also important aspects of microservices design. - Microservices are not an end goal but a means to solve problems of scale; they must be adopted judiciously based on an organization's needs.

microservicesservice-oriented architecturearchitecture
Design patterns for microservice architecture
Design patterns for microservice architectureDesign patterns for microservice architecture
Design patterns for microservice architecture

The presentation from our online webinar "Design patterns for microservice architecture". Full video from webinar available here: https://www.youtube.com/watch?v=826aAmG06KM If you’re a CTO or a Lead Developer and you’re planning to design service-oriented architecture, it’s definitely a webinar tailored to your needs. Adrian Zmenda, our Lead Dev, will explain: - when microservice architecture is a safe bet and what are some good alternatives - what are the pros and cons of the most popular design patterns (API Gateway, Backend for Frontend and more) - how to ensure that the communication between services is done right and what to do in case of connection issues - why we’ve decided to use a monorepo (monolithic repository) - what we’ve learned from using the remote procedure call framework gRPC - how to monitor the efficiency of individual services and whole SOA-based systems.

microservicesnode.jssoftware development
Micro Services Characteristics
5
1
By James Lewis and Martin Fowler
We can scale our operation independently, maintain
unparalleled system availability, and introduce new services
quickly without the need for massive reconfiguration. —
Werner Vogels, CTO, Amazon Web Services
Modularity ... is to a technological economy what
the division of labor is to a manufacturing one.
W. Brian Arthur,
author of e Nature of Technology
The key in making great and growable systems is much more
to design how its modules communicate rather than what
their internal properties and behaviors should be.
Alan Kay, 1998 email to the Squeak-dev list
(C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA
Components
via
Services
Organized around
Business
Capabilities
Products
NOT
Projects
Smart
Endpoints
& Dumb Pipes
Decentralized
Governance &
Data Management
Infrastructure
Automation
Design for
Failure
Evolutionary
Design
Micro Services System Design Model
Service
(Micro)
Process &
Tools
CultureOrganization
Solution
(Macro)
10/8/2017 6
Service: Focuses on a specific Business
Capability
Process & Tools: Development, Code
Deployment, Maintenance and Product
Management
Culture: A Shared set of values, beliefs by
everyone. Ubiquitous Language in DDD is
an important aspect of Culture.
Organization: Structure, Direction of
Authority, Granularity, Composition of
Teams.
Solution: Coordinate all inputs and
outputs of multiple services. Macro level
view of the system allows the designer to
focus more on desirable system behavior.
1
(C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA
The very first step of a
service design process is to
design the process itself.
Marc Stickdorn, author of
This is Service Design
Thinking
10/8/20177
Monolithic vs. Micro Services Example
Traditional Monolithic App using
Single Technology Stack
Micro Services with Multiple Technology Stack
Existing
aPaaS
vendors
creates
Monolithic
Apps.
This 3 tier
model is
obsolete
now.
Source:
Gartner
Market
Guide for
Application
Platforms
Nov 23, 2016
Event Stream
API Gateway (Zuul Edge Server)
Load Balancer (Ribbon)
Circuit Breaker (Hysterix)
Service Discovery (Eureka)
Load Balancer (Ribbon)
Circuit Breaker (Hysterix)
Load Balancer (Ribbon)
Circuit Breaker (Hysterix)
UI Layer
Web Services
Business Logic
Database Layer
Micro
Service
4
EE 7
Inventory
UI Layer
Web Services
Business Logic
Database Layer
Micro
Service
1
Customer
SE 8
UI Layer
Web Services
Business Logic
Database Layer
Micro
Service
3
ShoppingCart
UI Layer
Web Services
Business Logic
Database Layer
Micro
Service
2
Order
1
UI Layer
WS
BL
DL
Database
ShoppingCart
Order
Customer
Inventory
(C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA
10/8/2017
8
SOA vs. Micro Services Example
Traditional Monolithic App with SOA
Micro Services with Multiple Technology Stack
Event Stream
UI Layer
Web Services
Business Logic
Database Layer
Micro
Service
1
Customer
SE 8
UI Layer
Web Services
Business Logic
Database Layer
Micro
Service
3
ShoppingCart
UI Layer
Web Services
Business Logic
Database Layer
Micro
Service
2
Order
1
API Gateway
Load Balancer
Circuit Breaker
Service Discovery
Load Balancer
Circuit Breaker
Load Balancer
Circuit Breaker
UI Layer
Database
ShoppingCart
Order
Customer
Inventory
Enterprise Service
Bus
Messaging
REST / SOAP
HTTP
MOM
JMS
ODBC / JDBC
Translation
Web Services
XML
WSDL
Addressing
Security
Registry
Management
Producers
Shared
Database
Consumers3rd Party Apps
(C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA

Recommended for you

Microservice vs. Monolithic Architecture
Microservice vs. Monolithic ArchitectureMicroservice vs. Monolithic Architecture
Microservice vs. Monolithic Architecture

This presentation outlines the benefits of implementing a Microservice over a monolithic architecture.

Why Microservice
Why Microservice Why Microservice
Why Microservice

A proper Microservice is designed for fast failure. Like other architectural style, microservices bring costs and benefits. Some development teams have found microservices architectural style to be a superior approach to a monolithic architecture. Other teams have found them to be a productivity-sapping burden. This material start with the basic what and why microservice, follow with the Felix example and the the successful strategies to develop microservice application.

devopsagilemicroservice architect
Agile, User Stories, Domain Driven Design
Agile, User Stories, Domain Driven DesignAgile, User Stories, Domain Driven Design
Agile, User Stories, Domain Driven Design

Building Cloud-Native App Series - Part 1 of 11 Microservices Architecture Series Design Thinking, Lean Startup, Agile (Kanban, Scrum), User Stories, Domain-Driven Design

agilekanbanscrum
10/8/2017 9
App Scalability based
on micro services
architecture
Source: The NewStack. Based on the Art of Scalability by By Martin Abbot
& Michael Fisher
1
(C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA
Scale Cube and Micro Services
10/8/2017 (C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA 10
1. Functional
Decomposition
2. Avoid locks by
Database Sharding
3. Cloning Services
10/8/2017 11
Hexagonal Architecture
Ports & Adapters
The layer between the Adapter and
the Domain is identified as the Ports
layer. The Domain is inside the port,
adapters for external entities are on
the outside of the port.
The notion of a “port” invokes the
OS idea that any device that adheres
to a known protocol can be plugged
into a port. Similarly many adapters
may use the Ports.
Source : http://alistair.cockburn.us/Hexagonal+architecture
https://skillsmatter.com/skillscasts/5744-decoupling-from-asp-net-hexagonal-architectures-in-net
Services
for UI
Ports
File
system Database
Order Tracking
JPA Repository
Implementation
Adapters
OrderProcessing
Domain Service
(Business Rules)
Implementation
Domain
Models
Domain Layer
Order Data
Validation
OrderService
REST Service
Implementation
OrderProcessing
Interface
p
Order Tracking
Repository
Interface
p
A
A
External
Apps
A
A A
Others
A
A
OrderService
Interface
p
Web
Services
Data
Store
Use Case Boundary
Bounded Context
A
1
(C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA
10/8/2017 (C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA 12
• Domain Driven Design
• Understanding Requirement Analysis
• Bounded Context
• Context Map
• Aggregate Root
• Event Sourcing & CQRS
• CRUD
• ES and CQRS
• Event Sourcing Example
• Functional Reactive Programming
• 4 Building Blocks of RxJava
• Observable and Observer Design Pattern
• Comparison : Iterable / Streams / Observable
• Design Patterns : Let it Crash / SAGA
Design Styles2
It’s not necessary that
you need to use all
these patterns. You
will be using these
based on your
technical requirement

Recommended for you

Microservices Docker Kubernetes Istio Kanban DevOps SRE
Microservices Docker Kubernetes Istio Kanban DevOps SREMicroservices Docker Kubernetes Istio Kanban DevOps SRE
Microservices Docker Kubernetes Istio Kanban DevOps SRE

Introduction to Microservices Architecture, Docker, Kubernetes, Istio, Testing Strategies for Microservices based Apps. Security Best Practices. Kanban, DevOps, and SRE. Infrastructure Design Patterns - API Gateway - Service Discovery - Load Balancer - Circuit Breaker - Let-it-Crash Pattern Software Design Patterns - Hexagonal Architecture - Domain Driven Design - Event Sourcing and CQRS - Functional Reactive Programming

microserviceskubernetesdocker
Microservices Decomposition Patterns
Microservices Decomposition PatternsMicroservices Decomposition Patterns
Microservices Decomposition Patterns

Microservices Pattern Language Microservices Software Architecture Governance, Best Practices and Design Pattern Decomposition Patterns Decompose by Business Capability Decompose by Subdomain

decompositionmicroservices decomposition patternsbusiness capability
Building Event Driven (Micro)services with Apache Kafka
Building Event Driven (Micro)services with Apache KafkaBuilding Event Driven (Micro)services with Apache Kafka
Building Event Driven (Micro)services with Apache Kafka

What is a Microservices architecture and how does it differ from a Service-Oriented Architecture? Should you use traditional REST APIs to bind services together? Or is it better to use a richer, more loosely-coupled protocol? This talk will start with quick recap of how we created systems over the past 20 years and how different architectures evolved from it. The talk will show how we piece services together in event driven systems, how we use a distributed log (event hub) to create a central, persistent history of events and what benefits we achieve from doing so. Apache Kafka is a perfect match for building such an asynchronous, loosely-coupled event-driven backbone. Events trigger processing logic, which can be implemented in a more traditional as well as in a stream processing fashion. The talk will show the difference between a request-driven and event-driven communication and show when to use which. It highlights how the modern stream processing systems can be used to hold state both internally as well as in a database and how this state can be used to further increase independence of other services, the primary goal of a Microservices architecture.

kafkamicroservices
Domain Driven Design
10/8/2017
13
Source: Domain-Driven Design Reference by Eric Evans
2
(C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA
Understanding Requirement Analysis using DDD
08 October 2017 14
Ubiquitous
Language
Vocabulary
shared by all
involved parties
Used in all forms of
spoken / written
communication
Ubiquitous Language using BDD
As an insurance Broker
I want to know who my Gold Customers are
So that I sell more
Given Customer John Doe exists
When
he buys insurance ABC for
$1000 USD
Then He becomes a Gold Customer
2
(C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA
Understanding Requirement Analysis using DDD
08 October 2017 15
Bounded
Context
Areas of the
domain treated
independently
Discovered as you
assess requirements
and build language
2
(C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA
DDD : Understanding Bounded Context
08 October 2017
16
Source: BoundedContext By Martin Fowler :
http://martinfowler.com/bliki/BoundedContext.html
• DDD deals with large models by
dividing them into different
Bounded Contexts and being explicit
about their interrelationships.
• Bounded Contexts have both
unrelated concepts
• Such as a support ticket only
existing in a customer support
context
• But also share concepts such as
products and customers.
• Different contexts may have
completely different models of
common concepts with mechanisms
to map between these polysemic
concepts for integration.
2
(C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA

Recommended for you

Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices

This document summarizes an upcoming presentation on architecting microservices on AWS. The presentation will: - Review microservices architecture and how it differs from monolithic and service-oriented architectures. - Cover key microservices design principles like independent deployment of services that communicate via APIs and using the right tools for each job. - Provide example design patterns for implementing microservices on AWS using services like EC2, ECS, Lambda, API Gateway and more. - Include a demo of microservices on AWS. - Conclude with a question and answer session.

cloud computingkd-singhaws pop-up loft san francisco
Big Data Redis Mongodb Dynamodb Sharding
Big Data Redis Mongodb Dynamodb ShardingBig Data Redis Mongodb Dynamodb Sharding
Big Data Redis Mongodb Dynamodb Sharding

This document discusses Redis, MongoDB, and Amazon DynamoDB. It begins with an overview of NoSQL databases and the differences between SQL and NoSQL databases. It then covers Redis data types like strings, hashes, lists, sets, sorted sets, and streams. Examples use cases for Redis are also provided like leaderboards, geospatial queries, and message queues. The document also discusses MongoDB design patterns like embedding data, embracing duplication, and relationships. Finally, it provides a high-level overview of DynamoDB concepts like tables, items, attributes, and primary keys.

big dataredismongodb
Monoliths and Microservices
Monoliths and Microservices Monoliths and Microservices
Monoliths and Microservices

Should you choose a microservices architecture over a monolith? What are the pros and cons in reality.

microservicessoftware-architecture
DDD : Context Map
08October2017
17
Source: Domain-Driven Design Reference by Eric Evans
2
(C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA
Understanding Aggregate Root
18
Order
Customer
Shipping
Address
Aggregate
Root
Line Item
Line Item
Line Item
*
Payment
Strategy
Credit Card
Cash
Bank Transfer
Source: Martin Fowler : Aggregate Root
• An aggregate will have one of its component
objects be the aggregate root. Any references
from outside the aggregate should only go to the
aggregate root. The root can thus ensure the
integrity of the aggregate as a whole.
• Aggregates are the basic element of transfer of
data storage - you request to load or save whole
aggregates. Transactions should not cross
aggregate boundaries.
• Aggregates are sometimes confused with
collection classes (lists, maps, etc.).
• Aggregates are domain concepts (order, clinic visit,
playlist), while collections are generic. An
aggregate will often contain multiple collections,
together with simple fields.
125
Domain
Driven
Design
2
(C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA
Designing and Fine Tuning Aggregate Root
08October2017
19
Source : Effective Aggregate Design Part 1/2/3 : Vaughn Vernon
http://dddcommunity.org/wp-content/uploads/files/pdf_articles/Vernon_2011_1.pdf
Aggregate Root - #1 Aggregate Root - #2
Super Dense Single Aggregate Root
Results in Transaction concurrency issues.
Super Dense Aggregate Root is split into 4
different smaller Aggregate Root in the 2nd
Iteration.
Working on different design models helps the developers to come up with best
possible design.
2
(C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA
CRUD and CQRS
10/8/2017 20
Presentation
Services
Business Logic
Data Access
Data Store
UpdatesQueries
Traditional CRUD Architecture
Source: https://docs.microsoft.com/en-us/azure/architecture/patterns/cqrs
https://blogs.msdn.microsoft.com/maarten_mullender/2004/07/23/crud-only-when-you-can-afford-it-revisite
• A mismatch between the read and write
representations of the data.
• It risks data contention when records are locked in
the data store in a collaborative domain, where
multiple actors operate in parallel on the same set of
data. These risks increase as the complexity and
throughput of the system grows.
• It can make managing security and permissions
more complex because each entity is subject to both
read and write operations, which might expose data
in the wrong context.
CRUD Disadvantages
(C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA
2

Recommended for you

Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices

The document provides an overview of microservices architecture including: - Definitions and characteristics of microservices such as componentization via services, decentralized governance, and infrastructure automation. - Common drivers for adopting microservices like agility, safety, and scalability. - Guidelines for decomposing monolithic applications into microservices based on business capabilities and domain-driven design. - Discussion of differences between microservices and service-oriented architecture (SOA). - Ecosystem of tools involved in microservices including development frameworks, APIs, databases, containers, and service meshes. - Common design patterns and anti-patterns when developing microservices.

microservicessyntoucharchitecture
Microservices, Containers, Kubernetes, Kafka, Kanban
Microservices, Containers, Kubernetes, Kafka, KanbanMicroservices, Containers, Kubernetes, Kafka, Kanban
Microservices, Containers, Kubernetes, Kafka, Kanban

Understanding Microservices Architecture Understanding Docker, Kubernetes and Kafka Design Patterns - Domain Driven Design, Event Sourcing, and CQRS and Functional Reactive Programming, Distributed Computing and Saga Design Pattern Infrastructure Patterns: API Gateway, Service Discovery, Circuit Breaker, Service Mesh, Event Streams (Kafka). Microservices Testing Strategies Security Best Practices for Containers and Kubernetes,

microservicesdomain driven designdocker
Introduction to Serverless
Introduction to ServerlessIntroduction to Serverless
Introduction to Serverless

This document discusses serverless computing and AWS Lambda. It provides an overview of virtual machines, containers, and serverless/functions as a service. It describes how AWS Lambda works, including how to author functions using various programming languages. It also discusses how to integrate Lambda with other AWS services like API Gateway, Step Functions, S3, DynamoDB and more. It introduces the AWS Serverless Application Repository and AWS SAM for defining serverless applications.

rise2018developer workshopserverless
Event Sourcing & CQRS (Command and Query Responsibility Segregation)
• In traditional data management systems, both
commands (updates to the data) and queries
(requests for data) are executed against the same
set of entities in a single data repository.
• CQRS is a pattern that segregates the operations
that read data (Queries) from the operations that
update data (Commands) by using separate
interfaces.
• CQRS should only be used on specific portions of a
system in Bounded Context (in DDD).
• CQRS should be used along with Event Sourcing.
10/8/2017
(C)COPYRIGHTMETAMAGICGLOBALINC.,NEWJERSEY,USA
21
MSDN – Microsoft https://msdn.microsoft.com/en-us/library/dn568103.aspx |
Martin Fowler : CQRS – http://martinfowler.com/bliki/CQRS.html
CQS :
Bertrand Meyer
Axon
Framework
For Java
Java Axon Framework Resource : http://www.axonframework.org
Greg
Young
(C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA
2
Event Sourcing and CQRS Design Example
08 October 2017
22
Domain
The example focus on a concept of a Café which tracks the visit of an individual or group to the café. When people
arrive at the café and take a table, a tab is opened. They may then order drinks and food. Drinks are served
immediately by the table staff, however food must be cooked by a chef. Once the chef prepared the food it can then
be served.
Events
• TabOpened
• DrinksOrdered
• FoodOrdered
• DrinksCancelled
• FoodCancelled
• DrinksServed
• FoodPrepared
• FoodServed
• TabClosed
Commands
• OpenTab
• PlaceOrder
• AmendOrder
• MarkDrinksServed
• MarkFoodPrepared
• MarkFoodServed
• CloseTab
Exception
• CannotCancelServedItem
• TabHasUnservedItem
• MustPayEnough
Commands are things that indicate requests to
our domain. While an event states that
something certainly happened, a command may
be accepted or rejected.
An accepted command leads to zero or more
events being emitted to incorporate new facts
into the system. A rejected command leads to
some kind of exception.
An important part of the modeling process is
thinking about the things that can cause a
command to be refused.
Aggregates
• A Single Object, which doesn’t reference any
others.
• An isolated Graph of objects, with One object
designated as the Root of the Aggregate.
An Event Stream which is an
immutable collection of events up
until a specific version of an
aggregate.
The purpose of the version is to
implement optimistic locking:
Source:http://cqrs.nu/tutorial/cs/01-design
(C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA
2
Functional Reactive Programming
10/8/2017 23
ResilientElastic
Message – Driven
1. A responsive, maintainable &
Extensible application is the goal.
2. A responsive application is both
scalable (Elastic) and resilient.
3. Responsiveness is impossible to
achieve without both scalability and
resilience.
4. A Message-Driven architecture is the
foundation of scalable, resilient, and
ultimately responsive systems.
Value
Means
Form
Principles What it means?
Responsive thus React to users demand
Resilient thus React to errors and failures
Elastic thus React to load
Message-Driven thus React to events and messages
Source: http://reactivex.io/
Responsive Maintainable Extensible
(C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA
2
4 Building Blocks of RxJava
08 October 2017 24
Source of Data Stream [ Sender ]Observable
Listens for emitted values [ Receiver ]Observer
Client Server
Request
Response
Traditional Synchronous Pull
Communications
1. The Observer subscribes (listens) to the Observable
2. Observer react to what ever item or sequence of items the Observable emits.
3. Many Observers can subscribe to the same Observable
Observer Observableon Next
on Completed
on ErrorTime
Subscribes
Non Blocking
Time
1
2
Source: http://reactivex.io/
2
(C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA

Recommended for you

Microservices
MicroservicesMicroservices
Microservices

Microservices are an architectural style that structures an application as a collection of small, independent services that communicate with each other. Each service runs a unique process and focuses on doing a small job, such as user authentication or shopping cart functionality. The advantages of microservices include improved scalability, maintainability, and ability to upgrade parts of the system independently. However, adopting microservices also introduces additional operational complexity and communication overhead between services.

microervicesmicroervice
Introduction to Microservices Patterns
Introduction to Microservices PatternsIntroduction to Microservices Patterns
Introduction to Microservices Patterns

Introduction to Microservices Patterns. In these slides we explore microservices vs monolith apis. We try to identify the challenges of moving to microservices ecosystem and try to analyze possible solutions for data consistency, inter-communication, event driven and distributed transactions.

microservicessagasdata consistency
Microservices Architecture & Testing Strategies
Microservices Architecture & Testing StrategiesMicroservices Architecture & Testing Strategies
Microservices Architecture & Testing Strategies

1. Microservices architecture breaks down applications into small, independent services that focus on specific business capabilities. This allows services to be developed, deployed and scaled independently. 2. The key characteristics of microservices include being organized around business capabilities, independently deployable, using lightweight protocols and decentralized governance. 3. Microservices provide benefits like scalability, testability and flexibility to change technologies. However, they also add complexity and require new skills around distributed systems.

microservicesddddomain driven design
4 Building Blocks of RxJava
08 October 2017 25
Schedulers
Operators
Content Filtering
Time Filtering
Transformation
Schedulers are used to manage and control
concurrency.
1. observeOn: Thread Observable is executed
2. subscribeOn: Thread subscribe is executed
Operators that let you
Transform, Combine,
Manipulate, and work
with the sequence of
items emitted by
Observables
3
4
Source: http://reactivex.io/
2
(C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA
Observable Design Pattern (Marble Diagram)
08 October 2017
26
• An Observer subscribes to an Observable.
• Then that observer reacts to whatever item or sequence of items the
Observable emits.
1
Building
Block
Source: http://reactivex.io/RxJava/javadoc/index.html?rx/Observable.html | http://rxmarbles.com
2
(C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA
Observable / Observer Design Pattern
08 October 2017 27
• Allows for Concurrent Operations: the
observer does not need to block while
waiting for the observable to emit values
• Observer waits to receive values when
the observable is ready to emit them
• Based on push rather than pull
1 & 2Building Block
Source: http://reactivex.io/RxJava/javadoc/index.html?rx/Observable.html
2
(C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA
What’s missing from GOF Observer Pattern
08 October 2017
28
1
Building Block
Source:http://reactivex.io/intro.html
1. The ability for the producer to signal to the consumer that
there is no more data available (a foreach loop on an
Iterable completes and returns normally in such a case; an
Observable calls its observer’s onCompleted method)
2. The ability for the producer to signal to the consumer that
an error has occurred (an Iterable throws an exception if
an error takes place during iteration; an Observable calls
its observer’s onError method)
3. Multiple Thread Implementations and hiding those details.
4. Dozens of Operators to handle data.
2
(C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA

Recommended for you

MicroServices-Part-1.pdf
MicroServices-Part-1.pdfMicroServices-Part-1.pdf
MicroServices-Part-1.pdf

The document discusses microservices architecture and related concepts: 1. It compares monolithic and microservices architecture, noting that microservices are organized around business capabilities rather than projects, with each service having its own code pipeline and deployment. 2. Communication between microservices is achieved through message-based communication, with each service focusing on a specific business capability within a bounded context. 3. The document outlines some of the benefits of microservices including that they are robust, scalable, testable, and allow for independent deployment of services. It also notes some challenges like added complexity, skillset requirements, and the need for teams to manage full lifecycles of their services.

DEEPAK_Ver1.3
DEEPAK_Ver1.3DEEPAK_Ver1.3
DEEPAK_Ver1.3

This document is a resume for Deepak.C.G that summarizes his experience leading software development teams and implementing full software development life cycles. It lists his technical skills in languages like C#, ASP.NET and databases like SQL Server. It also provides details on his work history and educational background.

1213532535.pdf
1213532535.pdf1213532535.pdf
1213532535.pdf

This document discusses the W3C's vision for the Web of Things (WoT) and their efforts to standardize it. The WoT aims to make IoT development easier by treating "things" as resources that can be discovered and controlled via web APIs and scripts. The W3C is developing standards for thing descriptions, scripting APIs, and security to allow interoperability across platforms and reduce data silos. Their goal is for the WoT to fuel an open market of IoT applications and services in the same way the web has for software.

Compare Iterable Vs. Observable
08 October 2017
29
Observable is the asynchronous / push
dual to the synchronous pull Iterable
• Composable: Easily chained together
or combined
• Flexible: Can be used to emit:
• A scalar value (network result)
• Sequence (items in a list)
• Infinite streams (weather sensor)
• Free from callback hell: Easy to
transform one asynchronous stream
into another
Observables are:
Event
Iterable
(Pull)
Observable
(Push)
Retrieve Data T next() onNext(T)
Discover Error
throws
Exception
onError
(Exception)
Complete !hasNext() onComplete()
1Building Block
Source: http://reactivex.io/RxJava/javadoc/index.html?rx/Observable.html
2
(C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA
Comparison : Iterable / Streams / Observable
08 October 2017 30
1Building Block
First Class Visitor (Consumer)
Serial Operations
Parallel Streams (10x Speed)
Still On Next, On Complete and
On Error are Serial Operations
Completely Asynchronous
Operations
Java 8 – Blocking CallJava 6 – Blocking Call Rx Java - Freedom
2
(C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA
Observer<T> Contract
08 October 2017 31
Methods:
• onNext(T)
• onError(Throwable T)
• onCompleted()
onError / onCompleted called exactly once
2Building Block
Source: http://reactivex.io/RxJava/javadoc/index.html?rx/Observable.html
X
|
Time Line
2
(C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA
RxJava Scheduler Details
08 October 2017 32
Source: http://reactivex.io/documentation/scheduler.html
• If you want to introduce multithreading into your cascade of Observable
operators, you can do so by instructing those operators (or particular
Observables) to operate on particular Schedulers.
• By default, an Observable and the chain of operators that you apply to
it will do its work, and will notify its observers, on the same thread on
which its Subscribe method is called.
• The SubscribeOn operator changes this behavior by specifying a
different Scheduler on which the Observable should operate.
TheObserveOn operator specifies a different Scheduler that the
Observable will use to send notifications to its observers.
3Building Block
2
(C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA

Recommended for you

Mark Simpson - UKOUG23 - Refactoring Monolithic Oracle Database Applications ...
Mark Simpson - UKOUG23 - Refactoring Monolithic Oracle Database Applications ...Mark Simpson - UKOUG23 - Refactoring Monolithic Oracle Database Applications ...
Mark Simpson - UKOUG23 - Refactoring Monolithic Oracle Database Applications ...

Organisations are adopting microservices to keep pace with business innovation; whilst needing to meet the resilience, scalability and security requirements critical for digital solutions. Enterprise relational DBs are often a barrier to this transformation, but they needn’t be. This presentation delves into the challenges faced by enterprises during digital transformation and modernization initiatives which are often hamstrung by the inherent monolithic nature of enterprise databases. Many Oracle data-centric applications consist of an intricate web of hundreds of tables, housing hundreds of thousands of lines of PL/SQL code executed within the database via packaged procedures. These relational databases have enabled us to safely and securely manage structured data for several decades, but over time they grow more complex and harder to maintain, slowing down delivery and seriously degrading application performance, business innovation all but grinds to a halt. Given the impracticality and cost associated with complete rewrites, many organisations are turning to Microservices Architecture, to extract value from existing assets whilst gradually deconstructing the monolithic architecture to facilitate evolutionary changes. This presentation outlines a systematic and phased approach, based on experience from multiple client initiatives, highlighting the crucial role of this transformation in enabling the creation of APIs that drive new business initiatives. The concept of domain separation, a pivotal element in the migration process, will be introduced, along with options to move certain data retrieval and processing to more appropriate architectures

apiarchitectureazure
Cloud Customer Architecture for Big Data and Analytics V2.0
Cloud Customer Architecture for Big Data and Analytics V2.0Cloud Customer Architecture for Big Data and Analytics V2.0
Cloud Customer Architecture for Big Data and Analytics V2.0

Webinar presented live on August 8, 2017 The CSCC has published version 2.0 of Cloud Customer Architecture for Big Data & Analytics – a reference architecture that describes elements and components needed to support big data and analytics solutions using cloud computing. Version 2.0 of the architecture includes support for new use cases and cognitive computing. Big data analytics (BDA) and cloud computing are a top priority for CIOs. As cloud computing and big data technologies converge, they offer a cost-effective delivery model for cloud-based analytics. Many companies are experimenting with different cloud configurations to understand and refine requirements for their big data analytics solutions. This webinar will cover: - Business reasons to adopt cloud computing for big data and analytics capabilities - An architectural overview of a big data analytics solution in a cloud environment with a description of the capabilities offered by cloud providers - Proven architecture patterns that have been deployed in successful enterprise BDA projects The presentation draws from the CSCC's deliverable, Cloud Customer Architecture for Big Data and Analytics V2.0 http://www.cloud-council.org/deliverables/cloud-customer-architecture-for-big-data-and-analytics.htm Download the presentation deck here: http://www.cloud-council.org/webinars/cloud-customer-architecture-for-big-data-and-analytics-v2.htm

csccanalyticsbig data
Microservices Patterns with GoldenGate
Microservices Patterns with GoldenGateMicroservices Patterns with GoldenGate
Microservices Patterns with GoldenGate

Deep-dive into Microservices Patterns with Replication and Stream Analytics Target Audience: Microservices and Data Architects This is an informational presentation about microservices event patterns, GoldenGate event replication, and event stream processing with Oracle Stream Analytics. This session will discuss some of the challenges of working with data in a microservices architecture (MA), and how the emerging concept of a “Data Mesh” can go hand-in-hand to improve microservices-based data management patterns. You may have already heard about common microservices patterns like CQRS, Saga, Event Sourcing and Transaction Outbox; we’ll share how GoldenGate can simplify these patterns while also bringing stronger data consistency to your microservice integrations. We will also discuss how complex event processing (CEP) and stream processing can be used with event-driven MA for operational and analytical use cases. Business pressures for modernization and digital transformation drive demand for rapid, flexible DevOps, which microservices address, but also for data-driven Analytics, Machine Learning and Data Lakes which is where data management tech really shines. Join us for this presentation where we take a deep look at the intersection of microservice design patterns and modern data integration tech.

microservicesstreaming big datagoldengate
08 October 2017 33
Functional Reactive Programming : Design Patterns
Single
Component Pattern
A Component shall do ONLY one thing,
But do it in FULL.
Single Responsibility Principle By DeMarco : Structured
Analysis & System Specification (Yourdon, New York, 1979)
Let-It-Crash
Pattern
Prefer a FULL component restart to
complex internal failure handling.
Candea & Fox: Crash-Only Software (USENIX HotOS IX, 2003)
Popularized by Netflix Chaos Monkey. Erlang Philosophy
Saga
Pattern
Divide long-lived distributed
transactions into quick local ones with
compensating actions for recovery.
Pet Helland: Life Beyond Distributed Transactions CIDR 2007
(C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA
2
10/8/2017 (C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA 34
• CAP Theorem
• Distributed Transactions : 2 Phase Commit
• SAGA Design Pattern
• Scalability Lessons from EBay
• Design Patterns
• References
Scalability3
CAP Theorem
by Eric Allen Brewer
08October2017
35
Pick Any 2!!
Say NO to 2 Phase Commit 
Source: http://en.wikipedia.org/wiki/Eric_Brewer_(scientist)
CAP 12 years later: How the “Rules have changed” : http://www.infoq.com/articles/cap-twelve-years-later-how-the-rules-have-changed
“In a network subject to communication failures, it is impossible for any web service to implement an atomic read / write shared
memory that guarantees a response to every request.”
3
Distributed Transactions : 2 Phase Commit
2 PC or not 2 PC, Wherefore Art Thou XA?
08October2017
36
How does 2PC impact scalability?
• Transactions are committed in two phases.
• This involves communicating with every database (XA
Resources) involved to determine if the transaction will commit
in the first phase.
• During the second phase each database is asked to complete
the commit.
• While all of this coordination is going on, locks in all of the data
sources are being held.
• The longer duration locks create the risk of higher contention.
• Additionally, the two phases require more database
processing time than a single phase commit.
• The result is lower overall TPS in the system.
Transaction
Manager
XA Resources
Request to Prepare
Commit
Prepared
Prepare
Phase
Commit
PhaseDone
Source : Pat Helland (Amazon) : Life Beyond Distributed Transactions Distributed Computing : http://dancres.github.io/Pages/
Solution : Resilient System
• Event Based
• Design for failure
• Asynchronous Recovery
• Make all operations idempotent.
• Each DB operation is a 1 PC
3
(C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA

Recommended for you

Ashish tripath
Ashish tripathAshish tripath
Ashish tripath

This document provides a summary of Ashish Kumar Tripathi's work experience and qualifications. It summarizes that he has 7.7 years of experience working in IT projects using technologies like ASP.NET, C#, SQL Server. It lists 13 projects he has worked on, including developing banking and CRM applications. It also provides his education qualifications and details of the programming languages and technologies he has experience in.

Learning activity 4
Learning activity 4Learning activity 4
Learning activity 4

The document discusses component-based development as an approach for information systems development. It provides background on the increasing complexity of software development and the search for new engineering techniques to address business needs. Component-based development breaks down systems into reusable software components that can be assembled to meet specific requirements. Major companies and industry consortia have proposed standards for component software, including OMG/CORBA, Microsoft COM, Sun JavaBeans, and Common Object Request Broker Architecture (CORBA).

Vancouver Microservices Meetup - Kickoff Session
Vancouver Microservices Meetup - Kickoff SessionVancouver Microservices Meetup - Kickoff Session
Vancouver Microservices Meetup - Kickoff Session

This document summarizes an agenda for the first Vancouver Microservices Meetup on June 15, 2017. The agenda includes welcome and introductions, a talk by Matt McLarty of CA Technologies on "The Microservices Way", and a talk by Mike Sample of Hootsuite on microservices at Hootsuite. An open discussion period will follow the presentations.

microservices api software agile devops
SAGA Design Pattern instead of 2PC
10/8/2017 37
Long Lived Transactions (LLTs) hold on to DB resources for relatively long periods of time, significantly delaying
the termination of shorter and more common transactions.
Source: SAGAS (1987) Hector Garcia Molina / Kenneth
Salem, Dept. of Computer Science, Princeton
University, NJ, USA
T1 T2 Tn
Local Transactions
C1 C2 Cn-1
Compensating Transaction
Divide long–lived, distributed transactions into quick local ones with compensating actions for
recovery.
3
Reserve Room
Ticket Payment
Reserve Seat
Flight Ticket & Hotel Booking Example
Room Payment
Rollback Seat Booking
Rollback Room Booking
Rollback Ticket Payment
BASE (Basic Availability, Soft
State, Eventual Consistency)
(C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA
Scalability Best Practices : Lessons from
Best Practices Highlights
#1 Partition By Function
• Decouple the Unrelated Functionalities.
• Selling functionality is served by one set of applications, bidding by another, search by yet another.
• 16,000 App Servers in 220 different pools
• 1000 logical databases, 400 physical hosts
#2 Split Horizontally
• Break the workload into manageable units.
• eBay’s interactions are stateless by design
• All App Servers are treated equal and none retains any transactional state
• Data Partitioning based on specific requirements
#3
Avoid Distributed
Transactions
• 2 Phase Commit is a pessimistic approach comes with a big COST
• CAP Theorem (Consistency, Availability, Partition Tolerance). Apply any two at any point in time.
• @ eBay No Distributed Transactions of any kind and NO 2 Phase Commit.
#4
Decouple Functions
Asynchronously
• If Component A calls component B synchronously, then they are tightly coupled. For such systems to
scale A you need to scale B also.
• If Asynchronous A can move forward irrespective of the state of B
• SEDA (Staged Event Driven Architecture)
#5
Move Processing to
Asynchronous Flow
• Move as much processing towards Asynchronous side
• Anything that can wait should wait
#6 Virtualize at All Levels • Virtualize everything. eBay created their on O/R layer for abstraction
#7 Cache Appropriately • Cache Slow changing, read-mostly data, meta data, configuration and static data.
08October2017
38
Source:http://www.infoq.com/articles/ebay-scalability-best-practices
3
(C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA
Summary
10/8/2017 39
1. High Scalable & Resilient
Architecture
2. Technology Agnostic
3. Easy to Deploy
4. SAGA for Distributed
Transaction
5. Faster Go To Market
In a Micro Service Architecture,
The services tend to get
simpler, but the architecture
tends to get more complex.
That complexity is often
managed with Tooling,
Automation, and Process.
(C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA
10/8/2017 40
Design Patterns are
solutions to general
problems that
software developers
faced during software
development.
Design Patterns3
(C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA

Recommended for you

Cloud Customer Architecture for Big Data and Analytics
Cloud Customer Architecture for Big Data and AnalyticsCloud Customer Architecture for Big Data and Analytics
Cloud Customer Architecture for Big Data and Analytics

Webinar presentation July 23, 2015. Big data technology increases the amount and variety of data that can be processed by analytics, providing a foundation for visualizations and insights that can significantly improve business operations. The CSCC deliverable, Cloud Customer Architecture for Big Data and Analytics, discusses how harnessing cloud architectures can drastically improve big data and analytics capabilities. The paper explains how to host analytics solutions on the cloud. Download the deliverable: http://www.cloud-council.org/resource-hub

cloud computingbig dataanalytics
Data Services and the Modern Data Ecosystem (ASEAN)
Data Services and the Modern Data Ecosystem (ASEAN)Data Services and the Modern Data Ecosystem (ASEAN)
Data Services and the Modern Data Ecosystem (ASEAN)

Watch full webinar here: https://bit.ly/2YdstdU Digital Transformation has changed IT the way information services are delivered. The pace of business engagement, the rise of Digital IT (formerly known as “Shadow IT), has also increased demands on IT, especially in the area of Data Management. Data Services exploits widely adopted interoperability standards, providing a strong framework for information exchange but also has enabled growth of robust systems of engagement that can now exploit information that was normally locked away in some internal silo with Data Virtualization. We will discuss how a business can easily support and manage a Data Service platform, providing a more flexible approach for information sharing supporting an ever-diverse community of consumers. Watch this on-demand webinar as we cover: - Why Data Services are a critical part of a modern data ecosystem - How IT teams can manage Data Services and the increasing demand by businesses - How Digital IT can benefit from Data Services and how this can support the need for rapid prototyping allowing businesses to experiment with data and fail fast where necessary - How a good Data Virtualization platform can encourage a culture of Data amongst business consumers (internally and externally)

data servicesdata virtualizationdigital transformation
PaaS Lessons: Cisco IT Deploys OpenShift to Meet Developer Demand
PaaS Lessons: Cisco IT Deploys OpenShift to Meet Developer DemandPaaS Lessons: Cisco IT Deploys OpenShift to Meet Developer Demand
PaaS Lessons: Cisco IT Deploys OpenShift to Meet Developer Demand

Cisco IT added OpenShift by Red Hat to its technology mix to rapidly expose development staff to a rich set of web-scale application frameworks and runtimes. Deploying Platform-as-a-Service (PaaS) architectures, like OpenShift, bring with it: - A Focus on the Developer Experience - Container Technology - Network Security and User Isolation - Acceleration of DevOps Models without Negatively Impacting Business In this session, Cisco and Red Hat will take you through: - The problems Cisco set out to solve with PaaS. - How OpenShift aligned with their needs. - Key lessons learned during the process. Business & IT Strategy Alignment: This track targets the juncture of business and IT considerations necessary to create competitive advantage. Example topics include: new architecture deployments, competitive differentiators, long-term and hidden costs, and security. Attendees will learn how to align architecture and technology decisions with their specific business needs and how and when IT departments can provide competitive advantage.

cisco on ciscociscopaas
References
10/8/2017 41
1. Lewis, James, and Martin Fowler. “Microservices: A Definition of This New Architectural Term”, March 25, 2014.
2. Miller, Matt. “Innovate or Die: The Rise of Microservices”. e Wall Street Journal, October 5, 2015.
3. Newman, Sam. Building Microservices. O’Reilly Media, 2015.
4. Alagarasan, Vijay. “Seven Microservices Anti-patterns”, August 24, 2015.
5. Cockcroft, Adrian. “State of the Art in Microservices”, December 4, 2014.
6. Fowler, Martin. “Microservice Prerequisites”, August 28, 2014.
7. Fowler, Martin. “Microservice Tradeoffs”, July 1, 2015.
8. Humble, Jez. “Four Principles of Low-Risk Software Release”, February 16, 2012.
9. Zuul Edge Server, Ketan Gote, May 22, 2017
10. Ribbon, Hysterix using Spring Feign, Ketan Gote, May 22, 2017
11. Eureka Server with Spring Cloud, Ketan Gote, May 22, 2017
12. Apache Kafka, A Distributed Streaming Platform, Ketan Gote, May 20, 2017
13. Functional Reactive Programming, Araf Karsh Hamid, August 7, 2016
14. Enterprise Software Architectures, Araf Karsh Hamid, July 30, 2016
15. Docker and Linux Containers, Araf Karsh Hamid, April 28, 2015
3
References
10/8/2017 (C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA 42
Domain Driven Design
16. Oct 27, 2012 What I have learned about DDD Since the book. By Eric Evans
17. Mar 19, 2013 Domain Driven Design By Eric Evans
18. May 16, 2015 Microsoft Ignite: Domain Driven Design for the Database Driven Mind
19. Jun 02, 2015 Applied DDD in Java EE 7 and Open Source World
20. Aug 23, 2016 Domain Driven Design the Good Parts By Jimmy Bogard
21. Sep 22, 2016 GOTO 2015 – DDD & REST Domain Driven API’s for the Web. By Oliver Gierke
22. Jan 24, 2017 Spring Developer – Developing Micro Services with Aggregates. By Chris Richardson
23. May 17. 2017 DEVOXX – The Art of Discovering Bounded Contexts. By Nick Tune
Event Sourcing and CQRS
23. Nov 13, 2014 GOTO 2014 – Event Sourcing. By Greg Young
24. Mar 22, 2016 Spring Developer – Building Micro Services with Event Sourcing and CQRS
25. Apr 15, 2016 YOW! Nights – Event Sourcing. By Martin Fowler
26. May 08, 2017 When Micro Services Meet Event Sourcing. By Vinicius Gomes
References
10/8/2017 43
27. MSDN – Microsoft https://msdn.microsoft.com/en-us/library/dn568103.aspx
28. Martin Fowler : CQRS – http://martinfowler.com/bliki/CQRS.html
29. Udi Dahan : CQRS – http://www.udidahan.com/2009/12/09/clarified-cqrs/
30. Greg Young : CQRS - https://www.youtube.com/watch?v=JHGkaShoyNs
31. Bertrand Meyer – CQS - http://en.wikipedia.org/wiki/Bertrand_Meyer
32. CQS : http://en.wikipedia.org/wiki/Command–query_separation
33. CAP Theorem : http://en.wikipedia.org/wiki/CAP_theorem
34. CAP Theorem : http://www.julianbrowne.com/article/viewer/brewers-cap-theorem
35. CAP 12 years how the rules have changed
36. EBay Scalability Best Practices : http://www.infoq.com/articles/ebay-scalability-best-practices
37. Pat Helland (Amazon) : Life beyond distributed transactions
38. Stanford University: Rx https://www.youtube.com/watch?v=y9xudo3C1Cw
39. Princeton University: SAGAS (1987) Hector Garcia Molina / Kenneth Salem
40. Rx Observable : https://dzone.com/articles/using-rx-java-observable
3
References – Micro Services – Videos
41. Martin Fowler – Micro Services : https://www.youtube.com/watch?v=2yko4TbC8cI&feature=youtu.be&t=15m53s
42. GOTO 2016 – Microservices at NetFlix Scale: Principles, Tradeoffs & Lessons Learned. By R Meshenberg
43. Mastering Chaos – A NetFlix Guide to Microservices. By Josh Evans
44. GOTO 2015 – Challenges Implementing Micro Services By Fred George
45. GOTO 2016 – From Monolith to Microservices at Zalando. By Rodrigue Scaefer
46. GOTO 2015 – Microservices @ Spotify. By Kevin Goldsmith
47. Modelling Microservices @ Spotify : https://www.youtube.com/watch?v=7XDA044tl8k
48. GOTO 2015 – DDD & Microservices: At last, Some Boundaries By Eric Evans
49. GOTO 2016 – What I wish I had known before Scaling Uber to 1000 Services. By Matt Ranney
50. DDD Europe – Tackling Complexity in the Heart of Software By Eric Evans, April 11, 2016
51. AWS re:Invent 2016 – From Monolithic to Microservices: Evolving Architecture Patterns. By Emerson L, Gilt D. Chiles
52. AWS 2017 – An overview of designing Microservices based Applications on AWS. By Peter Dalbhanjan
53. GOTO Jun, 2017 – Effective Microservices in a Data Centric World. By Randy Shoup.
54. GOTO July, 2017 – The Seven (more) Deadly Sins of Microservices. By Daniel Bryant
55. Sept, 2017 – Airbnb, From Monolith to Microservices: How to scale your Architecture. By Melanie Cubula
56. GOTO Sept, 2017 – Rethinking Microservices with Stateful Streams. By Ben Stopford.
57. GOTO 2017 – Microservices without Servers. By Glynn Bird.
10/8/2017 44
3

Recommended for you

Choosing the Right Technologies A Guide to Frameworks and Tools for Web App D...
Choosing the Right Technologies A Guide to Frameworks and Tools for Web App D...Choosing the Right Technologies A Guide to Frameworks and Tools for Web App D...
Choosing the Right Technologies A Guide to Frameworks and Tools for Web App D...

Frameworks play a pivotal role in streamlining development workflows and ensuring scalability and maintainability of web applications. One of the most popular choices is React.js, known for its component-based architecture and virtual DOM, facilitating efficient rendering and updating of user interfaces. AngularJS is another prominent framework, offering robust features for building dynamic single-page applications. Meanwhile, Vue.js has gained traction for its simplicity and flexibility, making it ideal for projects of varying complexities.

CAST Architecture Checker
CAST Architecture CheckerCAST Architecture Checker
CAST Architecture Checker

Analyzing the structural quality of complex, multi-tier, multi-technology applications is monstrous task yet crucially to ensure systems don't fail. Enterprise architects need a reliable, automated solution to enforce architectures the ensure efficiency and stability of business critical applications.

 
by CAST
software compliancestatic analysiscode analysis
Technology Overview
Technology OverviewTechnology Overview
Technology Overview

The document discusses several technology topics including: 1. SOA and its benefits such as facilitating interoperability and promoting technology reuse. 2. Cloud computing and common questions around it such as what cloud computing is, how many clouds there will be, and what's new in cloud computing. 3. An example scenario of a company called FredsList gradually adopting more cloud capabilities for their listings website, from basic storage to search, photos, analytics and performance optimization.

silverlightwpfwcf
10/8/2017 45
Thank you
Araf Karsh Hamid : Co-Founder / CTO
araf.karsh@metamagic.in
USA: +1 (973) 969-2921
India: +91.999.545.8627
Skype / LinkedIn / Twitter / Slideshare : arafkarsh
http://www.slideshare.net/arafkarsh
https://www.linkedin.com/in/arafkarsh/
http://www.slideshare.net/arafkarsh/software-architecture-styles-64537120
http://www.slideshare.net/arafkarsh/function-point-analysis-65711721
http://www.slideshare.net/arafkarsh/functional-reactive-programming-64780160
UI
Design
Patterns
10/8/2017 (C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA 46
UI DesignPatterns
MVC/ MVP/ MVVM
47
View
Controller
Model
Passes
calls To
Fire
Events
Manipulates
• The Controller is responsible to process incoming
requests. It receives input from users via the View,
then process the user's data with the help of Model
and passing the results back to the View.
• Typically, it acts as the coordinator between the
View and the Model.
• The Presenter is responsible for handling all UI events on
behalf of the view. This receive input from users via the
View, then process the user's data with the help of Model
and passing the results back to the View.
• Unlike view and controller, view and presenter are
completely decoupled from each other’s and
communicate to each other’s by an interface. Also,
presenter does not manage the incoming request traffic as
controller.
• Supports two-way data binding between View and
ViewModel.
View
ViewModel
Model
Passes
calls To
Manipulates
Updates
Fire
Events
• The View Model is responsible for exposing methods,
commands, and other properties that helps to maintain
the state of the view, manipulate the model as the
result of actions on the view, and trigger events in the
view itself.
• There is many-to-one relationship between View and
ViewModel means many View can be mapped to one
ViewModel.
• Supports two-way data binding between View and
ViewModel.
View
Presenter
Model
Passes
calls To
Fire
Events
Manipulates
Updates1
1
1
*
Model
View
Controller
Model
View
Presenter
Model
View
ViewModel
UI Design Patterns
Flux / Redux
ViewDispatcher
Every action is sent to all Stores via callbacks the
stores register with the Dispatcher
Store
Action
Action
1 *
Controller-Views
• Listens to Store changes
• Emit Actions to Dispatcher
Dispatcher
• Single Dispatcher per Application
• Manages the Data Flow View to Model
• Receives Actions and dispatch them to Stores
Stores
• Contains state for a Domain (Vs. Specific Component)
• In Charge of modifying the Data
• Inform the views when the Data is changed by emitting the
Changed Event.
Flux Core Concepts
1. One way Data Flow
2. No Event Chaining
3. Entire App State is resolved in store before Views Update
4. Data Manipulation ONLY happen in one place (Store).
Actions
• Simple JS Objects
• Contains Name of the Action and Data (Payload)
• Action represent something that has happened.
• Has No Business Logic
(C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA

Recommended for you

Microservices: Where do they fit within a rapidly evolving integration archit...
Microservices: Where do they fit within a rapidly evolving integration archit...Microservices: Where do they fit within a rapidly evolving integration archit...
Microservices: Where do they fit within a rapidly evolving integration archit...

Do microservices force us to look differently at the way we lay down and evolve our integration architecture, or are they purely about how we build applications? Are microservices a new concept, or an evolution of the many ideas that came before them? What is the relationship between microservices and other key initiatives such as APIs, SOA, and Agile. In this session, we will unpick what microservices really are, and indeed what they are not. We will consider whether there is something unique about this particular point time in technology that has enables microservice concepts to take hold. Finally, we will look at if, when, where and how an enterprise can take on the benefits of microservices, and what products and technologies are applicable for that journey.

microservicesarchitectureintegration
Maulik-Dusara-SSE-TL-Net
Maulik-Dusara-SSE-TL-NetMaulik-Dusara-SSE-TL-Net
Maulik-Dusara-SSE-TL-Net

This document contains a summary of Maulik Dusara's skills and experience. He has over 13 years of experience as a senior software engineer and team leader with expertise in .NET, databases like SQL Server, and object-oriented design. He has successfully led teams on projects involving web and desktop applications for various clients across different industries.

CAST Imaging: Map & Master Your Software
CAST Imaging: Map & Master Your SoftwareCAST Imaging: Map & Master Your Software
CAST Imaging: Map & Master Your Software

près de 60% de leur temps à essayer de comprendre comment fonctionnent les applications sur lesquelles ils travaillent ? CAST Imaging est un logiciel de Software Intelligence qui produit automatiquement la documentation/base de connaissances techniques de n’importe quelle application. Celle-ci prend la forme de blueprints interactifs – dont les données sont stockées dans Neo4j – qui cartographient en détail tous les éléments d’une application et toutes leurs dépendances. Peu importe qu’ils soient en train de développer, maintenir, moderniser ou simplement monter en compétence, les utilisateurs de CAST Imaging trouvent en quelques minutes les réponses aux questions qu’ils se posent sur le fonctionnement de l’application, sans passer des heures à fouiller dans le code !

graph databaseneo4j
UI Design Patterns Redux
Actions
• Simple JS Objects
• Contains Name of the
Action and Data
(Payload)
• Has NO Business Logic
• Action represent
something that has
happened.
Store
• Multiple View layers can Subscribe
• View layer to Dispatch actions
• Single Store for the Entire Application
• Data manipulation logic moves out of
store to Reducers
Reducer
• Pure JS Functions
• No External calls
• Can combine multiple reducers
• A function that specifies how the state changes in response to an Action.
• Reducer does NOT modify the state. It returns the NEW State.
Redux Core Concepts
1. One way Data Flow
2. No Dispatcher compared to Flux
3. Immutable Store
Available for React & Angular
View
Action
State
Dispatcher
Reducer
R R
R
Store
Middleware
Middleware
Middleware
• Handles External calls
• Multiple Middleware's can be chained.
(C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA

More Related Content

What's hot

Microservices Design Patterns Explained | Edureka
Microservices Design Patterns Explained | EdurekaMicroservices Design Patterns Explained | Edureka
Microservices Design Patterns Explained | Edureka
Edureka!
 
Architecture: Microservices
Architecture: MicroservicesArchitecture: Microservices
Architecture: Microservices
Amazon Web Services
 
Microservices Part 3 Service Mesh and Kafka
Microservices Part 3 Service Mesh and KafkaMicroservices Part 3 Service Mesh and Kafka
Microservices Part 3 Service Mesh and Kafka
Araf Karsh Hamid
 
Microservices
MicroservicesMicroservices
Microservices
SmartBear
 
Introduction to microservices
Introduction to microservicesIntroduction to microservices
Introduction to microservices
Paulo Gandra de Sousa
 
Design patterns for microservice architecture
Design patterns for microservice architectureDesign patterns for microservice architecture
Design patterns for microservice architecture
The Software House
 
Microservice vs. Monolithic Architecture
Microservice vs. Monolithic ArchitectureMicroservice vs. Monolithic Architecture
Microservice vs. Monolithic Architecture
Paul Mooney
 
Why Microservice
Why Microservice Why Microservice
Why Microservice
Kelvin Yeung
 
Agile, User Stories, Domain Driven Design
Agile, User Stories, Domain Driven DesignAgile, User Stories, Domain Driven Design
Agile, User Stories, Domain Driven Design
Araf Karsh Hamid
 
Microservices Docker Kubernetes Istio Kanban DevOps SRE
Microservices Docker Kubernetes Istio Kanban DevOps SREMicroservices Docker Kubernetes Istio Kanban DevOps SRE
Microservices Docker Kubernetes Istio Kanban DevOps SRE
Araf Karsh Hamid
 
Microservices Decomposition Patterns
Microservices Decomposition PatternsMicroservices Decomposition Patterns
Microservices Decomposition Patterns
Firmansyah, SCJP, OCEWCD, OCEWSD, TOGAF, OCMJEA, CEH
 
Building Event Driven (Micro)services with Apache Kafka
Building Event Driven (Micro)services with Apache KafkaBuilding Event Driven (Micro)services with Apache Kafka
Building Event Driven (Micro)services with Apache Kafka
Guido Schmutz
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
Amazon Web Services
 
Big Data Redis Mongodb Dynamodb Sharding
Big Data Redis Mongodb Dynamodb ShardingBig Data Redis Mongodb Dynamodb Sharding
Big Data Redis Mongodb Dynamodb Sharding
Araf Karsh Hamid
 
Monoliths and Microservices
Monoliths and Microservices Monoliths and Microservices
Monoliths and Microservices
Bozhidar Bozhanov
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
Roger van de Kimmenade
 
Microservices, Containers, Kubernetes, Kafka, Kanban
Microservices, Containers, Kubernetes, Kafka, KanbanMicroservices, Containers, Kubernetes, Kafka, Kanban
Microservices, Containers, Kubernetes, Kafka, Kanban
Araf Karsh Hamid
 
Introduction to Serverless
Introduction to ServerlessIntroduction to Serverless
Introduction to Serverless
Amazon Web Services
 
Microservices
MicroservicesMicroservices
Microservices
Stephan Lindauer
 
Introduction to Microservices Patterns
Introduction to Microservices PatternsIntroduction to Microservices Patterns
Introduction to Microservices Patterns
Dimosthenis Botsaris
 

What's hot (20)

Microservices Design Patterns Explained | Edureka
Microservices Design Patterns Explained | EdurekaMicroservices Design Patterns Explained | Edureka
Microservices Design Patterns Explained | Edureka
 
Architecture: Microservices
Architecture: MicroservicesArchitecture: Microservices
Architecture: Microservices
 
Microservices Part 3 Service Mesh and Kafka
Microservices Part 3 Service Mesh and KafkaMicroservices Part 3 Service Mesh and Kafka
Microservices Part 3 Service Mesh and Kafka
 
Microservices
MicroservicesMicroservices
Microservices
 
Introduction to microservices
Introduction to microservicesIntroduction to microservices
Introduction to microservices
 
Design patterns for microservice architecture
Design patterns for microservice architectureDesign patterns for microservice architecture
Design patterns for microservice architecture
 
Microservice vs. Monolithic Architecture
Microservice vs. Monolithic ArchitectureMicroservice vs. Monolithic Architecture
Microservice vs. Monolithic Architecture
 
Why Microservice
Why Microservice Why Microservice
Why Microservice
 
Agile, User Stories, Domain Driven Design
Agile, User Stories, Domain Driven DesignAgile, User Stories, Domain Driven Design
Agile, User Stories, Domain Driven Design
 
Microservices Docker Kubernetes Istio Kanban DevOps SRE
Microservices Docker Kubernetes Istio Kanban DevOps SREMicroservices Docker Kubernetes Istio Kanban DevOps SRE
Microservices Docker Kubernetes Istio Kanban DevOps SRE
 
Microservices Decomposition Patterns
Microservices Decomposition PatternsMicroservices Decomposition Patterns
Microservices Decomposition Patterns
 
Building Event Driven (Micro)services with Apache Kafka
Building Event Driven (Micro)services with Apache KafkaBuilding Event Driven (Micro)services with Apache Kafka
Building Event Driven (Micro)services with Apache Kafka
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
 
Big Data Redis Mongodb Dynamodb Sharding
Big Data Redis Mongodb Dynamodb ShardingBig Data Redis Mongodb Dynamodb Sharding
Big Data Redis Mongodb Dynamodb Sharding
 
Monoliths and Microservices
Monoliths and Microservices Monoliths and Microservices
Monoliths and Microservices
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
 
Microservices, Containers, Kubernetes, Kafka, Kanban
Microservices, Containers, Kubernetes, Kafka, KanbanMicroservices, Containers, Kubernetes, Kafka, Kanban
Microservices, Containers, Kubernetes, Kafka, Kanban
 
Introduction to Serverless
Introduction to ServerlessIntroduction to Serverless
Introduction to Serverless
 
Microservices
MicroservicesMicroservices
Microservices
 
Introduction to Microservices Patterns
Introduction to Microservices PatternsIntroduction to Microservices Patterns
Introduction to Microservices Patterns
 

Similar to Micro services Architecture

Microservices Architecture & Testing Strategies
Microservices Architecture & Testing StrategiesMicroservices Architecture & Testing Strategies
Microservices Architecture & Testing Strategies
Araf Karsh Hamid
 
MicroServices-Part-1.pdf
MicroServices-Part-1.pdfMicroServices-Part-1.pdf
MicroServices-Part-1.pdf
chanhluc2112
 
DEEPAK_Ver1.3
DEEPAK_Ver1.3DEEPAK_Ver1.3
DEEPAK_Ver1.3
Deepak CG
 
1213532535.pdf
1213532535.pdf1213532535.pdf
1213532535.pdf
SayantanMajhi2
 
Mark Simpson - UKOUG23 - Refactoring Monolithic Oracle Database Applications ...
Mark Simpson - UKOUG23 - Refactoring Monolithic Oracle Database Applications ...Mark Simpson - UKOUG23 - Refactoring Monolithic Oracle Database Applications ...
Mark Simpson - UKOUG23 - Refactoring Monolithic Oracle Database Applications ...
marksimpsongw
 
Cloud Customer Architecture for Big Data and Analytics V2.0
Cloud Customer Architecture for Big Data and Analytics V2.0Cloud Customer Architecture for Big Data and Analytics V2.0
Cloud Customer Architecture for Big Data and Analytics V2.0
Cloud Standards Customer Council
 
Microservices Patterns with GoldenGate
Microservices Patterns with GoldenGateMicroservices Patterns with GoldenGate
Microservices Patterns with GoldenGate
Jeffrey T. Pollock
 
Ashish tripath
Ashish tripathAshish tripath
Ashish tripath
Ashish Tripathi
 
Learning activity 4
Learning activity 4Learning activity 4
Learning activity 4
Aileen Banaguas
 
Vancouver Microservices Meetup - Kickoff Session
Vancouver Microservices Meetup - Kickoff SessionVancouver Microservices Meetup - Kickoff Session
Vancouver Microservices Meetup - Kickoff Session
Matt McLarty
 
Cloud Customer Architecture for Big Data and Analytics
Cloud Customer Architecture for Big Data and AnalyticsCloud Customer Architecture for Big Data and Analytics
Cloud Customer Architecture for Big Data and Analytics
Cloud Standards Customer Council
 
Data Services and the Modern Data Ecosystem (ASEAN)
Data Services and the Modern Data Ecosystem (ASEAN)Data Services and the Modern Data Ecosystem (ASEAN)
Data Services and the Modern Data Ecosystem (ASEAN)
Denodo
 
PaaS Lessons: Cisco IT Deploys OpenShift to Meet Developer Demand
PaaS Lessons: Cisco IT Deploys OpenShift to Meet Developer DemandPaaS Lessons: Cisco IT Deploys OpenShift to Meet Developer Demand
PaaS Lessons: Cisco IT Deploys OpenShift to Meet Developer Demand
Cisco IT
 
Choosing the Right Technologies A Guide to Frameworks and Tools for Web App D...
Choosing the Right Technologies A Guide to Frameworks and Tools for Web App D...Choosing the Right Technologies A Guide to Frameworks and Tools for Web App D...
Choosing the Right Technologies A Guide to Frameworks and Tools for Web App D...
BitCot
 
CAST Architecture Checker
CAST Architecture CheckerCAST Architecture Checker
CAST Architecture Checker
CAST
 
Technology Overview
Technology OverviewTechnology Overview
Technology Overview
Liran Zelkha
 
Microservices: Where do they fit within a rapidly evolving integration archit...
Microservices: Where do they fit within a rapidly evolving integration archit...Microservices: Where do they fit within a rapidly evolving integration archit...
Microservices: Where do they fit within a rapidly evolving integration archit...
Kim Clark
 
Maulik-Dusara-SSE-TL-Net
Maulik-Dusara-SSE-TL-NetMaulik-Dusara-SSE-TL-Net
Maulik-Dusara-SSE-TL-Net
Maulik Dusara
 
CAST Imaging: Map & Master Your Software
CAST Imaging: Map & Master Your SoftwareCAST Imaging: Map & Master Your Software
CAST Imaging: Map & Master Your Software
Neo4j
 
ALT-F1 Techtalk 3 - Google AppEngine
ALT-F1 Techtalk 3 - Google AppEngineALT-F1 Techtalk 3 - Google AppEngine
ALT-F1 Techtalk 3 - Google AppEngine
Abdelkrim Boujraf
 

Similar to Micro services Architecture (20)

Microservices Architecture & Testing Strategies
Microservices Architecture & Testing StrategiesMicroservices Architecture & Testing Strategies
Microservices Architecture & Testing Strategies
 
MicroServices-Part-1.pdf
MicroServices-Part-1.pdfMicroServices-Part-1.pdf
MicroServices-Part-1.pdf
 
DEEPAK_Ver1.3
DEEPAK_Ver1.3DEEPAK_Ver1.3
DEEPAK_Ver1.3
 
1213532535.pdf
1213532535.pdf1213532535.pdf
1213532535.pdf
 
Mark Simpson - UKOUG23 - Refactoring Monolithic Oracle Database Applications ...
Mark Simpson - UKOUG23 - Refactoring Monolithic Oracle Database Applications ...Mark Simpson - UKOUG23 - Refactoring Monolithic Oracle Database Applications ...
Mark Simpson - UKOUG23 - Refactoring Monolithic Oracle Database Applications ...
 
Cloud Customer Architecture for Big Data and Analytics V2.0
Cloud Customer Architecture for Big Data and Analytics V2.0Cloud Customer Architecture for Big Data and Analytics V2.0
Cloud Customer Architecture for Big Data and Analytics V2.0
 
Microservices Patterns with GoldenGate
Microservices Patterns with GoldenGateMicroservices Patterns with GoldenGate
Microservices Patterns with GoldenGate
 
Ashish tripath
Ashish tripathAshish tripath
Ashish tripath
 
Learning activity 4
Learning activity 4Learning activity 4
Learning activity 4
 
Vancouver Microservices Meetup - Kickoff Session
Vancouver Microservices Meetup - Kickoff SessionVancouver Microservices Meetup - Kickoff Session
Vancouver Microservices Meetup - Kickoff Session
 
Cloud Customer Architecture for Big Data and Analytics
Cloud Customer Architecture for Big Data and AnalyticsCloud Customer Architecture for Big Data and Analytics
Cloud Customer Architecture for Big Data and Analytics
 
Data Services and the Modern Data Ecosystem (ASEAN)
Data Services and the Modern Data Ecosystem (ASEAN)Data Services and the Modern Data Ecosystem (ASEAN)
Data Services and the Modern Data Ecosystem (ASEAN)
 
PaaS Lessons: Cisco IT Deploys OpenShift to Meet Developer Demand
PaaS Lessons: Cisco IT Deploys OpenShift to Meet Developer DemandPaaS Lessons: Cisco IT Deploys OpenShift to Meet Developer Demand
PaaS Lessons: Cisco IT Deploys OpenShift to Meet Developer Demand
 
Choosing the Right Technologies A Guide to Frameworks and Tools for Web App D...
Choosing the Right Technologies A Guide to Frameworks and Tools for Web App D...Choosing the Right Technologies A Guide to Frameworks and Tools for Web App D...
Choosing the Right Technologies A Guide to Frameworks and Tools for Web App D...
 
CAST Architecture Checker
CAST Architecture CheckerCAST Architecture Checker
CAST Architecture Checker
 
Technology Overview
Technology OverviewTechnology Overview
Technology Overview
 
Microservices: Where do they fit within a rapidly evolving integration archit...
Microservices: Where do they fit within a rapidly evolving integration archit...Microservices: Where do they fit within a rapidly evolving integration archit...
Microservices: Where do they fit within a rapidly evolving integration archit...
 
Maulik-Dusara-SSE-TL-Net
Maulik-Dusara-SSE-TL-NetMaulik-Dusara-SSE-TL-Net
Maulik-Dusara-SSE-TL-Net
 
CAST Imaging: Map & Master Your Software
CAST Imaging: Map & Master Your SoftwareCAST Imaging: Map & Master Your Software
CAST Imaging: Map & Master Your Software
 
ALT-F1 Techtalk 3 - Google AppEngine
ALT-F1 Techtalk 3 - Google AppEngineALT-F1 Techtalk 3 - Google AppEngine
ALT-F1 Techtalk 3 - Google AppEngine
 

More from Araf Karsh Hamid

Elastic-Engineering
Elastic-EngineeringElastic-Engineering
Elastic-Engineering
Araf Karsh Hamid
 
Zero-Trust SASE DevSecOps
Zero-Trust SASE DevSecOpsZero-Trust SASE DevSecOps
Zero-Trust SASE DevSecOps
Araf Karsh Hamid
 
Service Mesh - Observability
Service Mesh - ObservabilityService Mesh - Observability
Service Mesh - Observability
Araf Karsh Hamid
 
Microservices, DevOps & SRE
Microservices, DevOps & SREMicroservices, DevOps & SRE
Microservices, DevOps & SRE
Araf Karsh Hamid
 
CI-CD Jenkins, GitHub Actions, Tekton
CI-CD Jenkins, GitHub Actions, Tekton CI-CD Jenkins, GitHub Actions, Tekton
CI-CD Jenkins, GitHub Actions, Tekton
Araf Karsh Hamid
 
Cloud Architecture - Multi Cloud, Edge, On-Premise
Cloud Architecture - Multi Cloud, Edge, On-PremiseCloud Architecture - Multi Cloud, Edge, On-Premise
Cloud Architecture - Multi Cloud, Edge, On-Premise
Araf Karsh Hamid
 
Containers Docker Kind Kubernetes Istio
Containers Docker Kind Kubernetes IstioContainers Docker Kind Kubernetes Istio
Containers Docker Kind Kubernetes Istio
Araf Karsh Hamid
 
Microservices Testing Strategies JUnit Cucumber Mockito Pact
Microservices Testing Strategies JUnit Cucumber Mockito PactMicroservices Testing Strategies JUnit Cucumber Mockito Pact
Microservices Testing Strategies JUnit Cucumber Mockito Pact
Araf Karsh Hamid
 
Microservices Architecture, Monolith Migration Patterns
Microservices Architecture, Monolith Migration PatternsMicroservices Architecture, Monolith Migration Patterns
Microservices Architecture, Monolith Migration Patterns
Araf Karsh Hamid
 
Apache Flink, AWS Kinesis, Analytics
Apache Flink, AWS Kinesis, Analytics Apache Flink, AWS Kinesis, Analytics
Apache Flink, AWS Kinesis, Analytics
Araf Karsh Hamid
 
Domain Driven Design
Domain Driven Design Domain Driven Design
Domain Driven Design
Araf Karsh Hamid
 
Docker Kubernetes Istio
Docker Kubernetes IstioDocker Kubernetes Istio
Docker Kubernetes Istio
Araf Karsh Hamid
 
Blockchain HyperLedger Fabric Internals - Clavent
Blockchain HyperLedger Fabric Internals - ClaventBlockchain HyperLedger Fabric Internals - Clavent
Blockchain HyperLedger Fabric Internals - Clavent
Araf Karsh Hamid
 
Blockchain Intro to Hyperledger Fabric
Blockchain Intro to Hyperledger Fabric Blockchain Intro to Hyperledger Fabric
Blockchain Intro to Hyperledger Fabric
Araf Karsh Hamid
 
Docker Kubernetes Istio
Docker Kubernetes IstioDocker Kubernetes Istio
Docker Kubernetes Istio
Araf Karsh Hamid
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
Araf Karsh Hamid
 
Microservices Part 4: Functional Reactive Programming
Microservices Part 4: Functional Reactive ProgrammingMicroservices Part 4: Functional Reactive Programming
Microservices Part 4: Functional Reactive Programming
Araf Karsh Hamid
 
Blockchain Hyper Ledger Fabric : Bangkok Conference
Blockchain Hyper Ledger Fabric : Bangkok ConferenceBlockchain Hyper Ledger Fabric : Bangkok Conference
Blockchain Hyper Ledger Fabric : Bangkok Conference
Araf Karsh Hamid
 
Blockchain - HyperLedger Fabric
Blockchain - HyperLedger FabricBlockchain - HyperLedger Fabric
Blockchain - HyperLedger Fabric
Araf Karsh Hamid
 

More from Araf Karsh Hamid (19)

Elastic-Engineering
Elastic-EngineeringElastic-Engineering
Elastic-Engineering
 
Zero-Trust SASE DevSecOps
Zero-Trust SASE DevSecOpsZero-Trust SASE DevSecOps
Zero-Trust SASE DevSecOps
 
Service Mesh - Observability
Service Mesh - ObservabilityService Mesh - Observability
Service Mesh - Observability
 
Microservices, DevOps & SRE
Microservices, DevOps & SREMicroservices, DevOps & SRE
Microservices, DevOps & SRE
 
CI-CD Jenkins, GitHub Actions, Tekton
CI-CD Jenkins, GitHub Actions, Tekton CI-CD Jenkins, GitHub Actions, Tekton
CI-CD Jenkins, GitHub Actions, Tekton
 
Cloud Architecture - Multi Cloud, Edge, On-Premise
Cloud Architecture - Multi Cloud, Edge, On-PremiseCloud Architecture - Multi Cloud, Edge, On-Premise
Cloud Architecture - Multi Cloud, Edge, On-Premise
 
Containers Docker Kind Kubernetes Istio
Containers Docker Kind Kubernetes IstioContainers Docker Kind Kubernetes Istio
Containers Docker Kind Kubernetes Istio
 
Microservices Testing Strategies JUnit Cucumber Mockito Pact
Microservices Testing Strategies JUnit Cucumber Mockito PactMicroservices Testing Strategies JUnit Cucumber Mockito Pact
Microservices Testing Strategies JUnit Cucumber Mockito Pact
 
Microservices Architecture, Monolith Migration Patterns
Microservices Architecture, Monolith Migration PatternsMicroservices Architecture, Monolith Migration Patterns
Microservices Architecture, Monolith Migration Patterns
 
Apache Flink, AWS Kinesis, Analytics
Apache Flink, AWS Kinesis, Analytics Apache Flink, AWS Kinesis, Analytics
Apache Flink, AWS Kinesis, Analytics
 
Domain Driven Design
Domain Driven Design Domain Driven Design
Domain Driven Design
 
Docker Kubernetes Istio
Docker Kubernetes IstioDocker Kubernetes Istio
Docker Kubernetes Istio
 
Blockchain HyperLedger Fabric Internals - Clavent
Blockchain HyperLedger Fabric Internals - ClaventBlockchain HyperLedger Fabric Internals - Clavent
Blockchain HyperLedger Fabric Internals - Clavent
 
Blockchain Intro to Hyperledger Fabric
Blockchain Intro to Hyperledger Fabric Blockchain Intro to Hyperledger Fabric
Blockchain Intro to Hyperledger Fabric
 
Docker Kubernetes Istio
Docker Kubernetes IstioDocker Kubernetes Istio
Docker Kubernetes Istio
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
Microservices Part 4: Functional Reactive Programming
Microservices Part 4: Functional Reactive ProgrammingMicroservices Part 4: Functional Reactive Programming
Microservices Part 4: Functional Reactive Programming
 
Blockchain Hyper Ledger Fabric : Bangkok Conference
Blockchain Hyper Ledger Fabric : Bangkok ConferenceBlockchain Hyper Ledger Fabric : Bangkok Conference
Blockchain Hyper Ledger Fabric : Bangkok Conference
 
Blockchain - HyperLedger Fabric
Blockchain - HyperLedger FabricBlockchain - HyperLedger Fabric
Blockchain - HyperLedger Fabric
 

Recently uploaded

INDIAN AIR FORCE FIGHTER PLANES LIST.pdf
INDIAN AIR FORCE FIGHTER PLANES LIST.pdfINDIAN AIR FORCE FIGHTER PLANES LIST.pdf
INDIAN AIR FORCE FIGHTER PLANES LIST.pdf
jackson110191
 
How Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdfHow Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdf
HackersList
 
UiPath Community Day Kraków: Devs4Devs Conference
UiPath Community Day Kraków: Devs4Devs ConferenceUiPath Community Day Kraków: Devs4Devs Conference
UiPath Community Day Kraków: Devs4Devs Conference
UiPathCommunity
 
DealBook of Ukraine: 2024 edition
DealBook of Ukraine: 2024 editionDealBook of Ukraine: 2024 edition
DealBook of Ukraine: 2024 edition
Yevgen Sysoyev
 
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-InTrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc
 
Best Practices for Effectively Running dbt in Airflow.pdf
Best Practices for Effectively Running dbt in Airflow.pdfBest Practices for Effectively Running dbt in Airflow.pdf
Best Practices for Effectively Running dbt in Airflow.pdf
Tatiana Al-Chueyr
 
Password Rotation in 2024 is still Relevant
Password Rotation in 2024 is still RelevantPassword Rotation in 2024 is still Relevant
Password Rotation in 2024 is still Relevant
Bert Blevins
 
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdfBT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
Neo4j
 
Choose our Linux Web Hosting for a seamless and successful online presence
Choose our Linux Web Hosting for a seamless and successful online presenceChoose our Linux Web Hosting for a seamless and successful online presence
Choose our Linux Web Hosting for a seamless and successful online presence
rajancomputerfbd
 
How to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptxHow to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptx
Adam Dunkels
 
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Chris Swan
 
Coordinate Systems in FME 101 - Webinar Slides
Coordinate Systems in FME 101 - Webinar SlidesCoordinate Systems in FME 101 - Webinar Slides
Coordinate Systems in FME 101 - Webinar Slides
Safe Software
 
20240704 QFM023 Engineering Leadership Reading List June 2024
20240704 QFM023 Engineering Leadership Reading List June 202420240704 QFM023 Engineering Leadership Reading List June 2024
20240704 QFM023 Engineering Leadership Reading List June 2024
Matthew Sinclair
 
What’s New in Teams Calling, Meetings and Devices May 2024
What’s New in Teams Calling, Meetings and Devices May 2024What’s New in Teams Calling, Meetings and Devices May 2024
What’s New in Teams Calling, Meetings and Devices May 2024
Stephanie Beckett
 
7 Most Powerful Solar Storms in the History of Earth.pdf
7 Most Powerful Solar Storms in the History of Earth.pdf7 Most Powerful Solar Storms in the History of Earth.pdf
7 Most Powerful Solar Storms in the History of Earth.pdf
Enterprise Wired
 
Transcript: Details of description part II: Describing images in practice - T...
Transcript: Details of description part II: Describing images in practice - T...Transcript: Details of description part II: Describing images in practice - T...
Transcript: Details of description part II: Describing images in practice - T...
BookNet Canada
 
Quality Patents: Patents That Stand the Test of Time
Quality Patents: Patents That Stand the Test of TimeQuality Patents: Patents That Stand the Test of Time
Quality Patents: Patents That Stand the Test of Time
Aurora Consulting
 
find out more about the role of autonomous vehicles in facing global challenges
find out more about the role of autonomous vehicles in facing global challengesfind out more about the role of autonomous vehicles in facing global challenges
find out more about the role of autonomous vehicles in facing global challenges
huseindihon
 
20240702 Présentation Plateforme GenAI.pdf
20240702 Présentation Plateforme GenAI.pdf20240702 Présentation Plateforme GenAI.pdf
20240702 Présentation Plateforme GenAI.pdf
Sally Laouacheria
 
Mitigating the Impact of State Management in Cloud Stream Processing Systems
Mitigating the Impact of State Management in Cloud Stream Processing SystemsMitigating the Impact of State Management in Cloud Stream Processing Systems
Mitigating the Impact of State Management in Cloud Stream Processing Systems
ScyllaDB
 

Recently uploaded (20)

INDIAN AIR FORCE FIGHTER PLANES LIST.pdf
INDIAN AIR FORCE FIGHTER PLANES LIST.pdfINDIAN AIR FORCE FIGHTER PLANES LIST.pdf
INDIAN AIR FORCE FIGHTER PLANES LIST.pdf
 
How Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdfHow Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdf
 
UiPath Community Day Kraków: Devs4Devs Conference
UiPath Community Day Kraków: Devs4Devs ConferenceUiPath Community Day Kraków: Devs4Devs Conference
UiPath Community Day Kraków: Devs4Devs Conference
 
DealBook of Ukraine: 2024 edition
DealBook of Ukraine: 2024 editionDealBook of Ukraine: 2024 edition
DealBook of Ukraine: 2024 edition
 
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-InTrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
 
Best Practices for Effectively Running dbt in Airflow.pdf
Best Practices for Effectively Running dbt in Airflow.pdfBest Practices for Effectively Running dbt in Airflow.pdf
Best Practices for Effectively Running dbt in Airflow.pdf
 
Password Rotation in 2024 is still Relevant
Password Rotation in 2024 is still RelevantPassword Rotation in 2024 is still Relevant
Password Rotation in 2024 is still Relevant
 
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdfBT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
 
Choose our Linux Web Hosting for a seamless and successful online presence
Choose our Linux Web Hosting for a seamless and successful online presenceChoose our Linux Web Hosting for a seamless and successful online presence
Choose our Linux Web Hosting for a seamless and successful online presence
 
How to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptxHow to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptx
 
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
 
Coordinate Systems in FME 101 - Webinar Slides
Coordinate Systems in FME 101 - Webinar SlidesCoordinate Systems in FME 101 - Webinar Slides
Coordinate Systems in FME 101 - Webinar Slides
 
20240704 QFM023 Engineering Leadership Reading List June 2024
20240704 QFM023 Engineering Leadership Reading List June 202420240704 QFM023 Engineering Leadership Reading List June 2024
20240704 QFM023 Engineering Leadership Reading List June 2024
 
What’s New in Teams Calling, Meetings and Devices May 2024
What’s New in Teams Calling, Meetings and Devices May 2024What’s New in Teams Calling, Meetings and Devices May 2024
What’s New in Teams Calling, Meetings and Devices May 2024
 
7 Most Powerful Solar Storms in the History of Earth.pdf
7 Most Powerful Solar Storms in the History of Earth.pdf7 Most Powerful Solar Storms in the History of Earth.pdf
7 Most Powerful Solar Storms in the History of Earth.pdf
 
Transcript: Details of description part II: Describing images in practice - T...
Transcript: Details of description part II: Describing images in practice - T...Transcript: Details of description part II: Describing images in practice - T...
Transcript: Details of description part II: Describing images in practice - T...
 
Quality Patents: Patents That Stand the Test of Time
Quality Patents: Patents That Stand the Test of TimeQuality Patents: Patents That Stand the Test of Time
Quality Patents: Patents That Stand the Test of Time
 
find out more about the role of autonomous vehicles in facing global challenges
find out more about the role of autonomous vehicles in facing global challengesfind out more about the role of autonomous vehicles in facing global challenges
find out more about the role of autonomous vehicles in facing global challenges
 
20240702 Présentation Plateforme GenAI.pdf
20240702 Présentation Plateforme GenAI.pdf20240702 Présentation Plateforme GenAI.pdf
20240702 Présentation Plateforme GenAI.pdf
 
Mitigating the Impact of State Management in Cloud Stream Processing Systems
Mitigating the Impact of State Management in Cloud Stream Processing SystemsMitigating the Impact of State Management in Cloud Stream Processing Systems
Mitigating the Impact of State Management in Cloud Stream Processing Systems
 

Micro services Architecture

  • 1. Micro Services Architecture CSI – IT2020, IIT Mumbai, October 6th 2017 Computer Society of India, Mumbai Chapter Araf Karsh Hamid : Co-Founder & CTO, MetaMagic Global Inc., NJ, USA Twitter / Skype / LinkedIn : arafkarsh Email : araf.karsh@metamagic.in A Micro Service will have its own Code Pipeline for build and deployment functionalities and it’s scope will be defined by the Bounded Context focusing on the Business Capabilities and the interoperability between Micro Services will be achieved using message based communication.
  • 2. Pioneers in Microservices Implementation 10/8/2017 (C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA 2 New Entrants
  • 3. Agenda 10/8/2017 3 • Pros and Cons • Micro Services Characteristics • Monolithic Vs. Micro Services Architecture • SOA Vs. Micro Services Architecture • App Scalability Based on Micro Services • Hexagonal Architecture Architecture Styles1 • Domain Driven Design • Event Sourcing & CQRS • Functional Reactive Programming Design Styles2 • CAP Theorem • Distributed Transactions : 2 Phase Commit • SAGA Design Pattern • Scalability Lessons from EBay • Design Patterns • References Scalability3 (C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA
  • 4. Pros 1. Adds Complexity 2. Skillset shortage 3. Confusion on getting the right size 4. Team need to manage end-to-end of the Service (From UI to Backend to Running in Production). 10/8/2017 4 1. Robust 2. Scalable 3. Testable (Local) 4. Easy to Change and Replace 5. Easy to Deploy 6. Technology Agnostic Cons Pros and Cons1 (C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA
  • 5. Micro Services Characteristics 5 1 By James Lewis and Martin Fowler We can scale our operation independently, maintain unparalleled system availability, and introduce new services quickly without the need for massive reconfiguration. — Werner Vogels, CTO, Amazon Web Services Modularity ... is to a technological economy what the division of labor is to a manufacturing one. W. Brian Arthur, author of e Nature of Technology The key in making great and growable systems is much more to design how its modules communicate rather than what their internal properties and behaviors should be. Alan Kay, 1998 email to the Squeak-dev list (C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA Components via Services Organized around Business Capabilities Products NOT Projects Smart Endpoints & Dumb Pipes Decentralized Governance & Data Management Infrastructure Automation Design for Failure Evolutionary Design
  • 6. Micro Services System Design Model Service (Micro) Process & Tools CultureOrganization Solution (Macro) 10/8/2017 6 Service: Focuses on a specific Business Capability Process & Tools: Development, Code Deployment, Maintenance and Product Management Culture: A Shared set of values, beliefs by everyone. Ubiquitous Language in DDD is an important aspect of Culture. Organization: Structure, Direction of Authority, Granularity, Composition of Teams. Solution: Coordinate all inputs and outputs of multiple services. Macro level view of the system allows the designer to focus more on desirable system behavior. 1 (C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA The very first step of a service design process is to design the process itself. Marc Stickdorn, author of This is Service Design Thinking
  • 7. 10/8/20177 Monolithic vs. Micro Services Example Traditional Monolithic App using Single Technology Stack Micro Services with Multiple Technology Stack Existing aPaaS vendors creates Monolithic Apps. This 3 tier model is obsolete now. Source: Gartner Market Guide for Application Platforms Nov 23, 2016 Event Stream API Gateway (Zuul Edge Server) Load Balancer (Ribbon) Circuit Breaker (Hysterix) Service Discovery (Eureka) Load Balancer (Ribbon) Circuit Breaker (Hysterix) Load Balancer (Ribbon) Circuit Breaker (Hysterix) UI Layer Web Services Business Logic Database Layer Micro Service 4 EE 7 Inventory UI Layer Web Services Business Logic Database Layer Micro Service 1 Customer SE 8 UI Layer Web Services Business Logic Database Layer Micro Service 3 ShoppingCart UI Layer Web Services Business Logic Database Layer Micro Service 2 Order 1 UI Layer WS BL DL Database ShoppingCart Order Customer Inventory (C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA
  • 8. 10/8/2017 8 SOA vs. Micro Services Example Traditional Monolithic App with SOA Micro Services with Multiple Technology Stack Event Stream UI Layer Web Services Business Logic Database Layer Micro Service 1 Customer SE 8 UI Layer Web Services Business Logic Database Layer Micro Service 3 ShoppingCart UI Layer Web Services Business Logic Database Layer Micro Service 2 Order 1 API Gateway Load Balancer Circuit Breaker Service Discovery Load Balancer Circuit Breaker Load Balancer Circuit Breaker UI Layer Database ShoppingCart Order Customer Inventory Enterprise Service Bus Messaging REST / SOAP HTTP MOM JMS ODBC / JDBC Translation Web Services XML WSDL Addressing Security Registry Management Producers Shared Database Consumers3rd Party Apps (C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA
  • 9. 10/8/2017 9 App Scalability based on micro services architecture Source: The NewStack. Based on the Art of Scalability by By Martin Abbot & Michael Fisher 1 (C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA
  • 10. Scale Cube and Micro Services 10/8/2017 (C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA 10 1. Functional Decomposition 2. Avoid locks by Database Sharding 3. Cloning Services
  • 11. 10/8/2017 11 Hexagonal Architecture Ports & Adapters The layer between the Adapter and the Domain is identified as the Ports layer. The Domain is inside the port, adapters for external entities are on the outside of the port. The notion of a “port” invokes the OS idea that any device that adheres to a known protocol can be plugged into a port. Similarly many adapters may use the Ports. Source : http://alistair.cockburn.us/Hexagonal+architecture https://skillsmatter.com/skillscasts/5744-decoupling-from-asp-net-hexagonal-architectures-in-net Services for UI Ports File system Database Order Tracking JPA Repository Implementation Adapters OrderProcessing Domain Service (Business Rules) Implementation Domain Models Domain Layer Order Data Validation OrderService REST Service Implementation OrderProcessing Interface p Order Tracking Repository Interface p A A External Apps A A A Others A A OrderService Interface p Web Services Data Store Use Case Boundary Bounded Context A 1 (C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA
  • 12. 10/8/2017 (C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA 12 • Domain Driven Design • Understanding Requirement Analysis • Bounded Context • Context Map • Aggregate Root • Event Sourcing & CQRS • CRUD • ES and CQRS • Event Sourcing Example • Functional Reactive Programming • 4 Building Blocks of RxJava • Observable and Observer Design Pattern • Comparison : Iterable / Streams / Observable • Design Patterns : Let it Crash / SAGA Design Styles2 It’s not necessary that you need to use all these patterns. You will be using these based on your technical requirement
  • 13. Domain Driven Design 10/8/2017 13 Source: Domain-Driven Design Reference by Eric Evans 2 (C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA
  • 14. Understanding Requirement Analysis using DDD 08 October 2017 14 Ubiquitous Language Vocabulary shared by all involved parties Used in all forms of spoken / written communication Ubiquitous Language using BDD As an insurance Broker I want to know who my Gold Customers are So that I sell more Given Customer John Doe exists When he buys insurance ABC for $1000 USD Then He becomes a Gold Customer 2 (C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA
  • 15. Understanding Requirement Analysis using DDD 08 October 2017 15 Bounded Context Areas of the domain treated independently Discovered as you assess requirements and build language 2 (C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA
  • 16. DDD : Understanding Bounded Context 08 October 2017 16 Source: BoundedContext By Martin Fowler : http://martinfowler.com/bliki/BoundedContext.html • DDD deals with large models by dividing them into different Bounded Contexts and being explicit about their interrelationships. • Bounded Contexts have both unrelated concepts • Such as a support ticket only existing in a customer support context • But also share concepts such as products and customers. • Different contexts may have completely different models of common concepts with mechanisms to map between these polysemic concepts for integration. 2 (C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA
  • 17. DDD : Context Map 08October2017 17 Source: Domain-Driven Design Reference by Eric Evans 2 (C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA
  • 18. Understanding Aggregate Root 18 Order Customer Shipping Address Aggregate Root Line Item Line Item Line Item * Payment Strategy Credit Card Cash Bank Transfer Source: Martin Fowler : Aggregate Root • An aggregate will have one of its component objects be the aggregate root. Any references from outside the aggregate should only go to the aggregate root. The root can thus ensure the integrity of the aggregate as a whole. • Aggregates are the basic element of transfer of data storage - you request to load or save whole aggregates. Transactions should not cross aggregate boundaries. • Aggregates are sometimes confused with collection classes (lists, maps, etc.). • Aggregates are domain concepts (order, clinic visit, playlist), while collections are generic. An aggregate will often contain multiple collections, together with simple fields. 125 Domain Driven Design 2 (C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA
  • 19. Designing and Fine Tuning Aggregate Root 08October2017 19 Source : Effective Aggregate Design Part 1/2/3 : Vaughn Vernon http://dddcommunity.org/wp-content/uploads/files/pdf_articles/Vernon_2011_1.pdf Aggregate Root - #1 Aggregate Root - #2 Super Dense Single Aggregate Root Results in Transaction concurrency issues. Super Dense Aggregate Root is split into 4 different smaller Aggregate Root in the 2nd Iteration. Working on different design models helps the developers to come up with best possible design. 2 (C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA
  • 20. CRUD and CQRS 10/8/2017 20 Presentation Services Business Logic Data Access Data Store UpdatesQueries Traditional CRUD Architecture Source: https://docs.microsoft.com/en-us/azure/architecture/patterns/cqrs https://blogs.msdn.microsoft.com/maarten_mullender/2004/07/23/crud-only-when-you-can-afford-it-revisite • A mismatch between the read and write representations of the data. • It risks data contention when records are locked in the data store in a collaborative domain, where multiple actors operate in parallel on the same set of data. These risks increase as the complexity and throughput of the system grows. • It can make managing security and permissions more complex because each entity is subject to both read and write operations, which might expose data in the wrong context. CRUD Disadvantages (C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA 2
  • 21. Event Sourcing & CQRS (Command and Query Responsibility Segregation) • In traditional data management systems, both commands (updates to the data) and queries (requests for data) are executed against the same set of entities in a single data repository. • CQRS is a pattern that segregates the operations that read data (Queries) from the operations that update data (Commands) by using separate interfaces. • CQRS should only be used on specific portions of a system in Bounded Context (in DDD). • CQRS should be used along with Event Sourcing. 10/8/2017 (C)COPYRIGHTMETAMAGICGLOBALINC.,NEWJERSEY,USA 21 MSDN – Microsoft https://msdn.microsoft.com/en-us/library/dn568103.aspx | Martin Fowler : CQRS – http://martinfowler.com/bliki/CQRS.html CQS : Bertrand Meyer Axon Framework For Java Java Axon Framework Resource : http://www.axonframework.org Greg Young (C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA 2
  • 22. Event Sourcing and CQRS Design Example 08 October 2017 22 Domain The example focus on a concept of a Café which tracks the visit of an individual or group to the café. When people arrive at the café and take a table, a tab is opened. They may then order drinks and food. Drinks are served immediately by the table staff, however food must be cooked by a chef. Once the chef prepared the food it can then be served. Events • TabOpened • DrinksOrdered • FoodOrdered • DrinksCancelled • FoodCancelled • DrinksServed • FoodPrepared • FoodServed • TabClosed Commands • OpenTab • PlaceOrder • AmendOrder • MarkDrinksServed • MarkFoodPrepared • MarkFoodServed • CloseTab Exception • CannotCancelServedItem • TabHasUnservedItem • MustPayEnough Commands are things that indicate requests to our domain. While an event states that something certainly happened, a command may be accepted or rejected. An accepted command leads to zero or more events being emitted to incorporate new facts into the system. A rejected command leads to some kind of exception. An important part of the modeling process is thinking about the things that can cause a command to be refused. Aggregates • A Single Object, which doesn’t reference any others. • An isolated Graph of objects, with One object designated as the Root of the Aggregate. An Event Stream which is an immutable collection of events up until a specific version of an aggregate. The purpose of the version is to implement optimistic locking: Source:http://cqrs.nu/tutorial/cs/01-design (C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA 2
  • 23. Functional Reactive Programming 10/8/2017 23 ResilientElastic Message – Driven 1. A responsive, maintainable & Extensible application is the goal. 2. A responsive application is both scalable (Elastic) and resilient. 3. Responsiveness is impossible to achieve without both scalability and resilience. 4. A Message-Driven architecture is the foundation of scalable, resilient, and ultimately responsive systems. Value Means Form Principles What it means? Responsive thus React to users demand Resilient thus React to errors and failures Elastic thus React to load Message-Driven thus React to events and messages Source: http://reactivex.io/ Responsive Maintainable Extensible (C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA 2
  • 24. 4 Building Blocks of RxJava 08 October 2017 24 Source of Data Stream [ Sender ]Observable Listens for emitted values [ Receiver ]Observer Client Server Request Response Traditional Synchronous Pull Communications 1. The Observer subscribes (listens) to the Observable 2. Observer react to what ever item or sequence of items the Observable emits. 3. Many Observers can subscribe to the same Observable Observer Observableon Next on Completed on ErrorTime Subscribes Non Blocking Time 1 2 Source: http://reactivex.io/ 2 (C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA
  • 25. 4 Building Blocks of RxJava 08 October 2017 25 Schedulers Operators Content Filtering Time Filtering Transformation Schedulers are used to manage and control concurrency. 1. observeOn: Thread Observable is executed 2. subscribeOn: Thread subscribe is executed Operators that let you Transform, Combine, Manipulate, and work with the sequence of items emitted by Observables 3 4 Source: http://reactivex.io/ 2 (C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA
  • 26. Observable Design Pattern (Marble Diagram) 08 October 2017 26 • An Observer subscribes to an Observable. • Then that observer reacts to whatever item or sequence of items the Observable emits. 1 Building Block Source: http://reactivex.io/RxJava/javadoc/index.html?rx/Observable.html | http://rxmarbles.com 2 (C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA
  • 27. Observable / Observer Design Pattern 08 October 2017 27 • Allows for Concurrent Operations: the observer does not need to block while waiting for the observable to emit values • Observer waits to receive values when the observable is ready to emit them • Based on push rather than pull 1 & 2Building Block Source: http://reactivex.io/RxJava/javadoc/index.html?rx/Observable.html 2 (C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA
  • 28. What’s missing from GOF Observer Pattern 08 October 2017 28 1 Building Block Source:http://reactivex.io/intro.html 1. The ability for the producer to signal to the consumer that there is no more data available (a foreach loop on an Iterable completes and returns normally in such a case; an Observable calls its observer’s onCompleted method) 2. The ability for the producer to signal to the consumer that an error has occurred (an Iterable throws an exception if an error takes place during iteration; an Observable calls its observer’s onError method) 3. Multiple Thread Implementations and hiding those details. 4. Dozens of Operators to handle data. 2 (C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA
  • 29. Compare Iterable Vs. Observable 08 October 2017 29 Observable is the asynchronous / push dual to the synchronous pull Iterable • Composable: Easily chained together or combined • Flexible: Can be used to emit: • A scalar value (network result) • Sequence (items in a list) • Infinite streams (weather sensor) • Free from callback hell: Easy to transform one asynchronous stream into another Observables are: Event Iterable (Pull) Observable (Push) Retrieve Data T next() onNext(T) Discover Error throws Exception onError (Exception) Complete !hasNext() onComplete() 1Building Block Source: http://reactivex.io/RxJava/javadoc/index.html?rx/Observable.html 2 (C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA
  • 30. Comparison : Iterable / Streams / Observable 08 October 2017 30 1Building Block First Class Visitor (Consumer) Serial Operations Parallel Streams (10x Speed) Still On Next, On Complete and On Error are Serial Operations Completely Asynchronous Operations Java 8 – Blocking CallJava 6 – Blocking Call Rx Java - Freedom 2 (C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA
  • 31. Observer<T> Contract 08 October 2017 31 Methods: • onNext(T) • onError(Throwable T) • onCompleted() onError / onCompleted called exactly once 2Building Block Source: http://reactivex.io/RxJava/javadoc/index.html?rx/Observable.html X | Time Line 2 (C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA
  • 32. RxJava Scheduler Details 08 October 2017 32 Source: http://reactivex.io/documentation/scheduler.html • If you want to introduce multithreading into your cascade of Observable operators, you can do so by instructing those operators (or particular Observables) to operate on particular Schedulers. • By default, an Observable and the chain of operators that you apply to it will do its work, and will notify its observers, on the same thread on which its Subscribe method is called. • The SubscribeOn operator changes this behavior by specifying a different Scheduler on which the Observable should operate. TheObserveOn operator specifies a different Scheduler that the Observable will use to send notifications to its observers. 3Building Block 2 (C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA
  • 33. 08 October 2017 33 Functional Reactive Programming : Design Patterns Single Component Pattern A Component shall do ONLY one thing, But do it in FULL. Single Responsibility Principle By DeMarco : Structured Analysis & System Specification (Yourdon, New York, 1979) Let-It-Crash Pattern Prefer a FULL component restart to complex internal failure handling. Candea & Fox: Crash-Only Software (USENIX HotOS IX, 2003) Popularized by Netflix Chaos Monkey. Erlang Philosophy Saga Pattern Divide long-lived distributed transactions into quick local ones with compensating actions for recovery. Pet Helland: Life Beyond Distributed Transactions CIDR 2007 (C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA 2
  • 34. 10/8/2017 (C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA 34 • CAP Theorem • Distributed Transactions : 2 Phase Commit • SAGA Design Pattern • Scalability Lessons from EBay • Design Patterns • References Scalability3
  • 35. CAP Theorem by Eric Allen Brewer 08October2017 35 Pick Any 2!! Say NO to 2 Phase Commit  Source: http://en.wikipedia.org/wiki/Eric_Brewer_(scientist) CAP 12 years later: How the “Rules have changed” : http://www.infoq.com/articles/cap-twelve-years-later-how-the-rules-have-changed “In a network subject to communication failures, it is impossible for any web service to implement an atomic read / write shared memory that guarantees a response to every request.” 3
  • 36. Distributed Transactions : 2 Phase Commit 2 PC or not 2 PC, Wherefore Art Thou XA? 08October2017 36 How does 2PC impact scalability? • Transactions are committed in two phases. • This involves communicating with every database (XA Resources) involved to determine if the transaction will commit in the first phase. • During the second phase each database is asked to complete the commit. • While all of this coordination is going on, locks in all of the data sources are being held. • The longer duration locks create the risk of higher contention. • Additionally, the two phases require more database processing time than a single phase commit. • The result is lower overall TPS in the system. Transaction Manager XA Resources Request to Prepare Commit Prepared Prepare Phase Commit PhaseDone Source : Pat Helland (Amazon) : Life Beyond Distributed Transactions Distributed Computing : http://dancres.github.io/Pages/ Solution : Resilient System • Event Based • Design for failure • Asynchronous Recovery • Make all operations idempotent. • Each DB operation is a 1 PC 3 (C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA
  • 37. SAGA Design Pattern instead of 2PC 10/8/2017 37 Long Lived Transactions (LLTs) hold on to DB resources for relatively long periods of time, significantly delaying the termination of shorter and more common transactions. Source: SAGAS (1987) Hector Garcia Molina / Kenneth Salem, Dept. of Computer Science, Princeton University, NJ, USA T1 T2 Tn Local Transactions C1 C2 Cn-1 Compensating Transaction Divide long–lived, distributed transactions into quick local ones with compensating actions for recovery. 3 Reserve Room Ticket Payment Reserve Seat Flight Ticket & Hotel Booking Example Room Payment Rollback Seat Booking Rollback Room Booking Rollback Ticket Payment BASE (Basic Availability, Soft State, Eventual Consistency) (C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA
  • 38. Scalability Best Practices : Lessons from Best Practices Highlights #1 Partition By Function • Decouple the Unrelated Functionalities. • Selling functionality is served by one set of applications, bidding by another, search by yet another. • 16,000 App Servers in 220 different pools • 1000 logical databases, 400 physical hosts #2 Split Horizontally • Break the workload into manageable units. • eBay’s interactions are stateless by design • All App Servers are treated equal and none retains any transactional state • Data Partitioning based on specific requirements #3 Avoid Distributed Transactions • 2 Phase Commit is a pessimistic approach comes with a big COST • CAP Theorem (Consistency, Availability, Partition Tolerance). Apply any two at any point in time. • @ eBay No Distributed Transactions of any kind and NO 2 Phase Commit. #4 Decouple Functions Asynchronously • If Component A calls component B synchronously, then they are tightly coupled. For such systems to scale A you need to scale B also. • If Asynchronous A can move forward irrespective of the state of B • SEDA (Staged Event Driven Architecture) #5 Move Processing to Asynchronous Flow • Move as much processing towards Asynchronous side • Anything that can wait should wait #6 Virtualize at All Levels • Virtualize everything. eBay created their on O/R layer for abstraction #7 Cache Appropriately • Cache Slow changing, read-mostly data, meta data, configuration and static data. 08October2017 38 Source:http://www.infoq.com/articles/ebay-scalability-best-practices 3 (C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA
  • 39. Summary 10/8/2017 39 1. High Scalable & Resilient Architecture 2. Technology Agnostic 3. Easy to Deploy 4. SAGA for Distributed Transaction 5. Faster Go To Market In a Micro Service Architecture, The services tend to get simpler, but the architecture tends to get more complex. That complexity is often managed with Tooling, Automation, and Process. (C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA
  • 40. 10/8/2017 40 Design Patterns are solutions to general problems that software developers faced during software development. Design Patterns3 (C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA
  • 41. References 10/8/2017 41 1. Lewis, James, and Martin Fowler. “Microservices: A Definition of This New Architectural Term”, March 25, 2014. 2. Miller, Matt. “Innovate or Die: The Rise of Microservices”. e Wall Street Journal, October 5, 2015. 3. Newman, Sam. Building Microservices. O’Reilly Media, 2015. 4. Alagarasan, Vijay. “Seven Microservices Anti-patterns”, August 24, 2015. 5. Cockcroft, Adrian. “State of the Art in Microservices”, December 4, 2014. 6. Fowler, Martin. “Microservice Prerequisites”, August 28, 2014. 7. Fowler, Martin. “Microservice Tradeoffs”, July 1, 2015. 8. Humble, Jez. “Four Principles of Low-Risk Software Release”, February 16, 2012. 9. Zuul Edge Server, Ketan Gote, May 22, 2017 10. Ribbon, Hysterix using Spring Feign, Ketan Gote, May 22, 2017 11. Eureka Server with Spring Cloud, Ketan Gote, May 22, 2017 12. Apache Kafka, A Distributed Streaming Platform, Ketan Gote, May 20, 2017 13. Functional Reactive Programming, Araf Karsh Hamid, August 7, 2016 14. Enterprise Software Architectures, Araf Karsh Hamid, July 30, 2016 15. Docker and Linux Containers, Araf Karsh Hamid, April 28, 2015 3
  • 42. References 10/8/2017 (C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA 42 Domain Driven Design 16. Oct 27, 2012 What I have learned about DDD Since the book. By Eric Evans 17. Mar 19, 2013 Domain Driven Design By Eric Evans 18. May 16, 2015 Microsoft Ignite: Domain Driven Design for the Database Driven Mind 19. Jun 02, 2015 Applied DDD in Java EE 7 and Open Source World 20. Aug 23, 2016 Domain Driven Design the Good Parts By Jimmy Bogard 21. Sep 22, 2016 GOTO 2015 – DDD & REST Domain Driven API’s for the Web. By Oliver Gierke 22. Jan 24, 2017 Spring Developer – Developing Micro Services with Aggregates. By Chris Richardson 23. May 17. 2017 DEVOXX – The Art of Discovering Bounded Contexts. By Nick Tune Event Sourcing and CQRS 23. Nov 13, 2014 GOTO 2014 – Event Sourcing. By Greg Young 24. Mar 22, 2016 Spring Developer – Building Micro Services with Event Sourcing and CQRS 25. Apr 15, 2016 YOW! Nights – Event Sourcing. By Martin Fowler 26. May 08, 2017 When Micro Services Meet Event Sourcing. By Vinicius Gomes
  • 43. References 10/8/2017 43 27. MSDN – Microsoft https://msdn.microsoft.com/en-us/library/dn568103.aspx 28. Martin Fowler : CQRS – http://martinfowler.com/bliki/CQRS.html 29. Udi Dahan : CQRS – http://www.udidahan.com/2009/12/09/clarified-cqrs/ 30. Greg Young : CQRS - https://www.youtube.com/watch?v=JHGkaShoyNs 31. Bertrand Meyer – CQS - http://en.wikipedia.org/wiki/Bertrand_Meyer 32. CQS : http://en.wikipedia.org/wiki/Command–query_separation 33. CAP Theorem : http://en.wikipedia.org/wiki/CAP_theorem 34. CAP Theorem : http://www.julianbrowne.com/article/viewer/brewers-cap-theorem 35. CAP 12 years how the rules have changed 36. EBay Scalability Best Practices : http://www.infoq.com/articles/ebay-scalability-best-practices 37. Pat Helland (Amazon) : Life beyond distributed transactions 38. Stanford University: Rx https://www.youtube.com/watch?v=y9xudo3C1Cw 39. Princeton University: SAGAS (1987) Hector Garcia Molina / Kenneth Salem 40. Rx Observable : https://dzone.com/articles/using-rx-java-observable 3
  • 44. References – Micro Services – Videos 41. Martin Fowler – Micro Services : https://www.youtube.com/watch?v=2yko4TbC8cI&feature=youtu.be&t=15m53s 42. GOTO 2016 – Microservices at NetFlix Scale: Principles, Tradeoffs & Lessons Learned. By R Meshenberg 43. Mastering Chaos – A NetFlix Guide to Microservices. By Josh Evans 44. GOTO 2015 – Challenges Implementing Micro Services By Fred George 45. GOTO 2016 – From Monolith to Microservices at Zalando. By Rodrigue Scaefer 46. GOTO 2015 – Microservices @ Spotify. By Kevin Goldsmith 47. Modelling Microservices @ Spotify : https://www.youtube.com/watch?v=7XDA044tl8k 48. GOTO 2015 – DDD & Microservices: At last, Some Boundaries By Eric Evans 49. GOTO 2016 – What I wish I had known before Scaling Uber to 1000 Services. By Matt Ranney 50. DDD Europe – Tackling Complexity in the Heart of Software By Eric Evans, April 11, 2016 51. AWS re:Invent 2016 – From Monolithic to Microservices: Evolving Architecture Patterns. By Emerson L, Gilt D. Chiles 52. AWS 2017 – An overview of designing Microservices based Applications on AWS. By Peter Dalbhanjan 53. GOTO Jun, 2017 – Effective Microservices in a Data Centric World. By Randy Shoup. 54. GOTO July, 2017 – The Seven (more) Deadly Sins of Microservices. By Daniel Bryant 55. Sept, 2017 – Airbnb, From Monolith to Microservices: How to scale your Architecture. By Melanie Cubula 56. GOTO Sept, 2017 – Rethinking Microservices with Stateful Streams. By Ben Stopford. 57. GOTO 2017 – Microservices without Servers. By Glynn Bird. 10/8/2017 44 3
  • 45. 10/8/2017 45 Thank you Araf Karsh Hamid : Co-Founder / CTO araf.karsh@metamagic.in USA: +1 (973) 969-2921 India: +91.999.545.8627 Skype / LinkedIn / Twitter / Slideshare : arafkarsh http://www.slideshare.net/arafkarsh https://www.linkedin.com/in/arafkarsh/ http://www.slideshare.net/arafkarsh/software-architecture-styles-64537120 http://www.slideshare.net/arafkarsh/function-point-analysis-65711721 http://www.slideshare.net/arafkarsh/functional-reactive-programming-64780160
  • 46. UI Design Patterns 10/8/2017 (C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA 46
  • 47. UI DesignPatterns MVC/ MVP/ MVVM 47 View Controller Model Passes calls To Fire Events Manipulates • The Controller is responsible to process incoming requests. It receives input from users via the View, then process the user's data with the help of Model and passing the results back to the View. • Typically, it acts as the coordinator between the View and the Model. • The Presenter is responsible for handling all UI events on behalf of the view. This receive input from users via the View, then process the user's data with the help of Model and passing the results back to the View. • Unlike view and controller, view and presenter are completely decoupled from each other’s and communicate to each other’s by an interface. Also, presenter does not manage the incoming request traffic as controller. • Supports two-way data binding between View and ViewModel. View ViewModel Model Passes calls To Manipulates Updates Fire Events • The View Model is responsible for exposing methods, commands, and other properties that helps to maintain the state of the view, manipulate the model as the result of actions on the view, and trigger events in the view itself. • There is many-to-one relationship between View and ViewModel means many View can be mapped to one ViewModel. • Supports two-way data binding between View and ViewModel. View Presenter Model Passes calls To Fire Events Manipulates Updates1 1 1 * Model View Controller Model View Presenter Model View ViewModel
  • 48. UI Design Patterns Flux / Redux ViewDispatcher Every action is sent to all Stores via callbacks the stores register with the Dispatcher Store Action Action 1 * Controller-Views • Listens to Store changes • Emit Actions to Dispatcher Dispatcher • Single Dispatcher per Application • Manages the Data Flow View to Model • Receives Actions and dispatch them to Stores Stores • Contains state for a Domain (Vs. Specific Component) • In Charge of modifying the Data • Inform the views when the Data is changed by emitting the Changed Event. Flux Core Concepts 1. One way Data Flow 2. No Event Chaining 3. Entire App State is resolved in store before Views Update 4. Data Manipulation ONLY happen in one place (Store). Actions • Simple JS Objects • Contains Name of the Action and Data (Payload) • Action represent something that has happened. • Has No Business Logic (C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA
  • 49. UI Design Patterns Redux Actions • Simple JS Objects • Contains Name of the Action and Data (Payload) • Has NO Business Logic • Action represent something that has happened. Store • Multiple View layers can Subscribe • View layer to Dispatch actions • Single Store for the Entire Application • Data manipulation logic moves out of store to Reducers Reducer • Pure JS Functions • No External calls • Can combine multiple reducers • A function that specifies how the state changes in response to an Action. • Reducer does NOT modify the state. It returns the NEW State. Redux Core Concepts 1. One way Data Flow 2. No Dispatcher compared to Flux 3. Immutable Store Available for React & Angular View Action State Dispatcher Reducer R R R Store Middleware Middleware Middleware • Handles External calls • Multiple Middleware's can be chained. (C) COPYRIGHT METAMAGIC GLOBAL INC., NEW JERSEY, USA

Editor's Notes

  1. MASA = Mesh App and Service Architecture
  2. https://dzone.com/articles/microservices-vs-soa-2
  3. https://dzone.com/articles/microservices-vs-soa-2
  4. http://microservices.io/articles/scalecube.html Sharding in the context of databases is the process of splitting very large databases into smaller parts, or shards. As experience can tell us, some statements that we issue to our database can take a consid‐ erable amount of time to execute. During these statements’ execu‐ tion, the database becomes locked and unavailable for the application. This means that we are introducing a period of down‐ time to our users.
  5. http://domainlanguage.com/ddd/patterns/DDD_Reference_2011-01-31.pdf http://www.infoq.com/interviews/domain-driven-design-eric-evans
  6. http://www.infoq.com/articles/ddd-contextmapping http://www.slideshare.net/aca_it/modularity-ddd?from_action=save
  7. http://martinfowler.com/bliki/BoundedContext.html
  8. http://martinfowler.com/bliki/DDD_Aggregate.html Effective Aggregate Design By Vaughn Vernon Part 1 : http://dddcommunity.org/wp-content/uploads/files/pdf_articles/Vernon_2011_1.pdf Part 2 : http://dddcommunity.org/wp-content/uploads/files/pdf_articles/Vernon_2011_2.pdf Part 3 : http://dddcommunity.org/wp-content/uploads/files/pdf_articles/Vernon_2011_3.pdf Video Part 2 : https://vimeo.com/33708293
  9. Source : https://blogs.msdn.microsoft.com/maarten_mullender/2004/07/23/crud-only-when-you-can-afford-it-revisited/I t often means that there's a mismatch between the read and write representations of the data, such as additional columns or properties that must be updated correctly even though they aren't required as part of an operation. It risks data contention when records are locked in the data store in a collaborative domain, where multiple actors operate in parallel on the same set of data. Or update conflicts caused by concurrent updates when optimistic locking is used. These risks increase as the complexity and throughput of the system grows. In addition, the traditional approach can have a negative effect on performance due to load on the data store and data access layer, and the complexity of queries required to retrieve information. It can make managing security and permissions more complex because each entity is subject to both read and write operations, which might expose data in the wrong context.
  10. Source: MSDN – Microsoft https://msdn.microsoft.com/en-us/library/dn568103.aspx Martin Fowler : CQRS – http://martinfowler.com/bliki/CQRS.html Udi Dahan : CQRS – http://www.udidahan.com/2009/12/09/clarified-cqrs/ Greg Young : CQRS - https://www.youtube.com/watch?v=JHGkaShoyNs Bertrand Meyer – CQS - http://en.wikipedia.org/wiki/Bertrand_Meyer http://en.wikipedia.org/wiki/Command–query_separation https://skillsmatter.com/courses/345-greg-youngs-cqrs-domain-events-event-sourcing-and-how-to-apply-ddd
  11. Greg Young Functional Programming with DDD : https://skillsmatter.com/skillscasts/3191-ddd-functional-programming Jan Kronquist : Aggregates + Event Sourcing http://www.jayway.com/2013/03/08/aggregates-event-sourcing-distilled/ DDD + CQRS + Event Sourcing http://www.kenneth-truyers.net/2013/12/05/introduction-to-domain-driven-design-cqrs-and-event-sourcing/ http://cqrs.nu/tutorial/cs/01-design http://ookami86.github.io/event-sourcing-in-practice/#title.md https://vaughnvernon.co/?page_id=168
  12. http://reactivex.io/ http://techblog.netflix.com/2013/01/reactive-programming-at-netflix.html http://reactivex.io/learnrx/ Download the API: https://github.com/ReactiveX/RxJava http://mvnrepository.com/artifact/io.reactivex/rxjava/1.1.0 http://blog.danlew.net/2014/09/15/grokking-rxjava-part-1/ https://realm.io/ http://blog.reactiveprogramming.org/ What is Reactive Programming? https://medium.com/reactive-programming/what-is-reactive-programming-bc9fa7f4a7fc#.57mt1ieow What is Functional Reactive Programming? https://www.bignerdranch.com/blog/what-is-functional-reactive-programming/ Reactive Programming Patterns with Java 8 Features https://www.youtube.com/watch?v=tiJEL3oiHIY Going Reactive with Java 8 https://www.youtube.com/watch?v=y-8sHHbMks4 Reactive Programming for Java Developers https://www.youtube.com/watch?v=fz31sbwOYq8 http://www.slideshare.net/rickbwarren/building-scalable-stateless-applications-with-rx-java?related=1
  13. Stanford Unv: Rx https://www.youtube.com/watch?v=y9xudo3C1Cw https://dzone.com/articles/using-rx-java-observable https://github.com/Betterment/DaggerStarter http://www.grahamlea.com/2014/07/rxjava-threading-examples/ RxJava in Different Flavours http://instil.co/2014/08/05/rxjava-in-different-flavours-of-java/ https://github.com/Netflix/RxJava https://github.com/Netflix/RxJava/wiki http://www.infoq.com/author/Erik-Meijer React conference http://www.youtube.com/playlist?list=PLSD48HvrE7-Z1stQ1vIIBumB0wK0s8llY Cat picture taken from http://www.teckler.com/en/Rapunzel
  14. http://reactivex.io/documentation/observable.html http://rxmarbles.com
  15. http://reactivex.io/documentation/observable.html
  16. http://reactivex.io/documentation/observable.html
  17. RxJava API Docs : http://reactivex.io/RxJava/javadoc/
  18. http://reactivex.io/documentation/observable.html
  19. http://reactivex.io/documentation/observable.html
  20. http://reactivex.io/documentation/scheduler.html
  21. ACID (atomicity, consistency, isolation, and durability) BASE is a family of styles that include basic availability, soft state, and eventual consistency
  22. http://en.wikipedia.org/wiki/CAP_theorem http://www.julianbrowne.com/article/viewer/brewers-cap-theorem http://www.infoq.com/articles/cap-twelve-years-later-how-the-rules-have-changed
  23. Pat Helland (Amazon) : Life beyond distributed transactions… http://adrianmarriott.net/logosroot/papers/LifeBeyondTxns.pdf
  24. BASE is a family of styles that include basic availability, soft state, and eventual consistency
  25. http://www.infoq.com/articles/ebay-scalability-best-practices