SlideShare a Scribd company logo
1 of 51
ABOUT ME
Developer @Adform – www.adform.com
https://lt.linkedin.com/in/raimondastijunaitis
WHAT THIS TALK IS NOT ABOUT
„Best Practices“
Deep dive into DDD, CQRS, Event Sourcing
Refactoring
WHAT IT IS ABOUT
Common (for some of us) software complexity
issues
Techniques that might help and were tried in
production
Continuous/Iterative decoupling
THE DUNGEON
ISSUES
Platform coupling
Model ambiguity
Growing learning curve
SCREW MUSHROOMS, GIVE ME GUNS
LEVEL 1 – DE-NORMALIZED MODELS
Specifically designed for quering
Built asynchronously
Messages dispatched from legacy code
SALVATION WITH EVENTS
Send Message
DE-NORMALIZED MODEL
Project
Ad
Deactivated
Ad
Updated
Ad
Created
OTHER POSSIBLE WAYS
SQL Server replications
Depends on consumer count and your system load
Replicates the same relational structure
SQL Server Message Broker
Queue based message publishing
Custom data messages
Re-use write-model + caching
Be careful with excessive indexing – this might harm your
writes
Cache rebuild and invalidation issues
READ MODELS
NEW WEAPON UNLOCKED
MEET NEW ENEMIES (FRIENDS?)
Eventual consistency
Consistency is a myth
Talk with your business people
Tradeoffs
Idempotency and ordering
Event versions
Read-model versions
What about 1 thread?
Desynchronization
Create sync tools
LEVEL 2 – SYNERGY BETWEEN SYSTEMS
Avoid adding new features into monolith
Avoid big-bang reworks
Use strategic design to handle complexity
REWORK != REFACTORING
Two systems side-by-
side works together
Iterative functionality
migration
In-syncOld
System
New
System
Sync
TIP: Sometimes it is
better to start over
TIP: Having backup
strategy keeps your
blood pressure low
TIP: Go live ASAP
SEPARATE INFRASTRUCTURE FROM
BUSINESS LOGIC
TIP: Identify
infrastructure code
and separate it
TIP: Use different
models for different
tasks
STRATEGIC DESIGN
NEW WEAPON UNLOCKED
LEVEL 3: WRITE MODEL DESIGN
Accepts commands
only
Does not provide
reading operations
Commands results into
sequence of events
Events are immutable
and persisted into
EventStore
Commands RabbitMQ
Banner
Management
Service
Event Store
Events
OR ANY OTHER ORM FRAMEWORK
Aggregates emit events
Aggregates are de-hydrated by replaying historical
events
No setters/getters
Respect encapsulation
NO HIBERNATE
TIP: Events and
commands can be very
natural constructs
TIP: Excluding query
operations can
simplify code a lot
COMMANDS AND EVENTS
NEW WEAPON UNLOCKED
LEVEL 4: EVENT STORE
Stores series of immutable events
There is no delete
Acts as “Event Log”
Has built in projection engine
Is not designed for querying
BannerCreated BannerClickUrlsAdded BannerRenamed BannerRenamed
EVENT SOURCING
NEW WEAPON UNLOCKED
Performs left-folding of
historical events
Produces
projections/views into
streams
Event selection
LEVEL 5: PROJECTIONS
Banner Projection
Click Urls
changed
Image
Renamed
Image
Created
Publishing UI Tags
PROJECTIONS
NEW WEAPON UNLOCKED
Two way synchronization
Anti-corruption layer patters
LEVEL 6: STAYING IN SYNC
SYNC: NEW TO OLD
Banner
Event
Event Store
Dispatcher
ACL Service
RabbitMQ
AdministrationDB
Reacts to domain
events
Makes changes into
AdsministrationDB
within small
transactions
Uses Dapper to
simplify persistence
SYNC: OLD TO NEW
Legacy event
ACL Service
RabbitMQ
Reacts to legacy
events
(AdCreated/AdUpd
ated)
ACL transforms
events into
commands
Aggregates are
updated
Banner
Management
Service
Commands From old
system
Events
TIP: Make legacy
integration
interactions explicit
ANTI-CORRUPTION LAYERS
NEW WEAPON UNLOCKED
LEVEL 7: API
This is the only way to interact with your system
Build UI on top of the API
Versioning is difficult – think if you really need it
EXPOSE COMMANDS AS RESOURCES
PUT: http://.../ImageBaner/{uuid}/Name
Command: RenameBanner
PUT: http://.../ImageBaner/{uuid}/File
Command: ReuploadFile
HYPERMEDIA – HELP YOUR CLIENT
GET: http://.../ImageBanner/{uuid}
HTTP API
NEW WEAPON UNLOCKED
LEVEL 8: UI & UX
Excel is already invented, it’s pretty damn good
UI must be built on top of your API
Guide user through business process
BEFORE
AFTER
TIP: Build UI to solve
business cases but
not to edit data
TIP: Exposing tasks
can reduce overhead
for users and for
developers
TIP: Build UI on top
of the API
TASK BASED UI
NEW WEAPON UNLOCKED
LEVEL 9: TROUBLESHOOTING AND
DEBUGGING
There is no F5 in distributed systems
Correlate all your requests and messages
Use centralized logging services
INSIDE THE RABBIT HOLE
REST
API
Domain
Service
ACL
Service
ES
Dispatcher
Service
Creative
Upload
API
Creative
Upload
Service
Ad
Analyzer
Service
File
Checker
Service
File
Generation
Service
Publishing
Service
Preview
Service
TRACK OPERATIONS
TIP: Track every
operation performance –
this helps to identify
bottlenecks
TIP: Automate load tests
and run them often.
CORRELATION IDS
NEW ITEM UNLOCKED: NIGHT VISION
YOU DON’T NEED THEM ALL - CHOOSE WISELY
De-normalized read models
Strategic design
CQRS
Event sourcing
Projections
ACLs
REST API
Task based UI
Centralized logs
LOTS OF GUNS
BUT WHAT IF…
No guns for
You!!!
ADAPT TO BUSINESS THINKING
Avoid – technical arguments
Code quality is poor
We need to refactor
Technology is old
Everyone is using Angular
now…
Missing “best practices”
We want to try NoSQL…
Prefer – economical arguments
Releases every day
Faster feature development
New products
Involve more developers
MS licenses are expensive…
DON’T GET LOST IN A DUNGEON
Have a VISION
COMMIT
Define Your STRATEGY
Create TACTICS
FIGHT
ADOPT new tactics
Fight HARDER
WIN
Raimondas tijunaitis tackle_big_ball_of_mud_super_mario_style

More Related Content

Similar to Raimondas tijunaitis tackle_big_ball_of_mud_super_mario_style

Event Storming & Event Sourcing with Lagom
Event Storming & Event Sourcing with LagomEvent Storming & Event Sourcing with Lagom
Event Storming & Event Sourcing with LagomGernot Schulmeister
 
RailswayCon 2010 - Command Your Domain
RailswayCon 2010 - Command Your DomainRailswayCon 2010 - Command Your Domain
RailswayCon 2010 - Command Your DomainLourens Naudé
 
arch_mtg_sqlsig_hcotter_replication.ppt
arch_mtg_sqlsig_hcotter_replication.pptarch_mtg_sqlsig_hcotter_replication.ppt
arch_mtg_sqlsig_hcotter_replication.pptssuser418eef
 
Advanced PowerShell Automation
Advanced PowerShell AutomationAdvanced PowerShell Automation
Advanced PowerShell Automationkieranjacobsen
 
Best practices for creating modular Web applications
Best practices for creating modular Web applicationsBest practices for creating modular Web applications
Best practices for creating modular Web applicationspeychevi
 
Product! - The road to production deployment
Product! - The road to production deploymentProduct! - The road to production deployment
Product! - The road to production deploymentFilippo Zanella
 
Building A Scalable Architecture
Building A Scalable ArchitectureBuilding A Scalable Architecture
Building A Scalable Architecturebhavintu79
 
Write Powerful Javascript Modules To Make Your Apps DRY (Brian Leathem)
Write Powerful Javascript Modules To Make Your Apps DRY (Brian Leathem)Write Powerful Javascript Modules To Make Your Apps DRY (Brian Leathem)
Write Powerful Javascript Modules To Make Your Apps DRY (Brian Leathem)Red Hat Developers
 
10 commandments for writing spiffy Lightning Apps
10 commandments for writing spiffy Lightning Apps10 commandments for writing spiffy Lightning Apps
10 commandments for writing spiffy Lightning AppsAnup Jadhav
 
Managing Software from Development to Deployment in the Cloud
Managing Software from Development to Deployment in the CloudManaging Software from Development to Deployment in the Cloud
Managing Software from Development to Deployment in the CloudCloudBees
 
Re-use Your Skills and Code to Expand the Reach of Your Apps with Silverlight
Re-use Your Skills and Code to Expand the Reach of Your Apps with SilverlightRe-use Your Skills and Code to Expand the Reach of Your Apps with Silverlight
Re-use Your Skills and Code to Expand the Reach of Your Apps with SilverlightFrank La Vigne
 
WSO2Con US 2013 - Keynote: Developing Enterprise Apps In the Cloud
WSO2Con US 2013 - Keynote: Developing Enterprise Apps In the CloudWSO2Con US 2013 - Keynote: Developing Enterprise Apps In the Cloud
WSO2Con US 2013 - Keynote: Developing Enterprise Apps In the CloudWSO2
 
Drools & jBPM Info Sheet
Drools & jBPM Info SheetDrools & jBPM Info Sheet
Drools & jBPM Info SheetMark Proctor
 
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai..."Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...Fwdays
 
Windows Phone 7 Unleashed Session 1
Windows Phone 7 Unleashed Session 1Windows Phone 7 Unleashed Session 1
Windows Phone 7 Unleashed Session 1Wes Yanaga
 
Architecting with a 'cloud first' mindset
Architecting  with a 'cloud first' mindsetArchitecting  with a 'cloud first' mindset
Architecting with a 'cloud first' mindsetMarc Mercuri
 
Event Driven Architecture
Event Driven ArchitectureEvent Driven Architecture
Event Driven ArchitectureChris Patterson
 
Highly Scalable User Experience Design: Vaadin and Magnolia
Highly Scalable User Experience Design: Vaadin and MagnoliaHighly Scalable User Experience Design: Vaadin and Magnolia
Highly Scalable User Experience Design: Vaadin and MagnoliaMagnolia
 
ASP.NET Core For The Agile Enterprise
ASP.NET Core For The Agile EnterpriseASP.NET Core For The Agile Enterprise
ASP.NET Core For The Agile EnterpriseDennis Moon
 

Similar to Raimondas tijunaitis tackle_big_ball_of_mud_super_mario_style (20)

Event Storming & Event Sourcing with Lagom
Event Storming & Event Sourcing with LagomEvent Storming & Event Sourcing with Lagom
Event Storming & Event Sourcing with Lagom
 
RailswayCon 2010 - Command Your Domain
RailswayCon 2010 - Command Your DomainRailswayCon 2010 - Command Your Domain
RailswayCon 2010 - Command Your Domain
 
arch_mtg_sqlsig_hcotter_replication.ppt
arch_mtg_sqlsig_hcotter_replication.pptarch_mtg_sqlsig_hcotter_replication.ppt
arch_mtg_sqlsig_hcotter_replication.ppt
 
Advanced PowerShell Automation
Advanced PowerShell AutomationAdvanced PowerShell Automation
Advanced PowerShell Automation
 
Best practices for creating modular Web applications
Best practices for creating modular Web applicationsBest practices for creating modular Web applications
Best practices for creating modular Web applications
 
Product! - The road to production deployment
Product! - The road to production deploymentProduct! - The road to production deployment
Product! - The road to production deployment
 
Building A Scalable Architecture
Building A Scalable ArchitectureBuilding A Scalable Architecture
Building A Scalable Architecture
 
Write Powerful Javascript Modules To Make Your Apps DRY (Brian Leathem)
Write Powerful Javascript Modules To Make Your Apps DRY (Brian Leathem)Write Powerful Javascript Modules To Make Your Apps DRY (Brian Leathem)
Write Powerful Javascript Modules To Make Your Apps DRY (Brian Leathem)
 
10 commandments for writing spiffy Lightning Apps
10 commandments for writing spiffy Lightning Apps10 commandments for writing spiffy Lightning Apps
10 commandments for writing spiffy Lightning Apps
 
Managing Software from Development to Deployment in the Cloud
Managing Software from Development to Deployment in the CloudManaging Software from Development to Deployment in the Cloud
Managing Software from Development to Deployment in the Cloud
 
Re-use Your Skills and Code to Expand the Reach of Your Apps with Silverlight
Re-use Your Skills and Code to Expand the Reach of Your Apps with SilverlightRe-use Your Skills and Code to Expand the Reach of Your Apps with Silverlight
Re-use Your Skills and Code to Expand the Reach of Your Apps with Silverlight
 
WSO2Con US 2013 - Keynote: Developing Enterprise Apps In the Cloud
WSO2Con US 2013 - Keynote: Developing Enterprise Apps In the CloudWSO2Con US 2013 - Keynote: Developing Enterprise Apps In the Cloud
WSO2Con US 2013 - Keynote: Developing Enterprise Apps In the Cloud
 
Drools & jBPM Info Sheet
Drools & jBPM Info SheetDrools & jBPM Info Sheet
Drools & jBPM Info Sheet
 
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai..."Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
 
Windows Phone 7 Unleashed Session 1
Windows Phone 7 Unleashed Session 1Windows Phone 7 Unleashed Session 1
Windows Phone 7 Unleashed Session 1
 
Architecting with a 'cloud first' mindset
Architecting  with a 'cloud first' mindsetArchitecting  with a 'cloud first' mindset
Architecting with a 'cloud first' mindset
 
Event Driven Architecture
Event Driven ArchitectureEvent Driven Architecture
Event Driven Architecture
 
Cto cloud
Cto cloudCto cloud
Cto cloud
 
Highly Scalable User Experience Design: Vaadin and Magnolia
Highly Scalable User Experience Design: Vaadin and MagnoliaHighly Scalable User Experience Design: Vaadin and Magnolia
Highly Scalable User Experience Design: Vaadin and Magnolia
 
ASP.NET Core For The Agile Enterprise
ASP.NET Core For The Agile EnterpriseASP.NET Core For The Agile Enterprise
ASP.NET Core For The Agile Enterprise
 

More from .NET Crowd

Clean architecture
Clean architectureClean architecture
Clean architecture.NET Crowd
 
Quantum Computing With the Q# Language
Quantum Computing With the Q# LanguageQuantum Computing With the Q# Language
Quantum Computing With the Q# Language.NET Crowd
 
Fast IDentity Online New wave of open authentication standards
Fast IDentity Online New wave of open authentication standardsFast IDentity Online New wave of open authentication standards
Fast IDentity Online New wave of open authentication standards.NET Crowd
 
Multi-threading your way out
Multi-threading your way outMulti-threading your way out
Multi-threading your way out.NET Crowd
 
Visual Studio Team Services Extensions by Taavi Kõosaar (@melborp)
Visual Studio Team Services Extensions by Taavi Kõosaar (@melborp)Visual Studio Team Services Extensions by Taavi Kõosaar (@melborp)
Visual Studio Team Services Extensions by Taavi Kõosaar (@melborp).NET Crowd
 
Typescript language
Typescript languageTypescript language
Typescript language.NET Crowd
 
Dependency Injection: išmoktos pamokos
Dependency Injection: išmoktos pamokosDependency Injection: išmoktos pamokos
Dependency Injection: išmoktos pamokos.NET Crowd
 
Tomas Urbonaitis "Introduction to asynchronous persistent messaging with NSer...
Tomas Urbonaitis "Introduction to asynchronous persistent messaging with NSer...Tomas Urbonaitis "Introduction to asynchronous persistent messaging with NSer...
Tomas Urbonaitis "Introduction to asynchronous persistent messaging with NSer....NET Crowd
 
Rokas Balevičius "Logstash - system heartbeat implementation"
Rokas Balevičius "Logstash - system heartbeat implementation"Rokas Balevičius "Logstash - system heartbeat implementation"
Rokas Balevičius "Logstash - system heartbeat implementation".NET Crowd
 
Andrej Slivko "CQRS praktikoje"
Andrej Slivko "CQRS praktikoje"Andrej Slivko "CQRS praktikoje"
Andrej Slivko "CQRS praktikoje".NET Crowd
 
Donatas Mačiūnas "Git - pažabokim istoriją"
Donatas Mačiūnas "Git - pažabokim istoriją"Donatas Mačiūnas "Git - pažabokim istoriją"
Donatas Mačiūnas "Git - pažabokim istoriją".NET Crowd
 

More from .NET Crowd (11)

Clean architecture
Clean architectureClean architecture
Clean architecture
 
Quantum Computing With the Q# Language
Quantum Computing With the Q# LanguageQuantum Computing With the Q# Language
Quantum Computing With the Q# Language
 
Fast IDentity Online New wave of open authentication standards
Fast IDentity Online New wave of open authentication standardsFast IDentity Online New wave of open authentication standards
Fast IDentity Online New wave of open authentication standards
 
Multi-threading your way out
Multi-threading your way outMulti-threading your way out
Multi-threading your way out
 
Visual Studio Team Services Extensions by Taavi Kõosaar (@melborp)
Visual Studio Team Services Extensions by Taavi Kõosaar (@melborp)Visual Studio Team Services Extensions by Taavi Kõosaar (@melborp)
Visual Studio Team Services Extensions by Taavi Kõosaar (@melborp)
 
Typescript language
Typescript languageTypescript language
Typescript language
 
Dependency Injection: išmoktos pamokos
Dependency Injection: išmoktos pamokosDependency Injection: išmoktos pamokos
Dependency Injection: išmoktos pamokos
 
Tomas Urbonaitis "Introduction to asynchronous persistent messaging with NSer...
Tomas Urbonaitis "Introduction to asynchronous persistent messaging with NSer...Tomas Urbonaitis "Introduction to asynchronous persistent messaging with NSer...
Tomas Urbonaitis "Introduction to asynchronous persistent messaging with NSer...
 
Rokas Balevičius "Logstash - system heartbeat implementation"
Rokas Balevičius "Logstash - system heartbeat implementation"Rokas Balevičius "Logstash - system heartbeat implementation"
Rokas Balevičius "Logstash - system heartbeat implementation"
 
Andrej Slivko "CQRS praktikoje"
Andrej Slivko "CQRS praktikoje"Andrej Slivko "CQRS praktikoje"
Andrej Slivko "CQRS praktikoje"
 
Donatas Mačiūnas "Git - pažabokim istoriją"
Donatas Mačiūnas "Git - pažabokim istoriją"Donatas Mačiūnas "Git - pažabokim istoriją"
Donatas Mačiūnas "Git - pažabokim istoriją"
 

Recently uploaded

A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integrationmarketing932765
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...itnewsafrica
 
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
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructureitnewsafrica
 
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
 
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
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
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
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
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
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
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
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 

Recently uploaded (20)

A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
 
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
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
 
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
 
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
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
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
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
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.
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
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
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 

Raimondas tijunaitis tackle_big_ball_of_mud_super_mario_style

  • 1.
  • 2. ABOUT ME Developer @Adform – www.adform.com https://lt.linkedin.com/in/raimondastijunaitis
  • 3. WHAT THIS TALK IS NOT ABOUT „Best Practices“ Deep dive into DDD, CQRS, Event Sourcing Refactoring
  • 4. WHAT IT IS ABOUT Common (for some of us) software complexity issues Techniques that might help and were tried in production Continuous/Iterative decoupling
  • 8. LEVEL 1 – DE-NORMALIZED MODELS Specifically designed for quering Built asynchronously Messages dispatched from legacy code
  • 11. OTHER POSSIBLE WAYS SQL Server replications Depends on consumer count and your system load Replicates the same relational structure SQL Server Message Broker Queue based message publishing Custom data messages Re-use write-model + caching Be careful with excessive indexing – this might harm your writes Cache rebuild and invalidation issues
  • 13. MEET NEW ENEMIES (FRIENDS?) Eventual consistency Consistency is a myth Talk with your business people Tradeoffs Idempotency and ordering Event versions Read-model versions What about 1 thread? Desynchronization Create sync tools
  • 14. LEVEL 2 – SYNERGY BETWEEN SYSTEMS Avoid adding new features into monolith Avoid big-bang reworks Use strategic design to handle complexity
  • 15. REWORK != REFACTORING Two systems side-by- side works together Iterative functionality migration In-syncOld System New System Sync
  • 16. TIP: Sometimes it is better to start over TIP: Having backup strategy keeps your blood pressure low TIP: Go live ASAP
  • 18. TIP: Identify infrastructure code and separate it TIP: Use different models for different tasks
  • 20. LEVEL 3: WRITE MODEL DESIGN Accepts commands only Does not provide reading operations Commands results into sequence of events Events are immutable and persisted into EventStore Commands RabbitMQ Banner Management Service Event Store Events
  • 21. OR ANY OTHER ORM FRAMEWORK Aggregates emit events Aggregates are de-hydrated by replaying historical events No setters/getters Respect encapsulation NO HIBERNATE
  • 22. TIP: Events and commands can be very natural constructs TIP: Excluding query operations can simplify code a lot
  • 23. COMMANDS AND EVENTS NEW WEAPON UNLOCKED
  • 24. LEVEL 4: EVENT STORE Stores series of immutable events There is no delete Acts as “Event Log” Has built in projection engine Is not designed for querying BannerCreated BannerClickUrlsAdded BannerRenamed BannerRenamed
  • 26. Performs left-folding of historical events Produces projections/views into streams Event selection LEVEL 5: PROJECTIONS Banner Projection Click Urls changed Image Renamed Image Created Publishing UI Tags
  • 28. Two way synchronization Anti-corruption layer patters LEVEL 6: STAYING IN SYNC
  • 29. SYNC: NEW TO OLD Banner Event Event Store Dispatcher ACL Service RabbitMQ AdministrationDB Reacts to domain events Makes changes into AdsministrationDB within small transactions Uses Dapper to simplify persistence
  • 30. SYNC: OLD TO NEW Legacy event ACL Service RabbitMQ Reacts to legacy events (AdCreated/AdUpd ated) ACL transforms events into commands Aggregates are updated Banner Management Service Commands From old system Events
  • 33. LEVEL 7: API This is the only way to interact with your system Build UI on top of the API Versioning is difficult – think if you really need it
  • 34. EXPOSE COMMANDS AS RESOURCES PUT: http://.../ImageBaner/{uuid}/Name Command: RenameBanner PUT: http://.../ImageBaner/{uuid}/File Command: ReuploadFile
  • 35. HYPERMEDIA – HELP YOUR CLIENT GET: http://.../ImageBanner/{uuid}
  • 37. LEVEL 8: UI & UX Excel is already invented, it’s pretty damn good UI must be built on top of your API Guide user through business process
  • 39. AFTER
  • 40. TIP: Build UI to solve business cases but not to edit data TIP: Exposing tasks can reduce overhead for users and for developers TIP: Build UI on top of the API
  • 41. TASK BASED UI NEW WEAPON UNLOCKED
  • 42. LEVEL 9: TROUBLESHOOTING AND DEBUGGING There is no F5 in distributed systems Correlate all your requests and messages Use centralized logging services
  • 43. INSIDE THE RABBIT HOLE REST API Domain Service ACL Service ES Dispatcher Service Creative Upload API Creative Upload Service Ad Analyzer Service File Checker Service File Generation Service Publishing Service Preview Service
  • 45. TIP: Track every operation performance – this helps to identify bottlenecks TIP: Automate load tests and run them often.
  • 46. CORRELATION IDS NEW ITEM UNLOCKED: NIGHT VISION
  • 47. YOU DON’T NEED THEM ALL - CHOOSE WISELY De-normalized read models Strategic design CQRS Event sourcing Projections ACLs REST API Task based UI Centralized logs LOTS OF GUNS
  • 48. BUT WHAT IF… No guns for You!!!
  • 49. ADAPT TO BUSINESS THINKING Avoid – technical arguments Code quality is poor We need to refactor Technology is old Everyone is using Angular now… Missing “best practices” We want to try NoSQL… Prefer – economical arguments Releases every day Faster feature development New products Involve more developers MS licenses are expensive…
  • 50. DON’T GET LOST IN A DUNGEON Have a VISION COMMIT Define Your STRATEGY Create TACTICS FIGHT ADOPT new tactics Fight HARDER WIN