SlideShare uma empresa Scribd logo
1 de 40
Baixar para ler offline
Aesthetics & the Beauty of
an Architecture
Adventures in CQRS & Event Sourcing
Tom Scott
@tomwscott
What’s in it for you?

• Understanding of CQRS & Event Sourcing in
the wild

• The mistakes we made…
• … the lessons we learnt …
• … and why we’re still happy!
rob.knight
1

art |ɑːt|
noun
1 [ mass noun ] the expression or application of human creative
skill and imagination, typically in a visual form such as painting
or sculpture, producing works to be appreciated primarily for their
beauty or emotional power
1

art |ɑːt|
noun
1 [ mass noun ] the expression or application of human creative
skill and imagination, typically in a visual form such as painting
or sculpture, producing works to be appreciated primarily for their
beauty or emotional power
Aesthetics
Aesthetics

Scott’s Purely Arbitrary Criteria, Etceteras
For Evaluating Beautiful Architectures

#SPACE_FEBA
Fully Operational
Simplicity

echerries
Commitment

justageek
Deferring Commitment

justageek
Metaphor

Petar Pavlov - http://bit.ly/9ySEUt
Discipline & Consistency
Serendipity

kathryn_rotondo
#SPACE_FEBA

• Fully Operational
• Simplicity
• Deferred
Commitment


• Metaphor
• Discipline
• Serendipity
Price Comparison

££
The evolution of a system
Presentation

Application

Database





|
The Solution

archer10
Architectural Goals

• Structured
• Horizontal
Scalability

• Availability &
Reliability


• Visibility /

Monitorability

• Flexibility &

Replaceability

archer10
The Mandate!

• Service Oriented
Architecture

• Domain Driven
Design

• Micro-Services


• Continuous
Delivery

• Oh and one more
thing!

archer10
Domain Driven Design

• Entity
• Value Object
• Aggregate
• Service


• Repository
• Factory
• Bounded Context

archer10
Domain Driven Design

• Entity
• Value Object
• Aggregate
• Service


• Repository
• Factory
• Bounded Context

archer10
Service Oriented Architecture






Understand your Domain







Home
Journey

Panel

Quote
Engine

Risk

Enquiry

Provider
Quote
T

d?
En
he
Just one more thing…

http://m.cdn.blog.hu/ke/kedvessigmund/image/columbo.jpg
CQRS & Event Sourcing

• CQRS or “Why do we use the same schema
for reads and writes?”

• Event Sourcing or “Why do we allow ORMs to
dictate our object model?”

archer10
CQRS
Command Query Responsibility Segregation





}

}

write

read
Use SQL?




{	
  
{	
  
	
  	
  	
  	
  “_id”	
  :	
  “590b9902”,	
  
UPDATE	
  Address	
  	
  
	
  	
  	
  	
  “_id”	
  :	
  “590b9902”,	
  
	
  	
  	
  	
  “event”	
  :	
  “AddressModified”,	
  
SET	
  	
   umber	
  =	
  10,	
  	
  
n
	
  	
  	
  	
  “event”	
  :	
  “PolicySpecified”,	
  
	
  	
  	
  	
  “data”	
  :	
  {	
  
	
   	
  	
  	
  street	
  =	
  ‘Downing	
  Street’,	
  
	
  	
  	
  	
  “data”	
  :	
  {	
  
	
  	
  	
  	
  	
   “number”	
  :	
  10,	
  
c
	
  	
  	
  	
  	
   “type”	
  :	
  “ContentsInsurance”,	
  
	
   	
  	
  	
  	
  	
   ity	
  =	
  ‘London’,	
  
	
   “street”	
  :	
  “Downing	
  Street”,	
  
p
	
   	
  	
  	
  	
  	
   ostcode	
  =	
  ‘SW1A	
  2AA’	
  
	
   “excess”	
  :	
  750	
  
	
  	
  	
  	
  	
  	
  “city”	
  :	
  “London”,	
  
	
   WHERE	
  _id	
  =	
  ‘590b9902’
	
  }	
  “postcode”	
  :	
  “SW1A	
  2AA”	
  
	
  
} 	
  }	
  
	
  
}
Event Sourcing (C#)
	
  	
  	
  public	
  class	
  Customer	
  :	
  AggregateRoot	
  
	
  	
  	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  private	
  readonly	
  Guid	
  id;	
  

!

	
  	
  	
  	
  	
  	
  	
  	
  private	
  Address	
  currentAddress;	
  
	
   	
  	
  	
  	
  	
  	
  	
  
	
  	
  	
  	
  	
  	
  	
  	
  //	
  Business	
  Logic	
  
	
  	
  	
  	
  	
  	
  	
  	
  public	
  void	
  ChangeAddress(Address	
  newAddress)	
  
	
  	
  	
  	
  	
  	
  	
  	
  {	
  
	
   	
   	
  
	
  	
  	
  	
  if	
  (newAddress.IsValid())	
  	
  
	
   	
   	
  
	
  
{	
   	
  
	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  
	
  
Raise(new	
  AddressModified(id,	
  newAddress));	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  
	
   	
   	
  
	
  
}	
  
	
  	
  	
  	
  	
  	
  	
  	
  }	
  	
  	
  	
  	
  	
  	
  	
  

!

	
  	
  	
  	
  	
  	
  	
  	
  //	
  State	
  Transition	
  
	
  	
  	
  	
  	
  	
  	
  	
  public	
  void	
  Apply(AddressModified	
  @event)	
  	
  
	
  	
  	
  	
  	
  	
  	
  	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  currentAddress	
  =	
  @event.Address;	
  
	
  	
  	
  	
  	
  	
  	
  	
  }	
  

!
!

	
   	
   	
  

!
!

......	
  

	
  	
  	
  	
  	
  	
  	
  	
  //	
  Business	
  Logic	
  
	
  	
  	
  	
  	
  	
  	
  	
  public	
  void	
  SpecifyCommunicationPreferences(CommunicationPrefs	
  preferences)	
  
	
  	
  	
  	
  	
  	
  	
  	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  Raise(new	
  CommunicationPreferencesSpecified(id,	
  preferences));	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  
	
   	
   	
  
	
  
	
  
Eventual Consistency



POST /risk/new HTTP/1.1 302 !
GET /risk/590b9902:v1
Location: /risk/590b9902:v1
What we ended up with:













The Conclusion

tim_norris
?
Simple

Metaphor

?
Discipline

Commitment

+

Fully Operational

Serendipity
The Power!

	
  	
  	
  public	
  class	
  Customer	
  :	
  AggregateRoot	
  
	
  	
  	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  private	
  readonly	
  Guid	
  id;	
  

!

	
  	
  	
  	
  	
  	
  	
  	
  private	
  Address	
  currentAddress;	
  

!

	
  	
  	
  	
  	
  	
  	
  	
  public	
  void	
  ChangeAddress(Address	
  newAddress)	
  
	
  	
  	
  	
  	
  	
  	
  	
  {	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  Raise(new	
  AddressModified(id,	
  newAddress));	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  
	
  	
  	
  	
  	
  	
  	
  	
  }	
  

!

	
  	
  	
  	
  	
  	
  	
  	
  public	
  void	
  Apply(AddressModified	
  @event)	
  
	
  	
  	
  	
  	
  	
  	
  	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  currentAddress	
  =	
  @event.Address;	
  
	
  	
  	
  	
  	
  	
  	
  	
  }	
  
	
  	
  	
  	
  }
The Power!
	
  	
  	
  public	
  class	
  Customer	
  :	
  AggregateRoot	
  
	
  	
  	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  private	
  readonly	
  Guid	
  id;	
  

!

	
  	
  	
  	
  	
  	
  	
  	
  private	
  Address	
  currentAddress;	
  

!

	
  	
  	
  	
  	
  	
  	
  	
  public	
  void	
  ChangeAddress(Address	
  newAddress)	
  
	
  	
  	
  	
  	
  	
  	
  	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  if	
  (currentAddress.IsSignificantlyDifferentFrom(newAddress))	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  Raise(new	
  CustomerMoved(id,	
  newAddress));	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  }	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  else	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  Raise(new	
  AddressModified(id,	
  newAddress));	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  }	
  
	
  	
  	
  	
  	
  	
  	
  	
  }	
  

!

	
  	
  	
  	
  	
  	
  	
  	
  public	
  void	
  Apply(CustomerMoved	
  @event)	
  
	
  	
  	
  	
  	
  	
  	
  	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  currentAddress	
  =	
  @event.Address;	
  
	
  	
  	
  	
  	
  	
  	
  	
  }	
  

!

	
  	
  	
  	
  	
  	
  	
  	
  public	
  void	
  Apply(AddressModified	
  @event)	
  
	
  	
  	
  	
  	
  	
  	
  	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  currentAddress	
  =	
  @event.Address;	
  
	
  	
  	
  	
  	
  	
  	
  	
  }	
  
	
  	
  	
  	
  }
The Flexibility!
var	
  connection	
  =	
  rabbit.createConnection({	
  url:	
  ‘amqp://localhost:5672'	
  })	
  

!

connection.on('ready',	
  function	
  ()	
  {	
  
	
  	
  	
  	
  console.info('Connected');	
  
	
  	
  	
  	
  exchange	
  =	
  connection.exchange('SOURCE:Exchange',	
  {	
  'type':	
  'topic',	
  durable:	
  true	
  },	
  function	
  
()	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  var	
  queue	
  =	
  connection.queue('PROJECTION:Map',	
  {	
  durable:	
  false,	
  exclusive:	
  true	
  },	
  
	
  	
  	
  	
  	
  	
  	
  	
  function	
  ()	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  console.info("Joined	
  Queue");	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  queue.subscribe(function	
  (message,	
  headers,	
  deliveryInfo)	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  var	
  policyDetails	
  =	
  JSON.parse(message.data.toString());	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  io.sockets.emit('postcode',	
  policyDetails.Address.Postcode);	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  });	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  queue.bind(exchange.name,	
  'AddressDetailsSpecified');	
  
	
  	
  	
  	
  	
  	
  	
  	
  });	
  
	
  	
  	
  	
  	
  	
  	
  	
  queue.on('queueBindOk',	
  function	
  ()	
  {	
  console.info('Bound	
  queue	
  to	
  exchange');	
  });	
  
	
  	
  	
  	
  });	
  

!

});
Is it a silver bullet?
Lessons Learnt

• Prefer simpler communication protocols
• Messaging == Push == Transient,
• HTTP == Pull == Permanent
• Difficult to evolve Domain Events
• Events as the system contract
rob.knight
ha
T

u!
Yo
nk

Tom Scott
@tomwscott

Mais conteúdo relacionado

Mais procurados

Perception in architecture
Perception in architecturePerception in architecture
Perception in architectureAs Per Design
 
EXPRESSIONISM
EXPRESSIONISMEXPRESSIONISM
EXPRESSIONISMsravyadj
 
Sustainable Design Part One: Building An Environmental Ethic
Sustainable Design Part One: Building An Environmental EthicSustainable Design Part One: Building An Environmental Ethic
Sustainable Design Part One: Building An Environmental EthicTerri Meyer Boake
 
how to make architecture graduation project
how to make architecture graduation project how to make architecture graduation project
how to make architecture graduation project Eman Ateek
 
Light as an architectural elemant1
Light as an architectural  elemant1Light as an architectural  elemant1
Light as an architectural elemant1Architecture
 
Boullee & ledoux
Boullee & ledouxBoullee & ledoux
Boullee & ledouxFahadNafiz2
 
Post modern architecture
Post modern architecturePost modern architecture
Post modern architectureAlex Waktola
 
8. Shading devices examples
8. Shading devices examples8. Shading devices examples
8. Shading devices examplesRohit Kumar
 
HISTORY OF ARCHITECTURE question papers
HISTORY OF ARCHITECTURE  question papersHISTORY OF ARCHITECTURE  question papers
HISTORY OF ARCHITECTURE question papersganapathy mohan
 
Sustainable Design Part Five: Assessment Systems
Sustainable Design Part Five: Assessment SystemsSustainable Design Part Five: Assessment Systems
Sustainable Design Part Five: Assessment SystemsTerri Meyer Boake
 
Minimalism in architecture
Minimalism in architectureMinimalism in architecture
Minimalism in architectureHusseinAzher
 
Criticizing architecture
Criticizing architectureCriticizing architecture
Criticizing architectureNidhi Thigale
 
The Architectural Process
The Architectural ProcessThe Architectural Process
The Architectural ProcessShaun Pilgrem
 
Research Methods in Architecture - Theory and Method - طرق البحث المعمارى - ا...
Research Methods in Architecture - Theory and Method - طرق البحث المعمارى - ا...Research Methods in Architecture - Theory and Method - طرق البحث المعمارى - ا...
Research Methods in Architecture - Theory and Method - طرق البحث المعمارى - ا...Galala University
 

Mais procurados (20)

Perception in architecture
Perception in architecturePerception in architecture
Perception in architecture
 
THEORY OF DESIGN
THEORY OF DESIGN THEORY OF DESIGN
THEORY OF DESIGN
 
EXPRESSIONISM
EXPRESSIONISMEXPRESSIONISM
EXPRESSIONISM
 
Sustainable Design Part One: Building An Environmental Ethic
Sustainable Design Part One: Building An Environmental EthicSustainable Design Part One: Building An Environmental Ethic
Sustainable Design Part One: Building An Environmental Ethic
 
how to make architecture graduation project
how to make architecture graduation project how to make architecture graduation project
how to make architecture graduation project
 
Light as an architectural elemant1
Light as an architectural  elemant1Light as an architectural  elemant1
Light as an architectural elemant1
 
Rem Koolhaas
Rem KoolhaasRem Koolhaas
Rem Koolhaas
 
Boullee & ledoux
Boullee & ledouxBoullee & ledoux
Boullee & ledoux
 
Parametric Design
Parametric DesignParametric Design
Parametric Design
 
Post modern architecture
Post modern architecturePost modern architecture
Post modern architecture
 
Architect's philosophy
Architect's philosophy Architect's philosophy
Architect's philosophy
 
8. Shading devices examples
8. Shading devices examples8. Shading devices examples
8. Shading devices examples
 
Arts and crafts Movement
Arts and crafts MovementArts and crafts Movement
Arts and crafts Movement
 
HISTORY OF ARCHITECTURE question papers
HISTORY OF ARCHITECTURE  question papersHISTORY OF ARCHITECTURE  question papers
HISTORY OF ARCHITECTURE question papers
 
Sustainable Design Part Five: Assessment Systems
Sustainable Design Part Five: Assessment SystemsSustainable Design Part Five: Assessment Systems
Sustainable Design Part Five: Assessment Systems
 
Theory of Architecture
Theory  of ArchitectureTheory  of Architecture
Theory of Architecture
 
Minimalism in architecture
Minimalism in architectureMinimalism in architecture
Minimalism in architecture
 
Criticizing architecture
Criticizing architectureCriticizing architecture
Criticizing architecture
 
The Architectural Process
The Architectural ProcessThe Architectural Process
The Architectural Process
 
Research Methods in Architecture - Theory and Method - طرق البحث المعمارى - ا...
Research Methods in Architecture - Theory and Method - طرق البحث المعمارى - ا...Research Methods in Architecture - Theory and Method - طرق البحث المعمارى - ا...
Research Methods in Architecture - Theory and Method - طرق البحث المعمارى - ا...
 

Destaque

Case Study - Transport for NSW - Old for New
Case Study - Transport for NSW - Old for NewCase Study - Transport for NSW - Old for New
Case Study - Transport for NSW - Old for NewRowan Tombs
 
Intro to Arch Week 4 [compatibility mode]
Intro to Arch Week 4 [compatibility mode]Intro to Arch Week 4 [compatibility mode]
Intro to Arch Week 4 [compatibility mode]Hamdija Velagic
 
City of San Antonio Historic Design Guidelines
City of San Antonio Historic Design GuidelinesCity of San Antonio Historic Design Guidelines
City of San Antonio Historic Design GuidelinesBecentro Bedowntown
 
Aesthetic of Street Environment and the link to pedestrian activity poster
Aesthetic of Street Environment and the link to pedestrian activity posterAesthetic of Street Environment and the link to pedestrian activity poster
Aesthetic of Street Environment and the link to pedestrian activity posteraswin2812
 
Cc 5 14-13 - design and historic review commission
Cc 5 14-13 - design and historic review commissionCc 5 14-13 - design and historic review commission
Cc 5 14-13 - design and historic review commissionCity of San Angelo Texas
 
Urban space design in virtual worlds. An analyses to the aesthetic-spatial an...
Urban space design in virtual worlds. An analyses to the aesthetic-spatial an...Urban space design in virtual worlds. An analyses to the aesthetic-spatial an...
Urban space design in virtual worlds. An analyses to the aesthetic-spatial an...Eduardo Zilles Borba
 
Historic Preservation - City Studios Architecture
Historic Preservation - City Studios ArchitectureHistoric Preservation - City Studios Architecture
Historic Preservation - City Studios ArchitectureHeritage Ohio
 
Urban Decay and Collective Memory
Urban Decay and Collective MemoryUrban Decay and Collective Memory
Urban Decay and Collective MemoryKanelia Koutsandrea
 
Reading Cultural Landscapes
Reading Cultural LandscapesReading Cultural Landscapes
Reading Cultural LandscapesSally Longford
 
Reinventing Urban Landscapes with Green Infrastructure_RIFMA2016
Reinventing Urban Landscapes with Green Infrastructure_RIFMA2016Reinventing Urban Landscapes with Green Infrastructure_RIFMA2016
Reinventing Urban Landscapes with Green Infrastructure_RIFMA2016RI_FMA
 
The Studentification of Urban Space
The Studentification of Urban SpaceThe Studentification of Urban Space
The Studentification of Urban SpaceTina Richardson
 
The Future of LEED and Historic Preservation
The Future of LEED and Historic PreservationThe Future of LEED and Historic Preservation
The Future of LEED and Historic PreservationBrian Rich
 
The Cultural/Historic Urban Landscape: A Resource for Urban Regeneration and ...
The Cultural/Historic Urban Landscape: A Resource for Urban Regeneration and ...The Cultural/Historic Urban Landscape: A Resource for Urban Regeneration and ...
The Cultural/Historic Urban Landscape: A Resource for Urban Regeneration and ...Regional Science Academy
 
Cultural Landscape
Cultural LandscapeCultural Landscape
Cultural LandscapeE. Rueber
 
Ratio, variation and proportion
Ratio, variation and proportionRatio, variation and proportion
Ratio, variation and proportionMalikahmad105
 
Architectural Design 1 Lectures by Dr. Yasser Mahgoub - Lecture 10 Aesthetics
Architectural Design 1 Lectures by Dr. Yasser Mahgoub - Lecture 10 AestheticsArchitectural Design 1 Lectures by Dr. Yasser Mahgoub - Lecture 10 Aesthetics
Architectural Design 1 Lectures by Dr. Yasser Mahgoub - Lecture 10 AestheticsGalala University
 
Activities and materials to encourage aesthetic development through
Activities and materials to encourage aesthetic development throughActivities and materials to encourage aesthetic development through
Activities and materials to encourage aesthetic development throughsaba_kese
 

Destaque (20)

Aesthetics
AestheticsAesthetics
Aesthetics
 
Case Study - Transport for NSW - Old for New
Case Study - Transport for NSW - Old for NewCase Study - Transport for NSW - Old for New
Case Study - Transport for NSW - Old for New
 
Intro to Arch Week 4 [compatibility mode]
Intro to Arch Week 4 [compatibility mode]Intro to Arch Week 4 [compatibility mode]
Intro to Arch Week 4 [compatibility mode]
 
City of San Antonio Historic Design Guidelines
City of San Antonio Historic Design GuidelinesCity of San Antonio Historic Design Guidelines
City of San Antonio Historic Design Guidelines
 
Aesthetic of Street Environment and the link to pedestrian activity poster
Aesthetic of Street Environment and the link to pedestrian activity posterAesthetic of Street Environment and the link to pedestrian activity poster
Aesthetic of Street Environment and the link to pedestrian activity poster
 
Cc 5 14-13 - design and historic review commission
Cc 5 14-13 - design and historic review commissionCc 5 14-13 - design and historic review commission
Cc 5 14-13 - design and historic review commission
 
Urban space design in virtual worlds. An analyses to the aesthetic-spatial an...
Urban space design in virtual worlds. An analyses to the aesthetic-spatial an...Urban space design in virtual worlds. An analyses to the aesthetic-spatial an...
Urban space design in virtual worlds. An analyses to the aesthetic-spatial an...
 
Historic Preservation - City Studios Architecture
Historic Preservation - City Studios ArchitectureHistoric Preservation - City Studios Architecture
Historic Preservation - City Studios Architecture
 
Urban Decay and Collective Memory
Urban Decay and Collective MemoryUrban Decay and Collective Memory
Urban Decay and Collective Memory
 
Reading Cultural Landscapes
Reading Cultural LandscapesReading Cultural Landscapes
Reading Cultural Landscapes
 
Reinventing Urban Landscapes with Green Infrastructure_RIFMA2016
Reinventing Urban Landscapes with Green Infrastructure_RIFMA2016Reinventing Urban Landscapes with Green Infrastructure_RIFMA2016
Reinventing Urban Landscapes with Green Infrastructure_RIFMA2016
 
The Studentification of Urban Space
The Studentification of Urban SpaceThe Studentification of Urban Space
The Studentification of Urban Space
 
The Future of LEED and Historic Preservation
The Future of LEED and Historic PreservationThe Future of LEED and Historic Preservation
The Future of LEED and Historic Preservation
 
Smart Environment - understanding and meaning
Smart Environment  - understanding and meaningSmart Environment  - understanding and meaning
Smart Environment - understanding and meaning
 
The Cultural/Historic Urban Landscape: A Resource for Urban Regeneration and ...
The Cultural/Historic Urban Landscape: A Resource for Urban Regeneration and ...The Cultural/Historic Urban Landscape: A Resource for Urban Regeneration and ...
The Cultural/Historic Urban Landscape: A Resource for Urban Regeneration and ...
 
Cultural Landscape
Cultural LandscapeCultural Landscape
Cultural Landscape
 
Ratio, variation and proportion
Ratio, variation and proportionRatio, variation and proportion
Ratio, variation and proportion
 
Architectural Design 1 Lectures by Dr. Yasser Mahgoub - Lecture 10 Aesthetics
Architectural Design 1 Lectures by Dr. Yasser Mahgoub - Lecture 10 AestheticsArchitectural Design 1 Lectures by Dr. Yasser Mahgoub - Lecture 10 Aesthetics
Architectural Design 1 Lectures by Dr. Yasser Mahgoub - Lecture 10 Aesthetics
 
Activities and materials to encourage aesthetic development through
Activities and materials to encourage aesthetic development throughActivities and materials to encourage aesthetic development through
Activities and materials to encourage aesthetic development through
 
Understanding Our Environment
Understanding Our EnvironmentUnderstanding Our Environment
Understanding Our Environment
 

Semelhante a Aesthetics and the Beauty of an Architecture

TDC2016SP - Trilha .NET
TDC2016SP - Trilha .NETTDC2016SP - Trilha .NET
TDC2016SP - Trilha .NETtdc-globalcode
 
TDC2016POA | Trilha .NET - CQRS e ES na prática com RavenDB
TDC2016POA | Trilha .NET - CQRS e ES na prática com RavenDBTDC2016POA | Trilha .NET - CQRS e ES na prática com RavenDB
TDC2016POA | Trilha .NET - CQRS e ES na prática com RavenDBtdc-globalcode
 
Websockets talk at Rubyconf Uruguay 2010
Websockets talk at Rubyconf Uruguay 2010Websockets talk at Rubyconf Uruguay 2010
Websockets talk at Rubyconf Uruguay 2010Ismael Celis
 
Eve - REST API for Humans™
Eve - REST API for Humans™Eve - REST API for Humans™
Eve - REST API for Humans™Nicola Iarocci
 
Bare-knuckle web development
Bare-knuckle web developmentBare-knuckle web development
Bare-knuckle web developmentJohannes Brodwall
 
Andriy Slobodyanyk "How to Use Hibernate: Key Problems and Solutions"
Andriy Slobodyanyk "How to Use Hibernate: Key Problems and Solutions"Andriy Slobodyanyk "How to Use Hibernate: Key Problems and Solutions"
Andriy Slobodyanyk "How to Use Hibernate: Key Problems and Solutions"LogeekNightUkraine
 
Server side data sync for mobile apps with silex
Server side data sync for mobile apps with silexServer side data sync for mobile apps with silex
Server side data sync for mobile apps with silexMichele Orselli
 
GraphQL - when REST API is not enough - lessons learned
GraphQL - when REST API is not enough - lessons learnedGraphQL - when REST API is not enough - lessons learned
GraphQL - when REST API is not enough - lessons learnedMarcinStachniuk
 
A GWT Application with MVP Pattern Deploying to CloudFoundry using Spring Roo
A GWT Application with MVP Pattern Deploying to CloudFoundry using  Spring Roo A GWT Application with MVP Pattern Deploying to CloudFoundry using  Spring Roo
A GWT Application with MVP Pattern Deploying to CloudFoundry using Spring Roo Ali Parmaksiz
 
Cnam azure 2014 mobile services
Cnam azure 2014   mobile servicesCnam azure 2014   mobile services
Cnam azure 2014 mobile servicesAymeric Weinbach
 
Vavr Java User Group Rheinland
Vavr Java User Group RheinlandVavr Java User Group Rheinland
Vavr Java User Group RheinlandDavid Schmitz
 
GraphQL - when REST API is to less - lessons learned
GraphQL - when REST API is to less - lessons learnedGraphQL - when REST API is to less - lessons learned
GraphQL - when REST API is to less - lessons learnedMarcinStachniuk
 
Spring Web Services: SOAP vs. REST
Spring Web Services: SOAP vs. RESTSpring Web Services: SOAP vs. REST
Spring Web Services: SOAP vs. RESTSam Brannen
 
Wann soll ich mocken?
Wann soll ich mocken?Wann soll ich mocken?
Wann soll ich mocken?David Völkel
 
Paintfree Object-Document Mapping for MongoDB by Philipp Krenn
Paintfree Object-Document Mapping for MongoDB by Philipp KrennPaintfree Object-Document Mapping for MongoDB by Philipp Krenn
Paintfree Object-Document Mapping for MongoDB by Philipp KrennJavaDayUA
 
GraphQL - when REST API is to less - lessons learned
GraphQL - when REST API is to less - lessons learnedGraphQL - when REST API is to less - lessons learned
GraphQL - when REST API is to less - lessons learnedMarcinStachniuk
 
async/await in Swift
async/await in Swiftasync/await in Swift
async/await in SwiftPeter Friese
 

Semelhante a Aesthetics and the Beauty of an Architecture (20)

TDC2016SP - Trilha .NET
TDC2016SP - Trilha .NETTDC2016SP - Trilha .NET
TDC2016SP - Trilha .NET
 
TDC2016POA | Trilha .NET - CQRS e ES na prática com RavenDB
TDC2016POA | Trilha .NET - CQRS e ES na prática com RavenDBTDC2016POA | Trilha .NET - CQRS e ES na prática com RavenDB
TDC2016POA | Trilha .NET - CQRS e ES na prática com RavenDB
 
Websockets talk at Rubyconf Uruguay 2010
Websockets talk at Rubyconf Uruguay 2010Websockets talk at Rubyconf Uruguay 2010
Websockets talk at Rubyconf Uruguay 2010
 
Eve - REST API for Humans™
Eve - REST API for Humans™Eve - REST API for Humans™
Eve - REST API for Humans™
 
Bare-knuckle web development
Bare-knuckle web developmentBare-knuckle web development
Bare-knuckle web development
 
Writing Good Tests
Writing Good TestsWriting Good Tests
Writing Good Tests
 
Andriy Slobodyanyk "How to Use Hibernate: Key Problems and Solutions"
Andriy Slobodyanyk "How to Use Hibernate: Key Problems and Solutions"Andriy Slobodyanyk "How to Use Hibernate: Key Problems and Solutions"
Andriy Slobodyanyk "How to Use Hibernate: Key Problems and Solutions"
 
Server side data sync for mobile apps with silex
Server side data sync for mobile apps with silexServer side data sync for mobile apps with silex
Server side data sync for mobile apps with silex
 
GraphQL - when REST API is not enough - lessons learned
GraphQL - when REST API is not enough - lessons learnedGraphQL - when REST API is not enough - lessons learned
GraphQL - when REST API is not enough - lessons learned
 
A GWT Application with MVP Pattern Deploying to CloudFoundry using Spring Roo
A GWT Application with MVP Pattern Deploying to CloudFoundry using  Spring Roo A GWT Application with MVP Pattern Deploying to CloudFoundry using  Spring Roo
A GWT Application with MVP Pattern Deploying to CloudFoundry using Spring Roo
 
Cnam azure 2014 mobile services
Cnam azure 2014   mobile servicesCnam azure 2014   mobile services
Cnam azure 2014 mobile services
 
Vavr Java User Group Rheinland
Vavr Java User Group RheinlandVavr Java User Group Rheinland
Vavr Java User Group Rheinland
 
GraphQL - when REST API is to less - lessons learned
GraphQL - when REST API is to less - lessons learnedGraphQL - when REST API is to less - lessons learned
GraphQL - when REST API is to less - lessons learned
 
Spring Web Services: SOAP vs. REST
Spring Web Services: SOAP vs. RESTSpring Web Services: SOAP vs. REST
Spring Web Services: SOAP vs. REST
 
Wann soll ich mocken?
Wann soll ich mocken?Wann soll ich mocken?
Wann soll ich mocken?
 
SOLID Principles
SOLID PrinciplesSOLID Principles
SOLID Principles
 
Paintfree Object-Document Mapping for MongoDB by Philipp Krenn
Paintfree Object-Document Mapping for MongoDB by Philipp KrennPaintfree Object-Document Mapping for MongoDB by Philipp Krenn
Paintfree Object-Document Mapping for MongoDB by Philipp Krenn
 
GraphQL - when REST API is to less - lessons learned
GraphQL - when REST API is to less - lessons learnedGraphQL - when REST API is to less - lessons learned
GraphQL - when REST API is to less - lessons learned
 
Intro to Sail.js
Intro to Sail.jsIntro to Sail.js
Intro to Sail.js
 
async/await in Swift
async/await in Swiftasync/await in Swift
async/await in Swift
 

Último

Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditSkynet Technologies
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 

Último (20)

Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance Audit
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 

Aesthetics and the Beauty of an Architecture

  • 1. Aesthetics & the Beauty of an Architecture Adventures in CQRS & Event Sourcing Tom Scott @tomwscott
  • 2. What’s in it for you? • Understanding of CQRS & Event Sourcing in the wild • The mistakes we made… • … the lessons we learnt … • … and why we’re still happy! rob.knight
  • 3. 1 art |ɑːt| noun 1 [ mass noun ] the expression or application of human creative skill and imagination, typically in a visual form such as painting or sculpture, producing works to be appreciated primarily for their beauty or emotional power
  • 4. 1 art |ɑːt| noun 1 [ mass noun ] the expression or application of human creative skill and imagination, typically in a visual form such as painting or sculpture, producing works to be appreciated primarily for their beauty or emotional power
  • 6. Aesthetics Scott’s Purely Arbitrary Criteria, Etceteras For Evaluating Beautiful Architectures #SPACE_FEBA
  • 11. Metaphor Petar Pavlov - http://bit.ly/9ySEUt
  • 14. #SPACE_FEBA • Fully Operational • Simplicity • Deferred Commitment
 • Metaphor • Discipline • Serendipity
  • 16. The evolution of a system Presentation Application Database   |
  • 18. Architectural Goals • Structured • Horizontal Scalability • Availability & Reliability
 • Visibility / Monitorability • Flexibility & Replaceability archer10
  • 19. The Mandate! • Service Oriented Architecture • Domain Driven Design • Micro-Services
 • Continuous Delivery • Oh and one more thing! archer10
  • 20. Domain Driven Design • Entity • Value Object • Aggregate • Service
 • Repository • Factory • Bounded Context archer10
  • 21. Domain Driven Design • Entity • Value Object • Aggregate • Service
 • Repository • Factory • Bounded Context archer10
  • 25. Just one more thing… http://m.cdn.blog.hu/ke/kedvessigmund/image/columbo.jpg
  • 26. CQRS & Event Sourcing • CQRS or “Why do we use the same schema for reads and writes?” • Event Sourcing or “Why do we allow ORMs to dictate our object model?” archer10
  • 27. CQRS
  • 28. Command Query Responsibility Segregation   } } write read
  • 29. Use SQL?   {   {          “_id”  :  “590b9902”,   UPDATE  Address            “_id”  :  “590b9902”,          “event”  :  “AddressModified”,   SET     umber  =  10,     n        “event”  :  “PolicySpecified”,          “data”  :  {          street  =  ‘Downing  Street’,          “data”  :  {             “number”  :  10,   c           “type”  :  “ContentsInsurance”,               ity  =  ‘London’,     “street”  :  “Downing  Street”,   p             ostcode  =  ‘SW1A  2AA’     “excess”  :  750              “city”  :  “London”,     WHERE  _id  =  ‘590b9902’  }  “postcode”  :  “SW1A  2AA”     }  }     }
  • 30. Event Sourcing (C#)      public  class  Customer  :  AggregateRoot        {                  private  readonly  Guid  id;   !                private  Address  currentAddress;                                  //  Business  Logic                  public  void  ChangeAddress(Address  newAddress)                  {                if  (newAddress.IsValid())             {                                 Raise(new  AddressModified(id,  newAddress));                                 }                  }                 !                //  State  Transition                  public  void  Apply(AddressModified  @event)                    {                          currentAddress  =  @event.Address;                  }   ! !       ! ! ......                  //  Business  Logic                  public  void  SpecifyCommunicationPreferences(CommunicationPrefs  preferences)                  {                          Raise(new  CommunicationPreferencesSpecified(id,  preferences));                                  
  • 31. Eventual Consistency  POST /risk/new HTTP/1.1 302 ! GET /risk/590b9902:v1 Location: /risk/590b9902:v1
  • 32. What we ended up with:       
  • 35. The Power!      public  class  Customer  :  AggregateRoot        {                  private  readonly  Guid  id;   !                private  Address  currentAddress;   !                public  void  ChangeAddress(Address  newAddress)                  {                                              Raise(new  AddressModified(id,  newAddress));                                        }   !                public  void  Apply(AddressModified  @event)                  {                          currentAddress  =  @event.Address;                  }          }
  • 36. The Power!      public  class  Customer  :  AggregateRoot        {                  private  readonly  Guid  id;   !                private  Address  currentAddress;   !                public  void  ChangeAddress(Address  newAddress)                  {                          if  (currentAddress.IsSignificantlyDifferentFrom(newAddress))                          {                                  Raise(new  CustomerMoved(id,  newAddress));                          }                          else                          {                                  Raise(new  AddressModified(id,  newAddress));                          }                  }   !                public  void  Apply(CustomerMoved  @event)                  {                          currentAddress  =  @event.Address;                  }   !                public  void  Apply(AddressModified  @event)                  {                          currentAddress  =  @event.Address;                  }          }
  • 37. The Flexibility! var  connection  =  rabbit.createConnection({  url:  ‘amqp://localhost:5672'  })   ! connection.on('ready',  function  ()  {          console.info('Connected');          exchange  =  connection.exchange('SOURCE:Exchange',  {  'type':  'topic',  durable:  true  },  function   ()  {                  var  queue  =  connection.queue('PROJECTION:Map',  {  durable:  false,  exclusive:  true  },                  function  ()  {                          console.info("Joined  Queue");                          queue.subscribe(function  (message,  headers,  deliveryInfo)  {                                  var  policyDetails  =  JSON.parse(message.data.toString());                                  io.sockets.emit('postcode',  policyDetails.Address.Postcode);                          });                          queue.bind(exchange.name,  'AddressDetailsSpecified');                  });                  queue.on('queueBindOk',  function  ()  {  console.info('Bound  queue  to  exchange');  });          });   ! });
  • 38. Is it a silver bullet?
  • 39. Lessons Learnt • Prefer simpler communication protocols • Messaging == Push == Transient, • HTTP == Pull == Permanent • Difficult to evolve Domain Events • Events as the system contract rob.knight