SlideShare a Scribd company logo
1 of 98
Download to read offline
Microservice Architectures
Angelo	Corsaro,	PhD	
Chief	Technology	Officer	
angelo.corsaro@prismtech.com
with
Part-I
Microservice architectures are one of the latest
buzz in software architectures
Let’s try to understand what microservices are and
how to build microservice architectures
microserviceS “Microservices are small, autonomous
services that work together.” [1]
microservice
Architectural
style
“The microservice architectural style
is an approach to developing a single
application as a suite of small
services, each running in its own
process and communicating with
lightweight mechanisms.” [2]
Monolith
vs.
microservice
A good way of getting the gist of the
microservice architectural style is to
compare it to the more traditional
monolithic approach
Monolithic
Architectures
Monolithic
Architectures
Traditional 3 -Tier
architectures with
decomposition based on
Technology / Skills
boundaries and
modularisation based on
libraries
Client Tier (UI)
Server Tier
Data Tier
Monolithic
Architectures
A monolithic applications
merges multiple
functionalities in the same
executable
Server Tier
Process
Functionality
Challenges
Scaling monolithic
applications is challenging
as we have just one degree
of freedom to scale out
The same challenge
applies to replication
Server Tier
Load Balancer
Server Tier
Challenges
Innovation is constrained
by the fact that we cannot
easily mix different
technologies for
implementing the various
functionalities
Same Technology Stack
Server Tier
Challenges
Incremental Change is
constrained by the fact
that can’t incrementally
deploy new
functionalities . We need
to redeploy an entire
subsystem. Hard to hide internal
details and limit
dependencies
Challenges
Loose Coupling and High
Cohesion are harder to
achieve and especially to
preserve as the “barriers”
between functionalities are
very thin
Server Tier
Module / Library Boundaries
Microservice
Architectures
Server Tier
Process
Functionality
Microservice
Architectures
Individual functionalities
become unit of
deployment and run in
their own process
Microservice
Architectures
Microservices
communicate through
some lightweight
mechanism
Server Tier
Process
Functionality
Server Tier
Benefits
Scaling microservice
applications is easier as we
can scale out individual
functionalities
Benefits
Unconstrained Innovation
as we choose the
technologies stack that
makes the most sense for
implementing a given
feature
Server Tier
Process
Functionality
Incremental Change is
facilitated allowing
incremental deployment of
new functionalities.
Potentially different version of
the same micro service could
be running at the same time!
Benefits Server Tier
Process
Functionality
Loose Coupling and High
Cohesion are easier to
achieved to preserve as
the “barriers” between
functionalities are very
thick
Server Tier
Process Boundary /
Share Nothing
Benefits
Performance of
microservice architectures
may be degraded by the
higher cost of
communication if the right
technology is not used
Server Tier
Challenges
Monolithic
Implementation
Microservice
Implementation
In-Process
Communication
Inter-Process/Host Communication
Deployment and
Operation of systems
based on the microservice
architectures is inherently
more complex, especially
at scale and when the right
technologies are not used
Server Tier
Challenges
Monolithic
Implementation
Microservice
Implementation
Designing
Microservice
Architectures
Identifying
Microservices
Microservices are supposed
to capture business and not
technical features of a
system
Microservices
Identifying
Microservices
When a monolithic systems
is already existing, micro
services can be created by
separating the various
features
Microservices
When a system does not exist
we can use the Bounded
Context as defined in [3]
System Objectives
Microservices
Identifying
Microservices Bounded Context
Bounded Context
Domain-Driven Design (DDD) divides a complex domain into a series of
Bounded Context. Where a context means a specific system
responsibility, and a bounded context means that responsibility is
enforced with explicit boundaries.
Each bounded context has its own canonical model and
communication between bounded context happens through a system-
canonic al model
Microservices are ideally mapped to
Bounded Context.
Each Bounded context has
potentially its own canonical model
Communication between Bounded
Context uses the system-wide
canonical model
Microservices
bounded context
micro-service canonical
model
system canonical model
A consequence of applying the
Bounded Context technique is
that data management in micro
services architectures is
decentralised
Decentralised
Data Management
bounded context
micro-service canonical
model
system canonical model
Every microservice owns and
manages its data without relying
on a shared data-base.
Consequently microservice
architectures are build under
eventual consistency
assumptions
Decentralised
Data Management
bounded context
micro-service canonical
model
system canonical model
Any organisation that designs a system (defined broadly) will produce a design
whose structure is a copy of the organization's communication structure.
— M. Conway, 1967
Conway’s Law
Conway’s tells us that to be
successful in applying
microservice architectures we
should have cross-functional
teams organised around business
capabilities
Conway’s LAW
Implications
image curtesy of M. Fowler http://martinfowler.com/articles/microservices.html
(This is an adaptation of a Figure from [1])
Microservices
small autonomous
services
Modelled around
business concepts
Highly Automated
Hide internal
implementation
details
Decentralised
Independent
Deployment
Failure Isolation
Highly Observable
Stateless
Vortex Overview
Vortex's
Coordination Model
Applications can autonomously
and asynchronously read and
write data enjoying spatial and
temporal decoupling
DDS Global Data Space
...
Data
Writer
Data
Writer
Data
Writer
Data
Reader
Data
Reader
Data
Reader
Data
Reader
Data
Writer
TopicA
QoS
TopicB
QoS
TopicC
QoS
TopicD
QoS
Global Data Space
Built-in dynamic discovery
isolates applications from
network topology and
connectivity details
DDS Global Data Space
...
Data
Writer
Data
Writer
Data
Writer
Data
Reader
Data
Reader
Data
Reader
Data
Reader
Data
Writer
TopicA
QoS
TopicB
QoS
TopicC
QoS
TopicD
QoS
Dynamic Discovery
Topic
A domain-wide information’s
class A Topic defined by means
of a <name, type, qos>
Topic
DDS Global Data Space
...
Data
Writer
Data
Writer
Data
Writer
Data
Reader
Data
Reader
Data
Reader
Data
Reader
Data
Writer
TopicA
QoS
TopicB
QoS
TopicC
QoS
TopicD
QoS
Topic
Type
Name
QoS
Topic Types
Topic Types:
Language Independent
Definitions
Topic types can be expressed
using different syntaxes,
including IDL and ProtoBuf
Topic Type
struct CarDynamics {
string cid;
long x; long y;
float dx; long dy;
}
#pragma keylist CarDynamics cid
IDL
Topic types can be expressed
using different syntaxes,
including IDL and ProtoBuf
Topic Type message CarDynamics {
option (.omg.dds.type) =
{name: "CarDynamics"};
required string cid = 0
[(.omg.dds.member).key = true];
required long x = 1;
required long y = 2;
required float dx = 3;
required long dy = 4;
}
ProtoBuf
Topic Types:
Language Specific
Definitions
Topic types can be expressed
using different syntaxes,
including IDL and ProtoBuf
Topic Type
class CarDynamics:
constructor:
(@cid, @x, @y, @dx, @dy) ->
CoffeeScript
Topic types can be expressed
using different syntaxes,
including IDL and ProtoBuf
Topic Type
public struct CaDynamics {

public string cid { get; set; }

public int x { get; set; }

public int y { get; set; }

public int dx { get; set; }

public int dy { get; set; }



public CaDynamics (string cid,
int x, int y, int dx, int dy)

{

this.cid = cid;

this.x = x; this.y = y;

this.dx = dx; this.dy = dy;

}

}

C#
Topic types can be expressed
using different syntaxes,
including IDL and ProtoBuf
Topic Type
@KeyList ( topicType = "CarDynamics", keys = {"cid"})

public class CarDynamics {

public String cid;

public int x; public int dx;

public int y; public int dy;



public CarDynamics(String s, int a, int b,
int c,int d) {

this.cid = s;

this.x = a; this.dx = b;

this.y = c; this.dy = d;

}



@Override

public String toString() {
…

}



}

Java
TopicA
QoS
TopicC
QoS
...
TopicB
QoS
TopicD
QoS
Partitions
The Global Data Space can be
divided in to arbitrary partitions
The source and destination of
data is identified by means of
“Partition/Topic” expressions
“Red”
“Blue”
QoS policies allow to express
temporal and availability
constraints for data
DDS Global Data Space
...
Data
Writer
Data
Writer
Data
Writer
Data
Reader
Data
Reader
Data
Reader
Data
Reader
Data
Writer
TopicA
QoS
TopicB
QoS
TopicC
QoS
TopicD
QoS
QoS - Enabled
A collection of policies
that control non-
functional properties
such as reliability,
persistence, temporal
constraints and priority
QoS
HISTORY
LIFESPAN
DURABILITY
DEADLINE
LATENCY BUDGET
TRANSPORT PRIO
TIME-BASED FILTER
RESOURCE LIMITS
USER DATA
TOPIC DATA
GROUP DATA
OWENERSHIP
OWN. STRENGTH
LIVELINESS
ENTITY FACTORY
DW LIFECYCLE
DR LIFECYCLE
PRESENTATION
RELIABILITY
PARTITION
DEST. ORDER
RxO QoS Local QoS
QoS Policies controlling
end-to-end properties
follow a Request vs.
Offered
QoS
Domain
Participant
DURABILITY
OWENERSHIP
DEADLINE
LATENCY BUDGET
LIVELINESS
RELIABILITY
DEST. ORDER
Publisher
DataWriter
PARTITION
DataReader
Subscriber
Domain
Participant
offered
QoS
Topic
writes reads
Domain Id
joins joins
produces-in consumes-from
RxO QoS Policies
requested
QoS
Interacting with
the Data Cache
Each Data Reader is
associated with a Cache
The Cache stores the last
n∊𝜨∞
samples for each
relevant instance
Data Cache
DataReader Cache
DataReader
...
Samples
Instances
Cache
Where: 𝜨∞
=𝜨 ∪ {∞}
The action of reading
samples for a Reader Cache
is non-destructive.
Samples are not removed
from the cache
Reading Data
DataReader Cache
DataReader
...
DataReader Cache
DataReader
...read
The action of taking
samples for a Reader Cache
is destructive.
Samples are removed from
the cache
Taking Data
DataReader Cache
DataReader
...
DataReader Cache
DataReader
...take
Samples can be selected
using composable content
and status predicates
Sample Selectors
DataReader Cache
DataReader
...
Filters allow to control what
gets into a DataReader
cache
Filters are expressed as
SQL where clauses or as
Java/C/JavaScript
predicates
Content-Filtering
DataReader Cache
DataReader
...
Filter
Application
Network
Content Filters
can be used to
project on the
local cache only
the Topic data
satisfying a given
predicate
Content
Filters struct	CarDynamics	{	
			@key	
			string		cid;	
			long				x;			long		y;	
			float			dx;		long		dy;	
}
cid x y dx dy
GR 33N GO 167 240 45 0
LO 00V IN 65 26 65 0
AN 637 OS 32 853 0 50
AB 123 CD 325 235 80 0
“dx	>	50	OR	dy	>	50”
Type
CarDynamics
cid x y dx dy
LO 00V IN 65 26 65 0
AB 123 CD 325 235 80 0
Reader Cache
Queries allow to control
what gets out of a
DataReader Cache
Queries are expressed as
SQL where clauses or as
Java/C/JavaScript
predicates
Content-Based
Selection
DataReader Cache
DataReader
...
Query
DataReader Cache
DataReader
...
Application
Network
Reader Cache
Queries can be
used to select out
of the local cache
the data matching
a given predicate
Queries struct	CarDynamics	{	
			@key	
			string		cid;	
			long				x;			long		y;	
			float			dx;		long		dy;	
}
cid x y dx dy
GR 33N GO 167 240 45 0
LO 00V IN 65 26 65 0
AN 637 OS 32 853 0 50
AB 123 CD 325 235 80 0
“dx	>	50	OR	dy	>	50”
Type
CarDynamics
cid x y dx dy
GR 33N GO 167 240 45 0
LO 00V IN 65 26 65 0
AN 637 OS 32 853 0 50
AB 123 CD 325 235 80 0
cid x y dx dy
LO 00V IN 65 26 65 0
AB 123 CD 325 235 80 0
query
State based selection
allows to control what gets
out of a DataReader Cache
State base selectors
predicate on samples meta-
information
State-Based Selection
DataReader Cache
DataReader
...
State Selector
DataReader Cache
DataReader
...
Application
Network
Selector Example
// == ISO C++ DDS API ==
auto data =
dr.select()
.content(query)
.state(data_state)
.instance(handle)
.read();
your first
vortex app
CopyrightPrismTech,2014
Anatomy of a DDS Application
CopyrightPrismTech,2015
Writing Data in C++
#include <dds.hpp>
int main(int, char**) {
DomainParticipant dp(0);
Topic<Meter> topic(“SmartMeter”);
Publisher pub(dp);
DataWriter<Meter> dw(pub, topic);
while (!done) {
auto value = readMeter()
dw.write(value);
std::this_thread::sleep_for(SAMPLING_PERIOD);
}
return 0;
}
					enum	UtilityKind	{	
	 				ELECTRICITY,	
	 				GAS,	
	 				WATER	
						};	
							
						struct	Meter	{	
	 				string	sn;	
	 				UtilityKind	utility;	
	 				float	reading;	
	 				float	error;	
						};													
						#pragma	keylist	Meter	sn
CopyrightPrismTech,2015
Reading Data in C++
#include <dds.hpp>
int main(int, char**) {
DomainParticipant dp(0);
Topic<Meter> topic(”SmartMeter”);
Subscriber sub(dp);
DataReader<Meter> dr(dp, topic);
LambdaDataReaderListener<DataReader<Meter>> lst;
lst.data_available = [](DataReader<Meter>& dr) {
auto samples = data.read();
std::for_each(samples.begin(), samples.end(), [](Sample<Meter>& sample) {
std::cout << sample.data() << std::endl;
}
}
dr.listener(lst);
// Print incoming data up to when the user does a Ctrl-C
std::this_thread::join();
return 0;
}
					enum	UtilityKind	{	
	 				ELECTRICITY,	
	 				GAS,	
	 				WATER	
						};	
							
						struct	Meter	{	
	 				string	sn;	
	 				UtilityKind	utility;	
	 				float	reading;	
	 				float	error;	
						};													
						#pragma	keylist	Meter	sn
CopyrightPrismTech,2014
Writing Data in Scala
import dds._

import dds.prelude._

import dds.config.DefaultEntities._

object SmartMeter {



def main(args: Array[String]): Unit = {

val topic = Topic[Meter](“SmartMeter”)

val dw = DataWriter[Meter](topic)
while (!done) {
val meter = readMeter()

dw.write(meter)
Thread.sleep(SAMPLING_PERIOD)
}

}

}
					enum	UtilityKind	{	
	 				ELECTRICITY,	
	 				GAS,	
	 				WATER	
						};	
							
						struct	Meter	{	
	 				string	sn;	
	 				UtilityKind	utility;	
	 				float	reading;	
	 				float	error;	
						};													
						#pragma	keylist	Meter	sn
CopyrightPrismTech,2014
Reading Data in Scala
import dds._

import dds.prelude._

import dds.config.DefaultEntities._

object SmartMeterLog {

def main(args: Array[String]): Unit = {

val topic = Topic[Meter](“SmartMeter”)

val dr = DataReader[Meter](topic)

dr listen {

case DataAvailable(_) => dr.read.foreach(println)

}

}

}
					enum	UtilityKind	{	
	 				ELECTRICITY,	
	 				GAS,	
	 				WATER	
						};	
							
						struct	Meter	{	
	 				string	sn;	
	 				UtilityKind	utility;	
	 				float	reading;	
	 				float	error;	
						};													
						#pragma	keylist	Meter	sn
CopyrightPrismTech,2015
Writing Data in Python
import dds
import time



if __name__ == '__main__':

topic = dds.Topic("SmartMeter", "Meter")

dw = dds.Writer(topic)



while True:

m = readMeter()

dw.write(m)

time.sleep(0.1)
					enum	UtilityKind	{	
	 				ELECTRICITY,	
	 				GAS,	
	 				WATER	
						};	
							
						struct	Meter	{	
	 				string	sn;	
	 				UtilityKind	utility;	
	 				float	reading;	
	 				float	error;	
						};													
						#pragma	keylist	Meter	sn
CopyrightPrismTech,2015
Reading Data in Python
import dds

import sys



def readData(dr): 

samples = dds.range(dr.read())

for s in samples:

sys.stdout.write(str(s.getData()))



if __name__ == '__main__':

t = dds.Topic("SmartMeter", "Meter")

dr = dds.Reader(t)

dr.onDataAvailable = readData
					enum	UtilityKind	{	
	 				ELECTRICITY,	
	 				GAS,	
	 				WATER	
						};	
							
						struct	Meter	{	
	 				string	sn;	
	 				UtilityKind	utility;	
	 				float	reading;	
	 				float	error;	
						};													
						#pragma	keylist	Meter	sn
Vortex
Technology Stack
Device implementations
optimised for OT, IT and
consumer platforms
Native support for Cloud and
Fog Computing Architectures
Device-2-DeviceDevice-2-Cloud
Fog-2-Cloud
Device-2-Fog
Cloud-2-Cloud
Fog-2-Fog
infrastructuresdk
Vortex-Based
Microservices
Microservices are ideally mapped to
Bounded Context.
Each Bounded context has
potentially its own canonical model
Communication between Bounded
Context uses the system-wide
canonical model
Bounded context
bounded context
micro-service Vortex Data Model
system canonical Vortex
Data model
micro-service partition
system partition
micro-service
data model
system (inter-
svc) data model
Benefits
Decentralised
Infrastructure
The relevant portion of the data
space is projected on the
application address space. Each
typed projection is commonly called
a Cache
No single point of failure or
bottleneck
No central server to configure/
manage
Decentralised
Data Space
Data
Writer
Data
Writer
Data
Writer
Data
Reader
Data
Reader
Data
Reader
Data
Writer
TopicA
QoS
TopicB
QoS
TopicC
QoS
TopicD
QoS
TopicD
QoS
TopicD
QoS
TopicA
QoS
Persistence
Vortex provides a high
performance distributed
durability service that can be
used to achieve different level
of temporal decoupling
Durability Services take
ownership for “Partition/Topic “
expressions
Distributed
Durability
Performance
High
Performance
30 μs peer-to-peer latency
7 μs inter-core latency
4+ Mmsgs/sec p2p throughput
Device-2-DeviceDevice-2-Cloud
Fog-2-Cloud
Device-2-Fog
Cloud-2-Cloud
Fog-2-Fog
infrastructuresdk
<10 μs fog/cloud routing
latency
High
Performance Device-2-DeviceDevice-2-Cloud
Fog-2-Cloud
Device-2-Fog
Cloud-2-Cloud
Fog-2-Fog
infrastructuresdk
Deployment
Fexibility
Microservice
deployment
The common guideline for
Microservices is to deploy
them across different hosts
to limit the impact of a
failing machine
Microservice
deployment
The one micro-service per
host rule can be
constraining in terms of
performance
Microservice
deployment
Vortex location transparency
and intra-host
communication optimisation
allow to exploit the benefits
of micro-service
architectures without major
performance costs
Ultra-Low Latency
Inter-Process Comm
Technology
Agnostic
Vortex is a Polyglot and
Interoperable across
Programming Languages
Device-2-DeviceDevice-2-Cloud
Fog-2-Cloud
Device-2-Fog
Cloud-2-Cloud
Fog-2-Fog
infrastructuresdk
Fully Independent of the
Cloud Infrastructure
Private Clouds
Device-2-DeviceDevice-2-Cloud
Fog-2-Cloud
Device-2-Fog
Cloud-2-Cloud
Fog-2-Fog
infrastructuresdk
Native Integration with the
hottest real-time analytics
platforms and CEP Device-2-DeviceDevice-2-Cloud
Fog-2-Cloud
Device-2-Fog
Cloud-2-Cloud
Fog-2-Fog
infrastructuresdk
Integration with mainstream
Dashboard Technologies
Device-2-DeviceDevice-2-Cloud
Fog-2-Cloud
Device-2-Fog
Cloud-2-Cloud
Fog-2-Fog
infrastructuresdk
Native Support
for Microservices
Patterns
Timeout
As a general rule Vortex APIs
are non-blocking
Blocking API calls are all
equipped with timeout
#include <dds.hpp>
int main(int, char**) {
DomainParticipant dp(0);
Topic<Meter> topic(“SmartMeter”);
Publisher pub(dp);
DataWriter<Meter> dw(pub, topic);
while (!done) {
auto value = readMeter()
dw.write(value);
std::this_thread::sleep_for(SAMPLING_PERIOD);
}
return 0;
}
Worker Pattern
Vortex provides several
ways of supporting the
worker pattern
CIRCUIT BREAKER
Vortex communications
primitive implement the
circuit breaker pattern thus
reducing the complexity of
adopting it
Microservices architectures bring
several architectural benefits
Vortex ensures that the operational and
performance cost of adopting micro
services architectures if minimised
In
Summary
[1] S. Newman. Building Microservices.
[2] M. Fowler, J. Lewis. Microservices
[3] E. Evans, Domain-Driven Design
CopyrightPrismTech,2015

More Related Content

What's hot

Standardizing the Data Distribution Service (DDS) API for Modern C++
Standardizing the Data Distribution Service (DDS) API for Modern C++Standardizing the Data Distribution Service (DDS) API for Modern C++
Standardizing the Data Distribution Service (DDS) API for Modern C++
Sumant Tambe
 
Applying MBSE to the Industrial IoT: Using SysML with Connext DDS and Simulink
Applying MBSE to the Industrial IoT: Using SysML with Connext DDS and SimulinkApplying MBSE to the Industrial IoT: Using SysML with Connext DDS and Simulink
Applying MBSE to the Industrial IoT: Using SysML with Connext DDS and Simulink
Gerardo Pardo-Castellote
 

What's hot (20)

Micro XRCE-DDS: Bringing DDS into microcontrollers
Micro XRCE-DDS: Bringing DDS into microcontrollersMicro XRCE-DDS: Bringing DDS into microcontrollers
Micro XRCE-DDS: Bringing DDS into microcontrollers
 
Standardizing the Data Distribution Service (DDS) API for Modern C++
Standardizing the Data Distribution Service (DDS) API for Modern C++Standardizing the Data Distribution Service (DDS) API for Modern C++
Standardizing the Data Distribution Service (DDS) API for Modern C++
 
Introduction to DDS
Introduction to DDSIntroduction to DDS
Introduction to DDS
 
Data-Centric and Message-Centric System Architecture
Data-Centric and Message-Centric System ArchitectureData-Centric and Message-Centric System Architecture
Data-Centric and Message-Centric System Architecture
 
Shaping serverless architecture with domain driven design patterns
Shaping serverless architecture with domain driven design patternsShaping serverless architecture with domain driven design patterns
Shaping serverless architecture with domain driven design patterns
 
Cloud Security: A New Perspective
Cloud Security: A New PerspectiveCloud Security: A New Perspective
Cloud Security: A New Perspective
 
Core Concept: Software Defined Everything
Core Concept: Software Defined EverythingCore Concept: Software Defined Everything
Core Concept: Software Defined Everything
 
Applying MBSE to the Industrial IoT: Using SysML with Connext DDS and Simulink
Applying MBSE to the Industrial IoT: Using SysML with Connext DDS and SimulinkApplying MBSE to the Industrial IoT: Using SysML with Connext DDS and Simulink
Applying MBSE to the Industrial IoT: Using SysML with Connext DDS and Simulink
 
QCONSF - ACID Is So Yesterday: Maintaining Data Consistency with Sagas
QCONSF - ACID Is So Yesterday: Maintaining Data Consistency with SagasQCONSF - ACID Is So Yesterday: Maintaining Data Consistency with Sagas
QCONSF - ACID Is So Yesterday: Maintaining Data Consistency with Sagas
 
Private Cloud Architecture
Private Cloud ArchitecturePrivate Cloud Architecture
Private Cloud Architecture
 
DDS Secure Intro
DDS Secure IntroDDS Secure Intro
DDS Secure Intro
 
CloudStack Architecture
CloudStack ArchitectureCloudStack Architecture
CloudStack Architecture
 
DDS on the Web: Quick Recipes for Real-Time Web Applications
DDS on the Web: Quick Recipes for Real-Time Web ApplicationsDDS on the Web: Quick Recipes for Real-Time Web Applications
DDS on the Web: Quick Recipes for Real-Time Web Applications
 
Domain Driven Design Development Spring Portfolio
Domain Driven Design Development Spring PortfolioDomain Driven Design Development Spring Portfolio
Domain Driven Design Development Spring Portfolio
 
What's next in edge computing?
What's next in edge computing?What's next in edge computing?
What's next in edge computing?
 
Communication Patterns Using Data-Centric Publish/Subscribe
Communication Patterns Using Data-Centric Publish/SubscribeCommunication Patterns Using Data-Centric Publish/Subscribe
Communication Patterns Using Data-Centric Publish/Subscribe
 
Partner Briefing_January 25 (FINAL).pptx
Partner Briefing_January 25 (FINAL).pptxPartner Briefing_January 25 (FINAL).pptx
Partner Briefing_January 25 (FINAL).pptx
 
MicroService Architecture
MicroService ArchitectureMicroService Architecture
MicroService Architecture
 
Dell Technologies - The Complete ISG Hardware Portfolio
Dell Technologies - The Complete ISG Hardware PortfolioDell Technologies - The Complete ISG Hardware Portfolio
Dell Technologies - The Complete ISG Hardware Portfolio
 
Internet of Things
Internet of ThingsInternet of Things
Internet of Things
 

Viewers also liked

Viewers also liked (20)

DDS In Action Part II
DDS In Action Part IIDDS In Action Part II
DDS In Action Part II
 
Microservices Architecture with Vortex — Part II
Microservices Architecture with Vortex — Part IIMicroservices Architecture with Vortex — Part II
Microservices Architecture with Vortex — Part II
 
The Cloudy, Foggy and Misty Internet of Things -- Toward Fluid IoT Architect...
The Cloudy, Foggy and Misty Internet of Things --  Toward Fluid IoT Architect...The Cloudy, Foggy and Misty Internet of Things --  Toward Fluid IoT Architect...
The Cloudy, Foggy and Misty Internet of Things -- Toward Fluid IoT Architect...
 
Building IoT Applications with Vortex and the Intel Edison Starter Kit
Building IoT Applications with Vortex and the Intel Edison Starter KitBuilding IoT Applications with Vortex and the Intel Edison Starter Kit
Building IoT Applications with Vortex and the Intel Edison Starter Kit
 
DDS in Action -- Part I
DDS in Action -- Part IDDS in Action -- Part I
DDS in Action -- Part I
 
DDS and OPC UA Explained
DDS and OPC UA ExplainedDDS and OPC UA Explained
DDS and OPC UA Explained
 
Vortex 2.0 -- The Industrial Internet of Things Platform
Vortex 2.0 -- The Industrial Internet of Things PlatformVortex 2.0 -- The Industrial Internet of Things Platform
Vortex 2.0 -- The Industrial Internet of Things Platform
 
Fluid IoT Architectures
Fluid IoT ArchitecturesFluid IoT Architectures
Fluid IoT Architectures
 
Fog Computing with Vortex
Fog Computing with VortexFog Computing with Vortex
Fog Computing with Vortex
 
Happy 2016!
Happy 2016!Happy 2016!
Happy 2016!
 
Delivering with Microservices - How to Iterate Towards Sophistication
Delivering with Microservices - How to Iterate Towards SophisticationDelivering with Microservices - How to Iterate Towards Sophistication
Delivering with Microservices - How to Iterate Towards Sophistication
 
DDS Security
DDS SecurityDDS Security
DDS Security
 
DDS: The IoT Data Sharing Standard
DDS: The IoT Data Sharing StandardDDS: The IoT Data Sharing Standard
DDS: The IoT Data Sharing Standard
 
Connected Mobile and Web Applications with Vortex
Connected Mobile and Web Applications with VortexConnected Mobile and Web Applications with Vortex
Connected Mobile and Web Applications with Vortex
 
IoT Protocols Integration with Vortex Gateway
IoT Protocols Integration with Vortex GatewayIoT Protocols Integration with Vortex Gateway
IoT Protocols Integration with Vortex Gateway
 
The Data Distribution Service: The Communication Middleware Fabric for Scala...
The Data Distribution Service: The Communication  Middleware Fabric for Scala...The Data Distribution Service: The Communication  Middleware Fabric for Scala...
The Data Distribution Service: The Communication Middleware Fabric for Scala...
 
Getting Started with Vortex
Getting Started with VortexGetting Started with Vortex
Getting Started with Vortex
 
Smart, Secure and Efficient Data Sharing in IoT
Smart, Secure and Efficient Data Sharing in IoTSmart, Secure and Efficient Data Sharing in IoT
Smart, Secure and Efficient Data Sharing in IoT
 
DDS vs DDS4CCM
DDS vs DDS4CCMDDS vs DDS4CCM
DDS vs DDS4CCM
 
Adventures with Microservices
Adventures with MicroservicesAdventures with Microservices
Adventures with Microservices
 

Similar to Micro services Architecture with Vortex -- Part I

Cloud computing
Cloud computingCloud computing
Cloud computing
shethzaid
 
What Is Openstack And Its Importance
What Is Openstack And Its ImportanceWhat Is Openstack And Its Importance
What Is Openstack And Its Importance
Lorie Harris
 

Similar to Micro services Architecture with Vortex -- Part I (20)

Microservices
MicroservicesMicroservices
Microservices
 
Microservices architecture enterprise architecture
Microservices architecture enterprise architectureMicroservices architecture enterprise architecture
Microservices architecture enterprise architecture
 
Using patterns and pattern languages to make better architectural decisions
Using patterns and pattern languages to make better architectural decisions Using patterns and pattern languages to make better architectural decisions
Using patterns and pattern languages to make better architectural decisions
 
Cloud computing
Cloud computingCloud computing
Cloud computing
 
Microservices and modern backends - Azure Meetup Frankfurt
Microservices and modern backends  - Azure Meetup FrankfurtMicroservices and modern backends  - Azure Meetup Frankfurt
Microservices and modern backends - Azure Meetup Frankfurt
 
Design & Development of a Trustworthy and Secure Billing System for Cloud Com...
Design & Development of a Trustworthy and Secure Billing System for Cloud Com...Design & Development of a Trustworthy and Secure Billing System for Cloud Com...
Design & Development of a Trustworthy and Secure Billing System for Cloud Com...
 
A017620123
A017620123A017620123
A017620123
 
Understanding Cloud Computing
Understanding Cloud ComputingUnderstanding Cloud Computing
Understanding Cloud Computing
 
Trustworthy service oriented architecture and platform for cloud computing (2...
Trustworthy service oriented architecture and platform for cloud computing (2...Trustworthy service oriented architecture and platform for cloud computing (2...
Trustworthy service oriented architecture and platform for cloud computing (2...
 
Essay On Workplace Telecommunications
Essay On Workplace TelecommunicationsEssay On Workplace Telecommunications
Essay On Workplace Telecommunications
 
Cloud Module 1.pptx
Cloud Module 1.pptxCloud Module 1.pptx
Cloud Module 1.pptx
 
Introduction to Cloud Computing.pptx
Introduction to Cloud Computing.pptxIntroduction to Cloud Computing.pptx
Introduction to Cloud Computing.pptx
 
Design Patterns for Micro Service Architecture
Design Patterns for Micro Service ArchitectureDesign Patterns for Micro Service Architecture
Design Patterns for Micro Service Architecture
 
Core of Cloud Computing
Core of Cloud ComputingCore of Cloud Computing
Core of Cloud Computing
 
Microservices Architecture - Cloud Native Apps
Microservices Architecture - Cloud Native AppsMicroservices Architecture - Cloud Native Apps
Microservices Architecture - Cloud Native Apps
 
What Is Openstack And Its Importance
What Is Openstack And Its ImportanceWhat Is Openstack And Its Importance
What Is Openstack And Its Importance
 
Cloudmod4
Cloudmod4Cloudmod4
Cloudmod4
 
Cloud Computing_2015_03_05
Cloud Computing_2015_03_05Cloud Computing_2015_03_05
Cloud Computing_2015_03_05
 
An Overview on Security Issues in Cloud Computing
An Overview on Security Issues in Cloud ComputingAn Overview on Security Issues in Cloud Computing
An Overview on Security Issues in Cloud Computing
 
Falcon Security Essay
Falcon Security EssayFalcon Security Essay
Falcon Security Essay
 

More from Angelo Corsaro

More from Angelo Corsaro (20)

Zenoh: The Genesis
Zenoh: The GenesisZenoh: The Genesis
Zenoh: The Genesis
 
zenoh: The Edge Data Fabric
zenoh: The Edge Data Fabriczenoh: The Edge Data Fabric
zenoh: The Edge Data Fabric
 
Zenoh Tutorial
Zenoh TutorialZenoh Tutorial
Zenoh Tutorial
 
Data Decentralisation: Efficiency, Privacy and Fair Monetisation
Data Decentralisation: Efficiency, Privacy and Fair MonetisationData Decentralisation: Efficiency, Privacy and Fair Monetisation
Data Decentralisation: Efficiency, Privacy and Fair Monetisation
 
zenoh: zero overhead pub/sub store/query compute
zenoh: zero overhead pub/sub store/query computezenoh: zero overhead pub/sub store/query compute
zenoh: zero overhead pub/sub store/query compute
 
zenoh -- the ZEro Network OverHead protocol
zenoh -- the ZEro Network OverHead protocolzenoh -- the ZEro Network OverHead protocol
zenoh -- the ZEro Network OverHead protocol
 
zenoh -- the ZEro Network OverHead protocol
zenoh -- the ZEro Network OverHead protocolzenoh -- the ZEro Network OverHead protocol
zenoh -- the ZEro Network OverHead protocol
 
Breaking the Edge -- A Journey Through Cloud, Edge and Fog Computing
Breaking the Edge -- A Journey Through Cloud, Edge and Fog ComputingBreaking the Edge -- A Journey Through Cloud, Edge and Fog Computing
Breaking the Edge -- A Journey Through Cloud, Edge and Fog Computing
 
Eastern Sicily
Eastern SicilyEastern Sicily
Eastern Sicily
 
fog05: The Fog Computing Infrastructure
fog05: The Fog Computing Infrastructurefog05: The Fog Computing Infrastructure
fog05: The Fog Computing Infrastructure
 
Cyclone DDS: Sharing Data in the IoT Age
Cyclone DDS: Sharing Data in the IoT AgeCyclone DDS: Sharing Data in the IoT Age
Cyclone DDS: Sharing Data in the IoT Age
 
fog05: The Fog Computing Platform
fog05: The Fog Computing Platformfog05: The Fog Computing Platform
fog05: The Fog Computing Platform
 
Programming in Scala - Lecture Four
Programming in Scala - Lecture FourProgramming in Scala - Lecture Four
Programming in Scala - Lecture Four
 
Programming in Scala - Lecture Three
Programming in Scala - Lecture ThreeProgramming in Scala - Lecture Three
Programming in Scala - Lecture Three
 
Programming in Scala - Lecture Two
Programming in Scala - Lecture TwoProgramming in Scala - Lecture Two
Programming in Scala - Lecture Two
 
Programming in Scala - Lecture One
Programming in Scala - Lecture OneProgramming in Scala - Lecture One
Programming in Scala - Lecture One
 
Data Sharing in Extremely Resource Constrained Envionrments
Data Sharing in Extremely Resource Constrained EnvionrmentsData Sharing in Extremely Resource Constrained Envionrments
Data Sharing in Extremely Resource Constrained Envionrments
 
RUSTing -- Partially Ordered Rust Programming Ruminations
RUSTing -- Partially Ordered Rust Programming RuminationsRUSTing -- Partially Ordered Rust Programming Ruminations
RUSTing -- Partially Ordered Rust Programming Ruminations
 
Vortex II -- The Industrial IoT Connectivity Standard
Vortex II -- The  Industrial IoT  Connectivity StandardVortex II -- The  Industrial IoT  Connectivity Standard
Vortex II -- The Industrial IoT Connectivity Standard
 
Fog Computing Defined
Fog Computing DefinedFog Computing Defined
Fog Computing Defined
 

Recently uploaded

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Recently uploaded (20)

Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 

Micro services Architecture with Vortex -- Part I

  • 2. Microservice architectures are one of the latest buzz in software architectures Let’s try to understand what microservices are and how to build microservice architectures
  • 3. microserviceS “Microservices are small, autonomous services that work together.” [1]
  • 4. microservice Architectural style “The microservice architectural style is an approach to developing a single application as a suite of small services, each running in its own process and communicating with lightweight mechanisms.” [2]
  • 5. Monolith vs. microservice A good way of getting the gist of the microservice architectural style is to compare it to the more traditional monolithic approach
  • 7. Monolithic Architectures Traditional 3 -Tier architectures with decomposition based on Technology / Skills boundaries and modularisation based on libraries Client Tier (UI) Server Tier Data Tier
  • 8. Monolithic Architectures A monolithic applications merges multiple functionalities in the same executable Server Tier Process Functionality
  • 9. Challenges Scaling monolithic applications is challenging as we have just one degree of freedom to scale out The same challenge applies to replication Server Tier Load Balancer
  • 10. Server Tier Challenges Innovation is constrained by the fact that we cannot easily mix different technologies for implementing the various functionalities Same Technology Stack
  • 11. Server Tier Challenges Incremental Change is constrained by the fact that can’t incrementally deploy new functionalities . We need to redeploy an entire subsystem. Hard to hide internal details and limit dependencies
  • 12. Challenges Loose Coupling and High Cohesion are harder to achieve and especially to preserve as the “barriers” between functionalities are very thin Server Tier Module / Library Boundaries
  • 16. Server Tier Benefits Scaling microservice applications is easier as we can scale out individual functionalities
  • 17. Benefits Unconstrained Innovation as we choose the technologies stack that makes the most sense for implementing a given feature Server Tier Process Functionality
  • 18. Incremental Change is facilitated allowing incremental deployment of new functionalities. Potentially different version of the same micro service could be running at the same time! Benefits Server Tier Process Functionality
  • 19. Loose Coupling and High Cohesion are easier to achieved to preserve as the “barriers” between functionalities are very thick Server Tier Process Boundary / Share Nothing Benefits
  • 20. Performance of microservice architectures may be degraded by the higher cost of communication if the right technology is not used Server Tier Challenges Monolithic Implementation Microservice Implementation In-Process Communication Inter-Process/Host Communication
  • 21. Deployment and Operation of systems based on the microservice architectures is inherently more complex, especially at scale and when the right technologies are not used Server Tier Challenges Monolithic Implementation Microservice Implementation
  • 23. Identifying Microservices Microservices are supposed to capture business and not technical features of a system Microservices
  • 24. Identifying Microservices When a monolithic systems is already existing, micro services can be created by separating the various features Microservices
  • 25. When a system does not exist we can use the Bounded Context as defined in [3] System Objectives Microservices Identifying Microservices Bounded Context
  • 26. Bounded Context Domain-Driven Design (DDD) divides a complex domain into a series of Bounded Context. Where a context means a specific system responsibility, and a bounded context means that responsibility is enforced with explicit boundaries. Each bounded context has its own canonical model and communication between bounded context happens through a system- canonic al model
  • 27. Microservices are ideally mapped to Bounded Context. Each Bounded context has potentially its own canonical model Communication between Bounded Context uses the system-wide canonical model Microservices bounded context micro-service canonical model system canonical model
  • 28. A consequence of applying the Bounded Context technique is that data management in micro services architectures is decentralised Decentralised Data Management bounded context micro-service canonical model system canonical model
  • 29. Every microservice owns and manages its data without relying on a shared data-base. Consequently microservice architectures are build under eventual consistency assumptions Decentralised Data Management bounded context micro-service canonical model system canonical model
  • 30. Any organisation that designs a system (defined broadly) will produce a design whose structure is a copy of the organization's communication structure. — M. Conway, 1967 Conway’s Law
  • 31. Conway’s tells us that to be successful in applying microservice architectures we should have cross-functional teams organised around business capabilities Conway’s LAW Implications image curtesy of M. Fowler http://martinfowler.com/articles/microservices.html
  • 32. (This is an adaptation of a Figure from [1]) Microservices small autonomous services Modelled around business concepts Highly Automated Hide internal implementation details Decentralised Independent Deployment Failure Isolation Highly Observable Stateless
  • 35. Applications can autonomously and asynchronously read and write data enjoying spatial and temporal decoupling DDS Global Data Space ... Data Writer Data Writer Data Writer Data Reader Data Reader Data Reader Data Reader Data Writer TopicA QoS TopicB QoS TopicC QoS TopicD QoS Global Data Space
  • 36. Built-in dynamic discovery isolates applications from network topology and connectivity details DDS Global Data Space ... Data Writer Data Writer Data Writer Data Reader Data Reader Data Reader Data Reader Data Writer TopicA QoS TopicB QoS TopicC QoS TopicD QoS Dynamic Discovery
  • 37. Topic
  • 38. A domain-wide information’s class A Topic defined by means of a <name, type, qos> Topic DDS Global Data Space ... Data Writer Data Writer Data Writer Data Reader Data Reader Data Reader Data Reader Data Writer TopicA QoS TopicB QoS TopicC QoS TopicD QoS Topic Type Name QoS
  • 41. Topic types can be expressed using different syntaxes, including IDL and ProtoBuf Topic Type struct CarDynamics { string cid; long x; long y; float dx; long dy; } #pragma keylist CarDynamics cid IDL
  • 42. Topic types can be expressed using different syntaxes, including IDL and ProtoBuf Topic Type message CarDynamics { option (.omg.dds.type) = {name: "CarDynamics"}; required string cid = 0 [(.omg.dds.member).key = true]; required long x = 1; required long y = 2; required float dx = 3; required long dy = 4; } ProtoBuf
  • 44. Topic types can be expressed using different syntaxes, including IDL and ProtoBuf Topic Type class CarDynamics: constructor: (@cid, @x, @y, @dx, @dy) -> CoffeeScript
  • 45. Topic types can be expressed using different syntaxes, including IDL and ProtoBuf Topic Type public struct CaDynamics {
 public string cid { get; set; }
 public int x { get; set; }
 public int y { get; set; }
 public int dx { get; set; }
 public int dy { get; set; }
 
 public CaDynamics (string cid, int x, int y, int dx, int dy)
 {
 this.cid = cid;
 this.x = x; this.y = y;
 this.dx = dx; this.dy = dy;
 }
 }
 C#
  • 46. Topic types can be expressed using different syntaxes, including IDL and ProtoBuf Topic Type @KeyList ( topicType = "CarDynamics", keys = {"cid"})
 public class CarDynamics {
 public String cid;
 public int x; public int dx;
 public int y; public int dy;
 
 public CarDynamics(String s, int a, int b, int c,int d) {
 this.cid = s;
 this.x = a; this.dx = b;
 this.y = c; this.dy = d;
 }
 
 @Override
 public String toString() { …
 }
 
 }
 Java
  • 47. TopicA QoS TopicC QoS ... TopicB QoS TopicD QoS Partitions The Global Data Space can be divided in to arbitrary partitions The source and destination of data is identified by means of “Partition/Topic” expressions “Red” “Blue”
  • 48. QoS policies allow to express temporal and availability constraints for data DDS Global Data Space ... Data Writer Data Writer Data Writer Data Reader Data Reader Data Reader Data Reader Data Writer TopicA QoS TopicB QoS TopicC QoS TopicD QoS QoS - Enabled
  • 49. A collection of policies that control non- functional properties such as reliability, persistence, temporal constraints and priority QoS HISTORY LIFESPAN DURABILITY DEADLINE LATENCY BUDGET TRANSPORT PRIO TIME-BASED FILTER RESOURCE LIMITS USER DATA TOPIC DATA GROUP DATA OWENERSHIP OWN. STRENGTH LIVELINESS ENTITY FACTORY DW LIFECYCLE DR LIFECYCLE PRESENTATION RELIABILITY PARTITION DEST. ORDER RxO QoS Local QoS
  • 50. QoS Policies controlling end-to-end properties follow a Request vs. Offered QoS Domain Participant DURABILITY OWENERSHIP DEADLINE LATENCY BUDGET LIVELINESS RELIABILITY DEST. ORDER Publisher DataWriter PARTITION DataReader Subscriber Domain Participant offered QoS Topic writes reads Domain Id joins joins produces-in consumes-from RxO QoS Policies requested QoS
  • 52. Each Data Reader is associated with a Cache The Cache stores the last n∊𝜨∞ samples for each relevant instance Data Cache DataReader Cache DataReader ... Samples Instances Cache Where: 𝜨∞ =𝜨 ∪ {∞}
  • 53. The action of reading samples for a Reader Cache is non-destructive. Samples are not removed from the cache Reading Data DataReader Cache DataReader ... DataReader Cache DataReader ...read
  • 54. The action of taking samples for a Reader Cache is destructive. Samples are removed from the cache Taking Data DataReader Cache DataReader ... DataReader Cache DataReader ...take
  • 55. Samples can be selected using composable content and status predicates Sample Selectors DataReader Cache DataReader ...
  • 56. Filters allow to control what gets into a DataReader cache Filters are expressed as SQL where clauses or as Java/C/JavaScript predicates Content-Filtering DataReader Cache DataReader ... Filter Application Network
  • 57. Content Filters can be used to project on the local cache only the Topic data satisfying a given predicate Content Filters struct CarDynamics { @key string cid; long x; long y; float dx; long dy; } cid x y dx dy GR 33N GO 167 240 45 0 LO 00V IN 65 26 65 0 AN 637 OS 32 853 0 50 AB 123 CD 325 235 80 0 “dx > 50 OR dy > 50” Type CarDynamics cid x y dx dy LO 00V IN 65 26 65 0 AB 123 CD 325 235 80 0 Reader Cache
  • 58. Queries allow to control what gets out of a DataReader Cache Queries are expressed as SQL where clauses or as Java/C/JavaScript predicates Content-Based Selection DataReader Cache DataReader ... Query DataReader Cache DataReader ... Application Network
  • 59. Reader Cache Queries can be used to select out of the local cache the data matching a given predicate Queries struct CarDynamics { @key string cid; long x; long y; float dx; long dy; } cid x y dx dy GR 33N GO 167 240 45 0 LO 00V IN 65 26 65 0 AN 637 OS 32 853 0 50 AB 123 CD 325 235 80 0 “dx > 50 OR dy > 50” Type CarDynamics cid x y dx dy GR 33N GO 167 240 45 0 LO 00V IN 65 26 65 0 AN 637 OS 32 853 0 50 AB 123 CD 325 235 80 0 cid x y dx dy LO 00V IN 65 26 65 0 AB 123 CD 325 235 80 0 query
  • 60. State based selection allows to control what gets out of a DataReader Cache State base selectors predicate on samples meta- information State-Based Selection DataReader Cache DataReader ... State Selector DataReader Cache DataReader ... Application Network
  • 61. Selector Example // == ISO C++ DDS API == auto data = dr.select() .content(query) .state(data_state) .instance(handle) .read();
  • 64. CopyrightPrismTech,2015 Writing Data in C++ #include <dds.hpp> int main(int, char**) { DomainParticipant dp(0); Topic<Meter> topic(“SmartMeter”); Publisher pub(dp); DataWriter<Meter> dw(pub, topic); while (!done) { auto value = readMeter() dw.write(value); std::this_thread::sleep_for(SAMPLING_PERIOD); } return 0; } enum UtilityKind { ELECTRICITY, GAS, WATER }; struct Meter { string sn; UtilityKind utility; float reading; float error; }; #pragma keylist Meter sn
  • 65. CopyrightPrismTech,2015 Reading Data in C++ #include <dds.hpp> int main(int, char**) { DomainParticipant dp(0); Topic<Meter> topic(”SmartMeter”); Subscriber sub(dp); DataReader<Meter> dr(dp, topic); LambdaDataReaderListener<DataReader<Meter>> lst; lst.data_available = [](DataReader<Meter>& dr) { auto samples = data.read(); std::for_each(samples.begin(), samples.end(), [](Sample<Meter>& sample) { std::cout << sample.data() << std::endl; } } dr.listener(lst); // Print incoming data up to when the user does a Ctrl-C std::this_thread::join(); return 0; } enum UtilityKind { ELECTRICITY, GAS, WATER }; struct Meter { string sn; UtilityKind utility; float reading; float error; }; #pragma keylist Meter sn
  • 66. CopyrightPrismTech,2014 Writing Data in Scala import dds._
 import dds.prelude._
 import dds.config.DefaultEntities._
 object SmartMeter {
 
 def main(args: Array[String]): Unit = {
 val topic = Topic[Meter](“SmartMeter”)
 val dw = DataWriter[Meter](topic) while (!done) { val meter = readMeter()
 dw.write(meter) Thread.sleep(SAMPLING_PERIOD) }
 }
 } enum UtilityKind { ELECTRICITY, GAS, WATER }; struct Meter { string sn; UtilityKind utility; float reading; float error; }; #pragma keylist Meter sn
  • 67. CopyrightPrismTech,2014 Reading Data in Scala import dds._
 import dds.prelude._
 import dds.config.DefaultEntities._
 object SmartMeterLog {
 def main(args: Array[String]): Unit = {
 val topic = Topic[Meter](“SmartMeter”)
 val dr = DataReader[Meter](topic)
 dr listen {
 case DataAvailable(_) => dr.read.foreach(println)
 }
 }
 } enum UtilityKind { ELECTRICITY, GAS, WATER }; struct Meter { string sn; UtilityKind utility; float reading; float error; }; #pragma keylist Meter sn
  • 68. CopyrightPrismTech,2015 Writing Data in Python import dds import time
 
 if __name__ == '__main__':
 topic = dds.Topic("SmartMeter", "Meter")
 dw = dds.Writer(topic)
 
 while True:
 m = readMeter()
 dw.write(m)
 time.sleep(0.1) enum UtilityKind { ELECTRICITY, GAS, WATER }; struct Meter { string sn; UtilityKind utility; float reading; float error; }; #pragma keylist Meter sn
  • 69. CopyrightPrismTech,2015 Reading Data in Python import dds
 import sys
 
 def readData(dr): 
 samples = dds.range(dr.read())
 for s in samples:
 sys.stdout.write(str(s.getData()))
 
 if __name__ == '__main__':
 t = dds.Topic("SmartMeter", "Meter")
 dr = dds.Reader(t)
 dr.onDataAvailable = readData enum UtilityKind { ELECTRICITY, GAS, WATER }; struct Meter { string sn; UtilityKind utility; float reading; float error; }; #pragma keylist Meter sn
  • 71. Device implementations optimised for OT, IT and consumer platforms Native support for Cloud and Fog Computing Architectures Device-2-DeviceDevice-2-Cloud Fog-2-Cloud Device-2-Fog Cloud-2-Cloud Fog-2-Fog infrastructuresdk
  • 73. Microservices are ideally mapped to Bounded Context. Each Bounded context has potentially its own canonical model Communication between Bounded Context uses the system-wide canonical model Bounded context bounded context micro-service Vortex Data Model system canonical Vortex Data model
  • 74. micro-service partition system partition micro-service data model system (inter- svc) data model
  • 77. The relevant portion of the data space is projected on the application address space. Each typed projection is commonly called a Cache No single point of failure or bottleneck No central server to configure/ manage Decentralised Data Space Data Writer Data Writer Data Writer Data Reader Data Reader Data Reader Data Writer TopicA QoS TopicB QoS TopicC QoS TopicD QoS TopicD QoS TopicD QoS TopicA QoS
  • 79. Vortex provides a high performance distributed durability service that can be used to achieve different level of temporal decoupling Durability Services take ownership for “Partition/Topic “ expressions Distributed Durability
  • 81. High Performance 30 μs peer-to-peer latency 7 μs inter-core latency 4+ Mmsgs/sec p2p throughput Device-2-DeviceDevice-2-Cloud Fog-2-Cloud Device-2-Fog Cloud-2-Cloud Fog-2-Fog infrastructuresdk
  • 82. <10 μs fog/cloud routing latency High Performance Device-2-DeviceDevice-2-Cloud Fog-2-Cloud Device-2-Fog Cloud-2-Cloud Fog-2-Fog infrastructuresdk
  • 84. Microservice deployment The common guideline for Microservices is to deploy them across different hosts to limit the impact of a failing machine
  • 85. Microservice deployment The one micro-service per host rule can be constraining in terms of performance
  • 86. Microservice deployment Vortex location transparency and intra-host communication optimisation allow to exploit the benefits of micro-service architectures without major performance costs Ultra-Low Latency Inter-Process Comm
  • 88. Vortex is a Polyglot and Interoperable across Programming Languages Device-2-DeviceDevice-2-Cloud Fog-2-Cloud Device-2-Fog Cloud-2-Cloud Fog-2-Fog infrastructuresdk
  • 89. Fully Independent of the Cloud Infrastructure Private Clouds Device-2-DeviceDevice-2-Cloud Fog-2-Cloud Device-2-Fog Cloud-2-Cloud Fog-2-Fog infrastructuresdk
  • 90. Native Integration with the hottest real-time analytics platforms and CEP Device-2-DeviceDevice-2-Cloud Fog-2-Cloud Device-2-Fog Cloud-2-Cloud Fog-2-Fog infrastructuresdk
  • 91. Integration with mainstream Dashboard Technologies Device-2-DeviceDevice-2-Cloud Fog-2-Cloud Device-2-Fog Cloud-2-Cloud Fog-2-Fog infrastructuresdk
  • 93. Timeout As a general rule Vortex APIs are non-blocking Blocking API calls are all equipped with timeout #include <dds.hpp> int main(int, char**) { DomainParticipant dp(0); Topic<Meter> topic(“SmartMeter”); Publisher pub(dp); DataWriter<Meter> dw(pub, topic); while (!done) { auto value = readMeter() dw.write(value); std::this_thread::sleep_for(SAMPLING_PERIOD); } return 0; }
  • 94. Worker Pattern Vortex provides several ways of supporting the worker pattern
  • 95. CIRCUIT BREAKER Vortex communications primitive implement the circuit breaker pattern thus reducing the complexity of adopting it
  • 96. Microservices architectures bring several architectural benefits Vortex ensures that the operational and performance cost of adopting micro services architectures if minimised In Summary
  • 97. [1] S. Newman. Building Microservices. [2] M. Fowler, J. Lewis. Microservices [3] E. Evans, Domain-Driven Design