SlideShare ist ein Scribd-Unternehmen logo
1 von 115
The Architect ’ s Two Hats Ben Stopford Architect High Performance Computing RBS
Once upon a time
In a land far far away
There was a designer
 
And an architect
 
And they didn ’t really get on
OK – that ’s not entirely true – but they have competing objectives
This is the story of the architect ’s two hats
So what are the two hats all about?
Design ,[object Object],[object Object],[object Object],[object Object]
Architecture ,[object Object],[object Object],[object Object],[object Object]
So lets look at how design works in industry
We ’ ll look at architecture for performance a bit later, right now lets look at design
Software Design
Why do we need to worry about Design? ,[object Object],[object Object],[object Object]
So how to we avoid this?
We design our solution well so that it is easy to understand and change
And we all know how to do that right? I ’ m going to play with you a bit now….
We Design our System Up Front
…  with UML
AND… We get to spot problems early on in the project lifecycle.  Why is that advantageous?
Why? Because it costs less to get the design right early on, see: Low cost of change early in lifecycle
So we have a plan for how to build our application before we start coding.  All we need to do is follow the plan!!
Well….. That ’s what we used to do… … but problems kept cropping up…
It was really hard to get the design right up front. ,[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object]
Ahhh, those pesky users, why can ’t they make up their minds?
So… …in summary…
We find designing up front hard…
...and a bit bureaucratic
… and when we do get it right the users generally go and change the requirements…
… and it all changes in the next release anyway.
So are we taking the right approach
Software is supposed to be soft. That means it is supposed to be easy to change.
So is fixing the design up front the right way to do it?
But we ’ve seen that changing the design later in the project life cycle is expensive!
So does the cost curve have to look like this?
Can we design our systems so that we CAN change them later in the lifecycle?
The Cost of Change in an  Agile  application
How
By designing for change ** But not designing for any specific changes  *** And writing lots and lots of tests
Agile Development facilitates this Code Base Test Test Test
Dynamic Design ,[object Object],[object Object],[object Object]
This means that your system ’s design will constantly evolve.
So what does this imply for the Designer?
It implies that the designer must  constantly  steer the application so that it remains  easy to understand  and  easy to change .
With everyone being responsible for the design.
So the designers role becomes about steering the applications design through others.
Shepherding the team!
Shepherding the team ,[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object]
Now we can switch to the architects hat.
Architecting for performance And why it can fight against good design
If speed is going to be a problem…. Then evolutionary design alone may not work
We need to seed the design with clever architectural decisions to ensure we get the speed we need
We use patterns and frameworks that increase speed But often at the expense of a clear programming model. i.e. these patterns can obfuscate the implementation.
How it fits together: A project timeline Set-up Architecture Design: Push patterns and reuse etc Amend Architecture
So lets look at how we architect for speed
Load Balancing ,[object Object]
Load Balancing: Horizontal Scalability
Load balancing is great way to get horizontal scalability without affecting the programming model much!!
But it is limited by the time taken for a single request i.e. it allows us to handle more load, but does not allow us to reduce the time taken to execute single process
What if we want to make a single (possibly long running) processes faster? Lets look at an example
Sum the numbers between 1 and 10,000,000 int total for (n =1 to 10,000,000){ total+=n } A service has a hard limit on how fast it can execute this, defined by it ’s clock speed.  Load balancing won ’t speed this up.
How do we speed this up programming in process intensive cases? ,[object Object]
Make it faster, using threads and multiple cores ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Larger Machines - Azul ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
This is scaling up
But it costs
But we can also scale out. i.e. lots of normal hardware linked together
Scaling Out is Cost Effective Scaling out is much more cost effective per teraflop than scaling up.
But it adds complexity to the programming model
Key Point: Role of an Architect is to construct and application that performs - that often means a distributed system Distributed Systems can be much harder to manage than those that run on a single machine Why?
Because standard computing models don ’t work in a distributed world.
The Trials of Distributed Computing
As we distribute our application across multiple machines, complexity is moved from hardware to software.
The major problem is the lack of fast shared memory
Why? ,[object Object],[object Object],You cannot abstract such latencies away. (why not?) You must architect around them.
We can ’t ignore ‘wire’ time. We need to make sure programmers think about it.
The complexity of shared memory has been moved from the hardware domain to the software domain. Simple problems like accessing other objects are now more time consuming
But lets step back a little and look at why we need to distribute processing
Sum the numbers between 1 and 10,000,000 int total for (n =1 to 10,000,000){ total+=n } A service has a hard limit on how fast it can execute this
To execute faster: batch for parallel execution ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Leads to concept of Grid Computing ,[object Object],[object Object]
Parallel execution on a grid Server Grid node Grid node Grid node Grid node Send code + data Receive result Code + data (1) Code + data (2) Code + data (3) Code + data (4) Processing time is 4 x synchronous case (assuming processing time >> wire time)
Grid computing solves the processing problem. i.e. we can do complex computations very quickly by doing them in parallel.
But it complicates the programming model
Example: Report Generation for (Report report : reports){ Data data = getDataFromDB(report); format(data); present(data); }
... so visually... Get data DB Format Present Loop For n
...but on the grid... Start DB Format Present Loop n times Grid Runner Asynchronous Synchronous Grid Callback Grid
Note how this muddles the design A simple loop has become a set of distributed invocations and asynchronous call backs.
Grids allow us to process computations quickly through parallelism. But this leads to the problem getting fast enough access to the data we want to operate on
Problems With Data Bottlenecks ,[object Object],[object Object],[object Object]
Why is the database a bottleneck? Server Grid node Grid node Grid node Grid node Send code Receive result Database Get data
Databases are slow(ish*) ,[object Object],[object Object],[object Object]
We can scale up by using memory not disk Memory access is much faster than disk access.
In memory databases ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
But Single Machine Data Stores Don ’t Scale, even if they are in memory Server Grid node Grid node Grid node Grid node Send code Receive result In Memory  Database Get data BOTTLENECK
What we need is a distributed data source? Welcome to the world of distributed caching
Distributed Caching Solves This Problem by Splitting The Data Over All Servers 1/5 data 1/5 data 1/5 data 1/5 data 1/5 data Client Client Client Client This is parallel processing for data access. Data requests are split across multiple machines.
Now we have removed the data bottleneck Server Grid node Grid node Grid node Grid node (1) Send  code (2) Receive result Data Fabric 1/6 1/6 1/6 1/6 1/6 1/6
This gives us access to a fast shared memory across multiple machines
We are now massively parallel With lightning fast data access.
But we can get faster than this. How?? Server Grid node Grid node Grid node Grid node (1) Send  code (2) Receive result Data Fabric 1/6 1/6 1/6 1/6 1/6 1/6
Superimpose compute and data fabrics into one entity Data Fabric 1/6 1/6 1/6 1/6 1/6 1/6 Server (1) Send  code (2) Receive result
So to speed up a system ,[object Object],[object Object],[object Object]
So remember the two hats
[object Object],[object Object]
[object Object],[object Object],[object Object]
The trick is balancing them!  How much architecture is enough?
But fundamentally, you need them both!
Thanks Slides:  http://www.BenStopford.com Vacation Placements:  [email_address]

Weitere ähnliche Inhalte

Was ist angesagt?

Balancing Replication and Partitioning in a Distributed Java Database
Balancing Replication and Partitioning in a Distributed Java DatabaseBalancing Replication and Partitioning in a Distributed Java Database
Balancing Replication and Partitioning in a Distributed Java DatabaseBen Stopford
 
Architecting for the cloud elasticity security
Architecting for the cloud elasticity securityArchitecting for the cloud elasticity security
Architecting for the cloud elasticity securityLen Bass
 
Load balancing theory and practice
Load balancing theory and practiceLoad balancing theory and practice
Load balancing theory and practiceFoundationDB
 
Event Driven-Architecture from a Scalability perspective
Event Driven-Architecture from a Scalability perspectiveEvent Driven-Architecture from a Scalability perspective
Event Driven-Architecture from a Scalability perspectiveJonas Bonér
 
Patterns of enterprise application architecture
Patterns of enterprise application architecturePatterns of enterprise application architecture
Patterns of enterprise application architectureChinh Ngo Nguyen
 
Architecting for Change: An Agile Approach
Architecting for Change: An Agile ApproachArchitecting for Change: An Agile Approach
Architecting for Change: An Agile ApproachBen Stopford
 
Select Stars: A DBA's Guide to Azure Cosmos DB (Chicago Suburban SQL Server U...
Select Stars: A DBA's Guide to Azure Cosmos DB (Chicago Suburban SQL Server U...Select Stars: A DBA's Guide to Azure Cosmos DB (Chicago Suburban SQL Server U...
Select Stars: A DBA's Guide to Azure Cosmos DB (Chicago Suburban SQL Server U...Bob Pusateri
 
Error in hadoop
Error in hadoopError in hadoop
Error in hadoopLen Bass
 
Webinar: Eventual Consistency != Hopeful Consistency
Webinar: Eventual Consistency != Hopeful ConsistencyWebinar: Eventual Consistency != Hopeful Consistency
Webinar: Eventual Consistency != Hopeful ConsistencyDataStax
 
Azure Cloud Patterns
Azure Cloud PatternsAzure Cloud Patterns
Azure Cloud PatternsTamir Dresher
 
Design principles of scalable, distributed systems
Design principles of scalable, distributed systemsDesign principles of scalable, distributed systems
Design principles of scalable, distributed systemsTinniam V Ganesh (TV)
 
Distributed systems and consistency
Distributed systems and consistencyDistributed systems and consistency
Distributed systems and consistencyseldo
 
Vertical vs Horizontal Scaling
Vertical vs Horizontal Scaling Vertical vs Horizontal Scaling
Vertical vs Horizontal Scaling Mark Myers
 
RedisConf18 - Techniques for Synchronizing In-Memory Caches with Redis
RedisConf18 - Techniques for Synchronizing In-Memory Caches with RedisRedisConf18 - Techniques for Synchronizing In-Memory Caches with Redis
RedisConf18 - Techniques for Synchronizing In-Memory Caches with RedisRedis Labs
 
What to consider when monitoring microservices
What to consider when monitoring microservicesWhat to consider when monitoring microservices
What to consider when monitoring microservicesParticular Software
 
Scalable Web Architecture and Distributed Systems
Scalable Web Architecture and Distributed SystemsScalable Web Architecture and Distributed Systems
Scalable Web Architecture and Distributed Systemshyun soomyung
 

Was ist angesagt? (20)

Balancing Replication and Partitioning in a Distributed Java Database
Balancing Replication and Partitioning in a Distributed Java DatabaseBalancing Replication and Partitioning in a Distributed Java Database
Balancing Replication and Partitioning in a Distributed Java Database
 
Architecting for the cloud elasticity security
Architecting for the cloud elasticity securityArchitecting for the cloud elasticity security
Architecting for the cloud elasticity security
 
Load balancing theory and practice
Load balancing theory and practiceLoad balancing theory and practice
Load balancing theory and practice
 
Event Driven-Architecture from a Scalability perspective
Event Driven-Architecture from a Scalability perspectiveEvent Driven-Architecture from a Scalability perspective
Event Driven-Architecture from a Scalability perspective
 
Patterns of enterprise application architecture
Patterns of enterprise application architecturePatterns of enterprise application architecture
Patterns of enterprise application architecture
 
Architecting for Change: An Agile Approach
Architecting for Change: An Agile ApproachArchitecting for Change: An Agile Approach
Architecting for Change: An Agile Approach
 
Select Stars: A DBA's Guide to Azure Cosmos DB (Chicago Suburban SQL Server U...
Select Stars: A DBA's Guide to Azure Cosmos DB (Chicago Suburban SQL Server U...Select Stars: A DBA's Guide to Azure Cosmos DB (Chicago Suburban SQL Server U...
Select Stars: A DBA's Guide to Azure Cosmos DB (Chicago Suburban SQL Server U...
 
NoSQL and ACID
NoSQL and ACIDNoSQL and ACID
NoSQL and ACID
 
Error in hadoop
Error in hadoopError in hadoop
Error in hadoop
 
Webinar: Eventual Consistency != Hopeful Consistency
Webinar: Eventual Consistency != Hopeful ConsistencyWebinar: Eventual Consistency != Hopeful Consistency
Webinar: Eventual Consistency != Hopeful Consistency
 
CQRS & EVS with MongoDb
CQRS & EVS with MongoDbCQRS & EVS with MongoDb
CQRS & EVS with MongoDb
 
Azure Cloud Patterns
Azure Cloud PatternsAzure Cloud Patterns
Azure Cloud Patterns
 
CQRS
CQRSCQRS
CQRS
 
Design principles of scalable, distributed systems
Design principles of scalable, distributed systemsDesign principles of scalable, distributed systems
Design principles of scalable, distributed systems
 
Distributed systems and consistency
Distributed systems and consistencyDistributed systems and consistency
Distributed systems and consistency
 
Azure and cloud design patterns
Azure and cloud design patternsAzure and cloud design patterns
Azure and cloud design patterns
 
Vertical vs Horizontal Scaling
Vertical vs Horizontal Scaling Vertical vs Horizontal Scaling
Vertical vs Horizontal Scaling
 
RedisConf18 - Techniques for Synchronizing In-Memory Caches with Redis
RedisConf18 - Techniques for Synchronizing In-Memory Caches with RedisRedisConf18 - Techniques for Synchronizing In-Memory Caches with Redis
RedisConf18 - Techniques for Synchronizing In-Memory Caches with Redis
 
What to consider when monitoring microservices
What to consider when monitoring microservicesWhat to consider when monitoring microservices
What to consider when monitoring microservices
 
Scalable Web Architecture and Distributed Systems
Scalable Web Architecture and Distributed SystemsScalable Web Architecture and Distributed Systems
Scalable Web Architecture and Distributed Systems
 

Andere mochten auch

Building Event-Driven Services with Apache Kafka
Building Event-Driven Services with Apache KafkaBuilding Event-Driven Services with Apache Kafka
Building Event-Driven Services with Apache Kafkaconfluent
 
Strata+Hadoop 2017 San Jose: Lessons from a year of supporting Apache Kafka
Strata+Hadoop 2017 San Jose: Lessons from a year of supporting Apache KafkaStrata+Hadoop 2017 San Jose: Lessons from a year of supporting Apache Kafka
Strata+Hadoop 2017 San Jose: Lessons from a year of supporting Apache Kafkaconfluent
 
Strata+Hadoop 2017 San Jose - The Rise of Real Time: Apache Kafka and the Str...
Strata+Hadoop 2017 San Jose - The Rise of Real Time: Apache Kafka and the Str...Strata+Hadoop 2017 San Jose - The Rise of Real Time: Apache Kafka and the Str...
Strata+Hadoop 2017 San Jose - The Rise of Real Time: Apache Kafka and the Str...confluent
 
Monitoring Apache Kafka with Confluent Control Center
Monitoring Apache Kafka with Confluent Control Center   Monitoring Apache Kafka with Confluent Control Center
Monitoring Apache Kafka with Confluent Control Center confluent
 
Distributed stream processing with Apache Kafka
Distributed stream processing with Apache KafkaDistributed stream processing with Apache Kafka
Distributed stream processing with Apache Kafkaconfluent
 
Data Pipelines Made Simple with Apache Kafka
Data Pipelines Made Simple with Apache KafkaData Pipelines Made Simple with Apache Kafka
Data Pipelines Made Simple with Apache Kafkaconfluent
 
Power of the Log: LSM & Append Only Data Structures
Power of the Log: LSM & Append Only Data StructuresPower of the Log: LSM & Append Only Data Structures
Power of the Log: LSM & Append Only Data Structuresconfluent
 

Andere mochten auch (8)

Building Event-Driven Services with Apache Kafka
Building Event-Driven Services with Apache KafkaBuilding Event-Driven Services with Apache Kafka
Building Event-Driven Services with Apache Kafka
 
Strata+Hadoop 2017 San Jose: Lessons from a year of supporting Apache Kafka
Strata+Hadoop 2017 San Jose: Lessons from a year of supporting Apache KafkaStrata+Hadoop 2017 San Jose: Lessons from a year of supporting Apache Kafka
Strata+Hadoop 2017 San Jose: Lessons from a year of supporting Apache Kafka
 
JAX London Slides
JAX London SlidesJAX London Slides
JAX London Slides
 
Strata+Hadoop 2017 San Jose - The Rise of Real Time: Apache Kafka and the Str...
Strata+Hadoop 2017 San Jose - The Rise of Real Time: Apache Kafka and the Str...Strata+Hadoop 2017 San Jose - The Rise of Real Time: Apache Kafka and the Str...
Strata+Hadoop 2017 San Jose - The Rise of Real Time: Apache Kafka and the Str...
 
Monitoring Apache Kafka with Confluent Control Center
Monitoring Apache Kafka with Confluent Control Center   Monitoring Apache Kafka with Confluent Control Center
Monitoring Apache Kafka with Confluent Control Center
 
Distributed stream processing with Apache Kafka
Distributed stream processing with Apache KafkaDistributed stream processing with Apache Kafka
Distributed stream processing with Apache Kafka
 
Data Pipelines Made Simple with Apache Kafka
Data Pipelines Made Simple with Apache KafkaData Pipelines Made Simple with Apache Kafka
Data Pipelines Made Simple with Apache Kafka
 
Power of the Log: LSM & Append Only Data Structures
Power of the Log: LSM & Append Only Data StructuresPower of the Log: LSM & Append Only Data Structures
Power of the Log: LSM & Append Only Data Structures
 

Ähnlich wie The Architect's Two Hats

Agile architectures in a modern cloud-native ecosystem
Agile architectures in a modern cloud-native ecosystemAgile architectures in a modern cloud-native ecosystem
Agile architectures in a modern cloud-native ecosystemTurja Narayan Chaudhuri
 
Agile Architecture in a Modern Cloud-Native Ecosystem
Agile Architecture in a Modern Cloud-Native EcosystemAgile Architecture in a Modern Cloud-Native Ecosystem
Agile Architecture in a Modern Cloud-Native EcosystemCloud Study Network
 
CQRS recipes or how to cook your architecture
CQRS recipes or how to cook your architectureCQRS recipes or how to cook your architecture
CQRS recipes or how to cook your architectureThomas Jaskula
 
How do we drive tech changes
How do we drive tech changesHow do we drive tech changes
How do we drive tech changesJaewoo Ahn
 
Cloud lunchn learn_howtobecomeacloudarchitect_part1
Cloud lunchn learn_howtobecomeacloudarchitect_part1Cloud lunchn learn_howtobecomeacloudarchitect_part1
Cloud lunchn learn_howtobecomeacloudarchitect_part1Turja Narayan Chaudhuri
 
Evolving your api architecture with the strangler pattern
Evolving your api architecture with the strangler patternEvolving your api architecture with the strangler pattern
Evolving your api architecture with the strangler patterndwcarter74
 
No silver bullet summary (paper)
No silver bullet summary (paper)No silver bullet summary (paper)
No silver bullet summary (paper)shakeel khan
 
Why computer programming
Why computer programmingWhy computer programming
Why computer programmingTUOS-Sam
 
Cloud computing - an architect's perspective
Cloud computing - an architect's perspectiveCloud computing - an architect's perspective
Cloud computing - an architect's perspectiveHARMAN Services
 
DevSecOps in the Cloud from the Lens of a Well-Architected Framework.pptx
DevSecOps in the Cloud from the Lens of a  Well-Architected Framework.pptxDevSecOps in the Cloud from the Lens of a  Well-Architected Framework.pptx
DevSecOps in the Cloud from the Lens of a Well-Architected Framework.pptxTurja Narayan Chaudhuri
 
Advanced web application architecture - Talk
Advanced web application architecture - TalkAdvanced web application architecture - Talk
Advanced web application architecture - TalkMatthias Noback
 
Super Sizing Youtube with Python
Super Sizing Youtube with PythonSuper Sizing Youtube with Python
Super Sizing Youtube with Pythondidip
 
Serverless Compose vs hurtownia danych
Serverless Compose vs hurtownia danychServerless Compose vs hurtownia danych
Serverless Compose vs hurtownia danychThe Software House
 
HLayer / Cloud Native Best Practices
HLayer / Cloud Native Best PracticesHLayer / Cloud Native Best Practices
HLayer / Cloud Native Best PracticesAymen EL Amri
 
Choosing the right parallel compute architecture
Choosing the right parallel compute architecture Choosing the right parallel compute architecture
Choosing the right parallel compute architecture corehard_by
 

Ähnlich wie The Architect's Two Hats (20)

Agile architectures in a modern cloud-native ecosystem
Agile architectures in a modern cloud-native ecosystemAgile architectures in a modern cloud-native ecosystem
Agile architectures in a modern cloud-native ecosystem
 
Agile Architecture in a Modern Cloud-Native Ecosystem
Agile Architecture in a Modern Cloud-Native EcosystemAgile Architecture in a Modern Cloud-Native Ecosystem
Agile Architecture in a Modern Cloud-Native Ecosystem
 
CQRS recipes or how to cook your architecture
CQRS recipes or how to cook your architectureCQRS recipes or how to cook your architecture
CQRS recipes or how to cook your architecture
 
How do we drive tech changes
How do we drive tech changesHow do we drive tech changes
How do we drive tech changes
 
Cloud lunchn learn_howtobecomeacloudarchitect_part1
Cloud lunchn learn_howtobecomeacloudarchitect_part1Cloud lunchn learn_howtobecomeacloudarchitect_part1
Cloud lunchn learn_howtobecomeacloudarchitect_part1
 
Evolving your api architecture with the strangler pattern
Evolving your api architecture with the strangler patternEvolving your api architecture with the strangler pattern
Evolving your api architecture with the strangler pattern
 
No silver bullet summary (paper)
No silver bullet summary (paper)No silver bullet summary (paper)
No silver bullet summary (paper)
 
Micro services
Micro servicesMicro services
Micro services
 
Why computer programming
Why computer programmingWhy computer programming
Why computer programming
 
L02 What is Software Architecture?
L02 What is Software Architecture?L02 What is Software Architecture?
L02 What is Software Architecture?
 
Cloud computing - an architect's perspective
Cloud computing - an architect's perspectiveCloud computing - an architect's perspective
Cloud computing - an architect's perspective
 
DevSecOps in the Cloud from the Lens of a Well-Architected Framework.pptx
DevSecOps in the Cloud from the Lens of a  Well-Architected Framework.pptxDevSecOps in the Cloud from the Lens of a  Well-Architected Framework.pptx
DevSecOps in the Cloud from the Lens of a Well-Architected Framework.pptx
 
Advanced web application architecture - Talk
Advanced web application architecture - TalkAdvanced web application architecture - Talk
Advanced web application architecture - Talk
 
Os Solomon
Os SolomonOs Solomon
Os Solomon
 
Super Sizing Youtube with Python
Super Sizing Youtube with PythonSuper Sizing Youtube with Python
Super Sizing Youtube with Python
 
Serverless Compose vs hurtownia danych
Serverless Compose vs hurtownia danychServerless Compose vs hurtownia danych
Serverless Compose vs hurtownia danych
 
HLayer / Cloud Native Best Practices
HLayer / Cloud Native Best PracticesHLayer / Cloud Native Best Practices
HLayer / Cloud Native Best Practices
 
L02 Architecture
L02 ArchitectureL02 Architecture
L02 Architecture
 
Architecture
ArchitectureArchitecture
Architecture
 
Choosing the right parallel compute architecture
Choosing the right parallel compute architecture Choosing the right parallel compute architecture
Choosing the right parallel compute architecture
 

Mehr von Ben Stopford

10 Principals for Effective Event-Driven Microservices with Apache Kafka
10 Principals for Effective Event-Driven Microservices with Apache Kafka10 Principals for Effective Event-Driven Microservices with Apache Kafka
10 Principals for Effective Event-Driven Microservices with Apache KafkaBen Stopford
 
10 Principals for Effective Event Driven Microservices
10 Principals for Effective Event Driven Microservices10 Principals for Effective Event Driven Microservices
10 Principals for Effective Event Driven MicroservicesBen Stopford
 
The Future of Streaming: Global Apps, Event Stores and Serverless
The Future of Streaming: Global Apps, Event Stores and ServerlessThe Future of Streaming: Global Apps, Event Stores and Serverless
The Future of Streaming: Global Apps, Event Stores and ServerlessBen Stopford
 
A Global Source of Truth for the Microservices Generation
A Global Source of Truth for the Microservices GenerationA Global Source of Truth for the Microservices Generation
A Global Source of Truth for the Microservices GenerationBen Stopford
 
Building Event Driven Services with Kafka Streams
Building Event Driven Services with Kafka StreamsBuilding Event Driven Services with Kafka Streams
Building Event Driven Services with Kafka StreamsBen Stopford
 
NDC London 2017 - The Data Dichotomy- Rethinking Data and Services with Streams
NDC London 2017  - The Data Dichotomy- Rethinking Data and Services with StreamsNDC London 2017  - The Data Dichotomy- Rethinking Data and Services with Streams
NDC London 2017 - The Data Dichotomy- Rethinking Data and Services with StreamsBen Stopford
 
Building Event Driven Services with Apache Kafka and Kafka Streams - Devoxx B...
Building Event Driven Services with Apache Kafka and Kafka Streams - Devoxx B...Building Event Driven Services with Apache Kafka and Kafka Streams - Devoxx B...
Building Event Driven Services with Apache Kafka and Kafka Streams - Devoxx B...Ben Stopford
 
Building Event Driven Services with Stateful Streams
Building Event Driven Services with Stateful StreamsBuilding Event Driven Services with Stateful Streams
Building Event Driven Services with Stateful StreamsBen Stopford
 
Devoxx London 2017 - Rethinking Services With Stateful Streams
Devoxx London 2017 - Rethinking Services With Stateful StreamsDevoxx London 2017 - Rethinking Services With Stateful Streams
Devoxx London 2017 - Rethinking Services With Stateful StreamsBen Stopford
 
Event Driven Services Part 2: Building Event-Driven Services with Apache Kafka
Event Driven Services Part 2:  Building Event-Driven Services with Apache KafkaEvent Driven Services Part 2:  Building Event-Driven Services with Apache Kafka
Event Driven Services Part 2: Building Event-Driven Services with Apache KafkaBen Stopford
 
Event Driven Services Part 1: The Data Dichotomy
Event Driven Services Part 1: The Data Dichotomy Event Driven Services Part 1: The Data Dichotomy
Event Driven Services Part 1: The Data Dichotomy Ben Stopford
 
Event Driven Services Part 3: Putting the Micro into Microservices with State...
Event Driven Services Part 3: Putting the Micro into Microservices with State...Event Driven Services Part 3: Putting the Micro into Microservices with State...
Event Driven Services Part 3: Putting the Micro into Microservices with State...Ben Stopford
 
Strata Software Architecture NY: The Data Dichotomy
Strata Software Architecture NY: The Data DichotomyStrata Software Architecture NY: The Data Dichotomy
Strata Software Architecture NY: The Data DichotomyBen Stopford
 
The Power of the Log
The Power of the LogThe Power of the Log
The Power of the LogBen Stopford
 
Streaming, Database & Distributed Systems Bridging the Divide
Streaming, Database & Distributed Systems Bridging the DivideStreaming, Database & Distributed Systems Bridging the Divide
Streaming, Database & Distributed Systems Bridging the DivideBen Stopford
 
A little bit of clojure
A little bit of clojureA little bit of clojure
A little bit of clojureBen Stopford
 
Big iron 2 (published)
Big iron 2 (published)Big iron 2 (published)
Big iron 2 (published)Ben Stopford
 
The return of big iron?
The return of big iron?The return of big iron?
The return of big iron?Ben Stopford
 
Big Data & the Enterprise
Big Data & the EnterpriseBig Data & the Enterprise
Big Data & the EnterpriseBen Stopford
 
Where Does Big Data Meet Big Database - QCon 2012
Where Does Big Data Meet Big Database - QCon 2012Where Does Big Data Meet Big Database - QCon 2012
Where Does Big Data Meet Big Database - QCon 2012Ben Stopford
 

Mehr von Ben Stopford (20)

10 Principals for Effective Event-Driven Microservices with Apache Kafka
10 Principals for Effective Event-Driven Microservices with Apache Kafka10 Principals for Effective Event-Driven Microservices with Apache Kafka
10 Principals for Effective Event-Driven Microservices with Apache Kafka
 
10 Principals for Effective Event Driven Microservices
10 Principals for Effective Event Driven Microservices10 Principals for Effective Event Driven Microservices
10 Principals for Effective Event Driven Microservices
 
The Future of Streaming: Global Apps, Event Stores and Serverless
The Future of Streaming: Global Apps, Event Stores and ServerlessThe Future of Streaming: Global Apps, Event Stores and Serverless
The Future of Streaming: Global Apps, Event Stores and Serverless
 
A Global Source of Truth for the Microservices Generation
A Global Source of Truth for the Microservices GenerationA Global Source of Truth for the Microservices Generation
A Global Source of Truth for the Microservices Generation
 
Building Event Driven Services with Kafka Streams
Building Event Driven Services with Kafka StreamsBuilding Event Driven Services with Kafka Streams
Building Event Driven Services with Kafka Streams
 
NDC London 2017 - The Data Dichotomy- Rethinking Data and Services with Streams
NDC London 2017  - The Data Dichotomy- Rethinking Data and Services with StreamsNDC London 2017  - The Data Dichotomy- Rethinking Data and Services with Streams
NDC London 2017 - The Data Dichotomy- Rethinking Data and Services with Streams
 
Building Event Driven Services with Apache Kafka and Kafka Streams - Devoxx B...
Building Event Driven Services with Apache Kafka and Kafka Streams - Devoxx B...Building Event Driven Services with Apache Kafka and Kafka Streams - Devoxx B...
Building Event Driven Services with Apache Kafka and Kafka Streams - Devoxx B...
 
Building Event Driven Services with Stateful Streams
Building Event Driven Services with Stateful StreamsBuilding Event Driven Services with Stateful Streams
Building Event Driven Services with Stateful Streams
 
Devoxx London 2017 - Rethinking Services With Stateful Streams
Devoxx London 2017 - Rethinking Services With Stateful StreamsDevoxx London 2017 - Rethinking Services With Stateful Streams
Devoxx London 2017 - Rethinking Services With Stateful Streams
 
Event Driven Services Part 2: Building Event-Driven Services with Apache Kafka
Event Driven Services Part 2:  Building Event-Driven Services with Apache KafkaEvent Driven Services Part 2:  Building Event-Driven Services with Apache Kafka
Event Driven Services Part 2: Building Event-Driven Services with Apache Kafka
 
Event Driven Services Part 1: The Data Dichotomy
Event Driven Services Part 1: The Data Dichotomy Event Driven Services Part 1: The Data Dichotomy
Event Driven Services Part 1: The Data Dichotomy
 
Event Driven Services Part 3: Putting the Micro into Microservices with State...
Event Driven Services Part 3: Putting the Micro into Microservices with State...Event Driven Services Part 3: Putting the Micro into Microservices with State...
Event Driven Services Part 3: Putting the Micro into Microservices with State...
 
Strata Software Architecture NY: The Data Dichotomy
Strata Software Architecture NY: The Data DichotomyStrata Software Architecture NY: The Data Dichotomy
Strata Software Architecture NY: The Data Dichotomy
 
The Power of the Log
The Power of the LogThe Power of the Log
The Power of the Log
 
Streaming, Database & Distributed Systems Bridging the Divide
Streaming, Database & Distributed Systems Bridging the DivideStreaming, Database & Distributed Systems Bridging the Divide
Streaming, Database & Distributed Systems Bridging the Divide
 
A little bit of clojure
A little bit of clojureA little bit of clojure
A little bit of clojure
 
Big iron 2 (published)
Big iron 2 (published)Big iron 2 (published)
Big iron 2 (published)
 
The return of big iron?
The return of big iron?The return of big iron?
The return of big iron?
 
Big Data & the Enterprise
Big Data & the EnterpriseBig Data & the Enterprise
Big Data & the Enterprise
 
Where Does Big Data Meet Big Database - QCon 2012
Where Does Big Data Meet Big Database - QCon 2012Where Does Big Data Meet Big Database - QCon 2012
Where Does Big Data Meet Big Database - QCon 2012
 

The Architect's Two Hats

  • 1. The Architect ’ s Two Hats Ben Stopford Architect High Performance Computing RBS
  • 2. Once upon a time
  • 3. In a land far far away
  • 4. There was a designer
  • 5.  
  • 7.  
  • 8. And they didn ’t really get on
  • 9. OK – that ’s not entirely true – but they have competing objectives
  • 10. This is the story of the architect ’s two hats
  • 11. So what are the two hats all about?
  • 12.
  • 13.
  • 14. So lets look at how design works in industry
  • 15. We ’ ll look at architecture for performance a bit later, right now lets look at design
  • 17.
  • 18. So how to we avoid this?
  • 19. We design our solution well so that it is easy to understand and change
  • 20. And we all know how to do that right? I ’ m going to play with you a bit now….
  • 21. We Design our System Up Front
  • 22. … with UML
  • 23. AND… We get to spot problems early on in the project lifecycle. Why is that advantageous?
  • 24. Why? Because it costs less to get the design right early on, see: Low cost of change early in lifecycle
  • 25. So we have a plan for how to build our application before we start coding. All we need to do is follow the plan!!
  • 26. Well….. That ’s what we used to do… … but problems kept cropping up…
  • 27.
  • 28.
  • 29. Ahhh, those pesky users, why can ’t they make up their minds?
  • 31. We find designing up front hard…
  • 32. ...and a bit bureaucratic
  • 33. … and when we do get it right the users generally go and change the requirements…
  • 34. … and it all changes in the next release anyway.
  • 35. So are we taking the right approach
  • 36. Software is supposed to be soft. That means it is supposed to be easy to change.
  • 37. So is fixing the design up front the right way to do it?
  • 38. But we ’ve seen that changing the design later in the project life cycle is expensive!
  • 39. So does the cost curve have to look like this?
  • 40. Can we design our systems so that we CAN change them later in the lifecycle?
  • 41. The Cost of Change in an Agile application
  • 42. How
  • 43. By designing for change ** But not designing for any specific changes *** And writing lots and lots of tests
  • 44. Agile Development facilitates this Code Base Test Test Test
  • 45.
  • 46. This means that your system ’s design will constantly evolve.
  • 47. So what does this imply for the Designer?
  • 48. It implies that the designer must constantly steer the application so that it remains easy to understand and easy to change .
  • 49. With everyone being responsible for the design.
  • 50. So the designers role becomes about steering the applications design through others.
  • 52.
  • 53.
  • 54.
  • 55. Now we can switch to the architects hat.
  • 56. Architecting for performance And why it can fight against good design
  • 57. If speed is going to be a problem…. Then evolutionary design alone may not work
  • 58. We need to seed the design with clever architectural decisions to ensure we get the speed we need
  • 59. We use patterns and frameworks that increase speed But often at the expense of a clear programming model. i.e. these patterns can obfuscate the implementation.
  • 60. How it fits together: A project timeline Set-up Architecture Design: Push patterns and reuse etc Amend Architecture
  • 61. So lets look at how we architect for speed
  • 62.
  • 64. Load balancing is great way to get horizontal scalability without affecting the programming model much!!
  • 65. But it is limited by the time taken for a single request i.e. it allows us to handle more load, but does not allow us to reduce the time taken to execute single process
  • 66. What if we want to make a single (possibly long running) processes faster? Lets look at an example
  • 67. Sum the numbers between 1 and 10,000,000 int total for (n =1 to 10,000,000){ total+=n } A service has a hard limit on how fast it can execute this, defined by it ’s clock speed. Load balancing won ’t speed this up.
  • 68.
  • 69.
  • 70.
  • 73. But we can also scale out. i.e. lots of normal hardware linked together
  • 74. Scaling Out is Cost Effective Scaling out is much more cost effective per teraflop than scaling up.
  • 75. But it adds complexity to the programming model
  • 76. Key Point: Role of an Architect is to construct and application that performs - that often means a distributed system Distributed Systems can be much harder to manage than those that run on a single machine Why?
  • 77. Because standard computing models don ’t work in a distributed world.
  • 78. The Trials of Distributed Computing
  • 79. As we distribute our application across multiple machines, complexity is moved from hardware to software.
  • 80. The major problem is the lack of fast shared memory
  • 81.
  • 82. We can ’t ignore ‘wire’ time. We need to make sure programmers think about it.
  • 83. The complexity of shared memory has been moved from the hardware domain to the software domain. Simple problems like accessing other objects are now more time consuming
  • 84. But lets step back a little and look at why we need to distribute processing
  • 85. Sum the numbers between 1 and 10,000,000 int total for (n =1 to 10,000,000){ total+=n } A service has a hard limit on how fast it can execute this
  • 86.
  • 87.
  • 88. Parallel execution on a grid Server Grid node Grid node Grid node Grid node Send code + data Receive result Code + data (1) Code + data (2) Code + data (3) Code + data (4) Processing time is 4 x synchronous case (assuming processing time >> wire time)
  • 89. Grid computing solves the processing problem. i.e. we can do complex computations very quickly by doing them in parallel.
  • 90. But it complicates the programming model
  • 91. Example: Report Generation for (Report report : reports){ Data data = getDataFromDB(report); format(data); present(data); }
  • 92. ... so visually... Get data DB Format Present Loop For n
  • 93. ...but on the grid... Start DB Format Present Loop n times Grid Runner Asynchronous Synchronous Grid Callback Grid
  • 94. Note how this muddles the design A simple loop has become a set of distributed invocations and asynchronous call backs.
  • 95. Grids allow us to process computations quickly through parallelism. But this leads to the problem getting fast enough access to the data we want to operate on
  • 96.
  • 97. Why is the database a bottleneck? Server Grid node Grid node Grid node Grid node Send code Receive result Database Get data
  • 98.
  • 99. We can scale up by using memory not disk Memory access is much faster than disk access.
  • 100.
  • 101. But Single Machine Data Stores Don ’t Scale, even if they are in memory Server Grid node Grid node Grid node Grid node Send code Receive result In Memory Database Get data BOTTLENECK
  • 102. What we need is a distributed data source? Welcome to the world of distributed caching
  • 103. Distributed Caching Solves This Problem by Splitting The Data Over All Servers 1/5 data 1/5 data 1/5 data 1/5 data 1/5 data Client Client Client Client This is parallel processing for data access. Data requests are split across multiple machines.
  • 104. Now we have removed the data bottleneck Server Grid node Grid node Grid node Grid node (1) Send code (2) Receive result Data Fabric 1/6 1/6 1/6 1/6 1/6 1/6
  • 105. This gives us access to a fast shared memory across multiple machines
  • 106. We are now massively parallel With lightning fast data access.
  • 107. But we can get faster than this. How?? Server Grid node Grid node Grid node Grid node (1) Send code (2) Receive result Data Fabric 1/6 1/6 1/6 1/6 1/6 1/6
  • 108. Superimpose compute and data fabrics into one entity Data Fabric 1/6 1/6 1/6 1/6 1/6 1/6 Server (1) Send code (2) Receive result
  • 109.
  • 110. So remember the two hats
  • 111.
  • 112.
  • 113. The trick is balancing them! How much architecture is enough?
  • 114. But fundamentally, you need them both!
  • 115. Thanks Slides: http://www.BenStopford.com Vacation Placements: [email_address]

Hinweis der Redaktion

  1. Your design is always tested Encapsulate different concerns so that changes can be independent of one another
  2. The subtle point here is that you must direct the applications progress through others. This
  3. In an agile team we use stand-ups as a good opportunity to establish vision. e.g. broad patterns such as layered separation or finer grained patterns/components such as a centralised workflow engine.
  4. (b) Is closer to the typical architect ’ s role.