Upload
mimmozzo
View
701
Download
3
Embed Size (px)
Citation preview
Who am I ?
What do I do ?
.NET
Web REST
AgileAutomation Testing
C#Team leading
Ruby
Agenda
• SOA
• EDA
• Communication patterns
• Advantages
• Disadvantages
• Q & A
Where is Agile going ?
PROCESS MATTERS
CODE MATTERS
Agile = no work upfront
Agile = no work upfront
No work upfront = no architecture planning
Architecture is not design
Agile = no work upfront
No work upfront = no architecture planning
Agile = no work upfront
No work upfront = no architecture planning
Agile = no design upfront
We can start now
A big code base…
• Build time
• Difficult to test
• No real boundaries
Does not scale
Event Driven Architecture
• Architecture is mainly business driven
• Business capabilities
Business capability
• Owns a part of the system
• Well defined responsibilities
• Owns a model (set of entities)
• Set of components (services, api)
• Isolated database
• Isolated deploy
SOA
FILES
DISCUSSIONS MEETINGS
TASKS
SOA FLOW
FILES
DISCUSSIONS MEETINGS
TASKS
SOA FLOW
FILES
DISCUSSIONS MEETINGS
TASKS
SOA FLOW
FILES
DISCUSSIONS MEETINGS
TASKS
SOA FLOW
EDA FLOW
FILES DISCUSSIONS MEETINGSTASKS
COMMUNICATION CHANNEL
Upload document with SOA
FILESCLIENTUpload document
TASKS NOTIFICATION PREVIEW
Upload document with EDA
FILESCLIENTUpload document
COMMUNICATION CHANNEL
TASKS NOTIFICATION PREVIEW
Communication patterns
• Database
• Files
• Messaging
Channels
• Logical address
• Datatype
• Events
• Commands
• Document Messages
Types of messages
A simple event
• ID
• Past sequence
• Informing the outside world that something happened
NewDocumentUploaded
{
Id:1,
DocumentId:100
}
Commands
SendEmail{
Id: 100,
To: ‘[email protected]’,
From: ‘[email protected]’,
Subject: ‘Welcome to huddle’,
Content: ‘Enjoy’
}
Document Message
UserRegistered{
Id: 100,
Name: ‘Domenico’,
LastName: ‘Musto’,
Email: ‘[email protected]’,
Twitter: ‘@mimmozzo’,
Avatar: ‘http://my.huddle.net/mimmozzo/avatar’
}
Reference Data
COMM. CHANNEL
NOTIFICATION
NewDocumentUploaded{
Id:1,DocumentId:100,WorkspaceId:200
}
FILES
PEOPLE
COMM.CHANNEL
UserRegistered{
Id: 100,Name: ‘Domenico’,LastName: ‘Musto’,Email: ‘[email protected]’,Address: ‘London’,Twitter: ‘@mimmozzo’,Avatar: ‘http://my.huddle.net/mimmozzo/avatar’
}
COMM. CHANNEL
NOTIFICATION
Recipient
Id : intEmail : string
Eventual consistency
PEOPLE
COMM.CHANNEL
UserUpdated{
Id: 100,Email: ‘[email protected]’SomeField: ‘some_value’
}
NOTIFICATION
COMM. CHANNEL
NOTIFICATION
RECIPIENTS
Messages order
Versioning
PEOPLE
COMM.CHANNEL
UserUpdated{
Id: 100,Email: ‘[email protected]’,SomeField: ‘some_value’,Version: 3
}
COMM. CHANNEL
NOTIFICATION
Recipient
Id : 100Email : ‘[email protected]’Version: 1
PEOPLE
COMM.CHANNEL
UserUpdated{
Id: 100,Email: ‘[email protected]’,SomeField: ‘some_value’,Version: 2
}
COMM. CHANNEL
NOTIFICATION
Recipient
Id : 100Email : ‘[email protected]’Version: 3
Idempotency
Ability to replay messages
Events publisher
PEOPLE PEOPLEEVENTS
PEOPLE EVENT PUBLISHER
COMMUNICATION CHANNEL
Testing
Our infrastructure
• RabbitMQ
• Reactive Extensions
• JSON as message format
Business monitoring
Big picture
Thanks.
@mimmozzo [email protected]