- The speaker discusses their experience contributing to the Magento Multi-Source Inventory (MSI) project, noting the learning opportunities and satisfaction of helping others.
- They describe how the Command Query Responsibility Segregation (CQRS) and Event Sourcing patterns were applied to MSI to separate read and write operations, improving performance and flexibility.
- The key lessons are that simplification through separation of concerns can be better than unification, and that software design is an important skill beyond just coding.
These days, you can’t swing a dry erase marker without hitting someone talking about microservices. Developers are studying Eric Evans' prescient book, Domain-Driven Design. Teams are refactoring monolithic apps, looking for bounded contexts and defining a ubiquitous language. And although there have been countless articles, videos, and talks to help you convert to microservices, few have spent any appreciable time asking if a given application should be a microservice. In this talk, I‘ll show you a set of factors you can apply to help you decide if something deserves to be a microservice or not. We’ll also look at what we need to do to maintain a healthy micro(services)biome.
Google Tag Manager - 5 years. What have we learned?Simo Ahava
Looking back on five years of Google Tag Manager. Has the tool changed? Have we? What's coming up in the next 5 years?
My talk at MeasureCamp #11 (London).
These days, you can’t swing a dry erase marker without hitting someone talking about microservices. Developers are studying Eric Evans' prescient book, Domain-Driven Design. Teams are refactoring monolithic apps, looking for bounded contexts and defining a ubiquitous language. And although there have been countless articles, videos, and talks to help you convert to microservices, few have spent any appreciable time asking if a given application should be a microservice. In this talk, I‘ll show you a set of factors you can apply to help you decide if something deserves to be a microservice or not. We’ll also look at what we need to do to maintain a healthy micro(services)biome.
Google Tag Manager - 5 years. What have we learned?Simo Ahava
Looking back on five years of Google Tag Manager. Has the tool changed? Have we? What's coming up in the next 5 years?
My talk at MeasureCamp #11 (London).
Startup Metrics, a love story. All slides of an 6h Lean Analytics workshop.Andreas Klinger
Everything you need to know about Startup Product Metrics.
This is a slideshare exclusive. The full 8hour workshop deck.
#iCatapult Workshop - 2013-08-12
Links:
http://klinger.io/
http://icatapult.co/
Engagement is the New Anchor Text - Stephen Kenwright - SMX London May 2017Branded3
Branded3's Director of Search Stephen Kenwright, looks at whether 'Engagement is the New Anchor Text' and how you can future-proof your SEO. Delivered at London's SMX, May 2017.
Applying BigQuery ML on e-commerce data analyticsMárton Kodok
With BigQuery ML, you can build machine learning models without leaving the database environment and training it on massive datasets. We are going to demonstrate common marketing Machine Learning use cases we do at REEA.net to build, train, eval and predict, your own scalable machine learning models using SQL language in Google BigQuery and to address the following use cases:
Customer Segmentation
Customer Lifetime Value (LTV) prediction
Conversion/Purchase prediction
The audience will get first hand experience how to write CREATE MODEL sql syntax to build machine learning models such as:
Multiclass logistic regression for classification
K-means clustering
Import TensorFlow models for prediction in BigQuery
Models are trained and accessed in BigQuery using SQL — a language data analysts know. This enables business decision making through predictive analytics across the organization without leaving the query editor
How to become Data Driven for startups - keboolaPavel Dolezal
Startups are interesting place. Magic happens there when they're trying to find their product/market fit. Sometimes they forget to measure their success so it is hard to repeat it. We help lot's of them to find their data mojo. This is a short intro to metrics, data collection and what to focus on.
Purpose of this presentation is to highlight how end to end machine learning looks like in real world enterprise. This is to provide insight to aspiring data scientist who have been through courses or education in ML that mostly focus on ML algorithms and not end to end pipeline.
Architecture and components mentioned in Slide 11 will be discussed in detailed in series of post on LinkedIn over the course of next few month
To get updates on this follow me on LinkedIn or search/follow hashtag #end2endDS. Post will be active in August 2019 and will be posted till September 2019
Uncovering 'not provided' keyword data Clayton Wood
The platform can set up all of the filters and views in Google Analytics automatically. There's a free version so you can build one on your own as well.
The Speed Update: Faster is Better for Everyone [Aleh Barysevich, SMXeast 2018]Link-Assistant.Com
This session is a comprehensive tutorial on optimizing your site for speed. Get a detailed plan for optimizing page resources – site images, CSS, JS, HTML and more – to reduce page load times to increase engagement, conversions and SERP rankings.
ML game metrics monitoring system launch / Aleksandr Tolmachev (Xsolla)DevGAMM Conference
How we launched an automatic system for monitoring anomalies in the metrics of our company from partners in order to respond to problems in time. The pain of the fact that there really is a statistically anomaly in the time series, but from the point of view of people, it turns out to be sooooo much that it is not an anomaly at all. How we made statistics and business users friendly
It will be relevant to midt shooting and enterpricing for game dev developers where there is at least the slightest bit of understanding of metrics and a desire to protect them and pain with it by 95%
Writing Good User Stories (Hint: It's not about writing)one80
User stories are typically the foundation of the Product Backlog. However, the original purpose has been lost. This is from a presentation that was given to help remind everyone of what User Stories are, and what they aren't. The purpose of User Stories is to drive conversations, not to hand "requirements" from one group to the next.
Meet Magento IT 2021 - Principles & Advantages of Hexagonal Architecture on M...Alessandro Ronchi
These are the slides of the presentation of how to apply principles of hexagonal architecture in a Magento extension.
The sample project can be found here: https://github.com/aleron75/ddd_loyaly_card/
This work is based on the book by Matthias Noback: Advanced Web Application Architecture - https://matthiasnoback.nl/book/advanced-web-application-architecture/
Startup Metrics, a love story. All slides of an 6h Lean Analytics workshop.Andreas Klinger
Everything you need to know about Startup Product Metrics.
This is a slideshare exclusive. The full 8hour workshop deck.
#iCatapult Workshop - 2013-08-12
Links:
http://klinger.io/
http://icatapult.co/
Engagement is the New Anchor Text - Stephen Kenwright - SMX London May 2017Branded3
Branded3's Director of Search Stephen Kenwright, looks at whether 'Engagement is the New Anchor Text' and how you can future-proof your SEO. Delivered at London's SMX, May 2017.
Applying BigQuery ML on e-commerce data analyticsMárton Kodok
With BigQuery ML, you can build machine learning models without leaving the database environment and training it on massive datasets. We are going to demonstrate common marketing Machine Learning use cases we do at REEA.net to build, train, eval and predict, your own scalable machine learning models using SQL language in Google BigQuery and to address the following use cases:
Customer Segmentation
Customer Lifetime Value (LTV) prediction
Conversion/Purchase prediction
The audience will get first hand experience how to write CREATE MODEL sql syntax to build machine learning models such as:
Multiclass logistic regression for classification
K-means clustering
Import TensorFlow models for prediction in BigQuery
Models are trained and accessed in BigQuery using SQL — a language data analysts know. This enables business decision making through predictive analytics across the organization without leaving the query editor
How to become Data Driven for startups - keboolaPavel Dolezal
Startups are interesting place. Magic happens there when they're trying to find their product/market fit. Sometimes they forget to measure their success so it is hard to repeat it. We help lot's of them to find their data mojo. This is a short intro to metrics, data collection and what to focus on.
Purpose of this presentation is to highlight how end to end machine learning looks like in real world enterprise. This is to provide insight to aspiring data scientist who have been through courses or education in ML that mostly focus on ML algorithms and not end to end pipeline.
Architecture and components mentioned in Slide 11 will be discussed in detailed in series of post on LinkedIn over the course of next few month
To get updates on this follow me on LinkedIn or search/follow hashtag #end2endDS. Post will be active in August 2019 and will be posted till September 2019
Uncovering 'not provided' keyword data Clayton Wood
The platform can set up all of the filters and views in Google Analytics automatically. There's a free version so you can build one on your own as well.
The Speed Update: Faster is Better for Everyone [Aleh Barysevich, SMXeast 2018]Link-Assistant.Com
This session is a comprehensive tutorial on optimizing your site for speed. Get a detailed plan for optimizing page resources – site images, CSS, JS, HTML and more – to reduce page load times to increase engagement, conversions and SERP rankings.
ML game metrics monitoring system launch / Aleksandr Tolmachev (Xsolla)DevGAMM Conference
How we launched an automatic system for monitoring anomalies in the metrics of our company from partners in order to respond to problems in time. The pain of the fact that there really is a statistically anomaly in the time series, but from the point of view of people, it turns out to be sooooo much that it is not an anomaly at all. How we made statistics and business users friendly
It will be relevant to midt shooting and enterpricing for game dev developers where there is at least the slightest bit of understanding of metrics and a desire to protect them and pain with it by 95%
Writing Good User Stories (Hint: It's not about writing)one80
User stories are typically the foundation of the Product Backlog. However, the original purpose has been lost. This is from a presentation that was given to help remind everyone of what User Stories are, and what they aren't. The purpose of User Stories is to drive conversations, not to hand "requirements" from one group to the next.
Meet Magento IT 2021 - Principles & Advantages of Hexagonal Architecture on M...Alessandro Ronchi
These are the slides of the presentation of how to apply principles of hexagonal architecture in a Magento extension.
The sample project can be found here: https://github.com/aleron75/ddd_loyaly_card/
This work is based on the book by Matthias Noback: Advanced Web Application Architecture - https://matthiasnoback.nl/book/advanced-web-application-architecture/
The slides of my talk at Meet Magento Netherlands 2016, based on the article published on: https://medium.com/@aleron75/why-i-did-one-step-backward-to-go-forward-79d8316bafc
UiPath Test Automation using UiPath Test Suite series, part 6DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 6. In this session, we will cover Test Automation with generative AI and Open AI.
UiPath Test Automation with generative AI and Open AI webinar offers an in-depth exploration of leveraging cutting-edge technologies for test automation within the UiPath platform. Attendees will delve into the integration of generative AI, a test automation solution, with Open AI advanced natural language processing capabilities.
Throughout the session, participants will discover how this synergy empowers testers to automate repetitive tasks, enhance testing accuracy, and expedite the software testing life cycle. Topics covered include the seamless integration process, practical use cases, and the benefits of harnessing AI-driven automation for UiPath testing initiatives. By attending this webinar, testers, and automation professionals can gain valuable insights into harnessing the power of AI to optimize their test automation workflows within the UiPath ecosystem, ultimately driving efficiency and quality in software development processes.
What will you get from this session?
1. Insights into integrating generative AI.
2. Understanding how this integration enhances test automation within the UiPath platform
3. Practical demonstrations
4. Exploration of real-world use cases illustrating the benefits of AI-driven test automation for UiPath
Topics covered:
What is generative AI
Test Automation with generative AI and Open AI.
UiPath integration with generative AI
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Albert Hoitingh
In this session I delve into the encryption technology used in Microsoft 365 and Microsoft Purview. Including the concepts of Customer Key and Double Key Encryption.
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...SOFTTECHHUB
The choice of an operating system plays a pivotal role in shaping our computing experience. For decades, Microsoft's Windows has dominated the market, offering a familiar and widely adopted platform for personal and professional use. However, as technological advancements continue to push the boundaries of innovation, alternative operating systems have emerged, challenging the status quo and offering users a fresh perspective on computing.
One such alternative that has garnered significant attention and acclaim is Nitrux Linux 3.5.0, a sleek, powerful, and user-friendly Linux distribution that promises to redefine the way we interact with our devices. With its focus on performance, security, and customization, Nitrux Linux presents a compelling case for those seeking to break free from the constraints of proprietary software and embrace the freedom and flexibility of open-source computing.
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...Neo4j
Leonard Jayamohan, Partner & Generative AI Lead, Deloitte
This keynote will reveal how Deloitte leverages Neo4j’s graph power for groundbreaking digital twin solutions, achieving a staggering 100x performance boost. Discover the essential role knowledge graphs play in successful generative AI implementations. Plus, get an exclusive look at an innovative Neo4j + Generative AI solution Deloitte is developing in-house.
Essentials of Automations: The Art of Triggers and Actions in FMESafe Software
In this second installment of our Essentials of Automations webinar series, we’ll explore the landscape of triggers and actions, guiding you through the nuances of authoring and adapting workspaces for seamless automations. Gain an understanding of the full spectrum of triggers and actions available in FME, empowering you to enhance your workspaces for efficient automation.
We’ll kick things off by showcasing the most commonly used event-based triggers, introducing you to various automation workflows like manual triggers, schedules, directory watchers, and more. Plus, see how these elements play out in real scenarios.
Whether you’re tweaking your current setup or building from the ground up, this session will arm you with the tools and insights needed to transform your FME usage into a powerhouse of productivity. Join us to discover effective strategies that simplify complex processes, enhancing your productivity and transforming your data management practices with FME. Let’s turn complexity into clarity and make your workspaces work wonders!
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
Dr. Sean Tan, Head of Data Science, Changi Airport Group
Discover how Changi Airport Group (CAG) leverages graph technologies and generative AI to revolutionize their search capabilities. This session delves into the unique search needs of CAG’s diverse passengers and customers, showcasing how graph data structures enhance the accuracy and relevance of AI-generated search results, mitigating the risk of “hallucinations” and improving the overall customer journey.
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionAggregage
Join Maher Hanafi, VP of Engineering at Betterworks, in this new session where he'll share a practical framework to transform Gen AI prototypes into impactful products! He'll delve into the complexities of data collection and management, model selection and optimization, and ensuring security, scalability, and responsible use.
Maruthi Prithivirajan, Head of ASEAN & IN Solution Architecture, Neo4j
Get an inside look at the latest Neo4j innovations that enable relationship-driven intelligence at scale. Learn more about the newest cloud integrations and product enhancements that make Neo4j an essential choice for developers building apps with interconnected data and generative AI.
2. #MM18PL#MM18PL
@aleron75
Nice to meet you!
Alessandro Ronchi
@aleron75
I believe in passion, innovation,
and continuous improvement.
#COO #Developer @Bitbull_it
#MagentoContributor
These are the key values that drive me during
my daily job as COO and Developer at
Bitbull and as Magento maintainer and
contributor.
If you like it, please follow me.
Me in brief:
- Magento since 2009
- M1 certified dev and M2 solution specialist
- Author of M1 book
- Magento Master 2017
- Magento Top 50 Contributor 2017
- Magento Maintainer since 2018
3. #MM18PL#MM18PL
@aleron75
Long story short
Hey, did you just edit the core?
Yes, we can
Thanks to the Magento Community
Engineering team, Magento truly embraced
the open source spirit becoming open to
contributions and becoming a real
Community-driven platform.
Nowadays, it’s a very well known story so I
want to focus mainly on what motivates me
to contribute to Magento.
4. #MM18PL#MM18PL
@aleron75
WHY?
Now the big question: why to contribute.
There are great learning opportunities we
get by joining such a project; we have the
privilege to work directly with Magento
engineers and other smart members of its
community.
And that would be enough to motivate us.
But a recent episode made me think about an
additional side effect that now motivates
me at least as well: gratitude.
5. #MM18PL#MM18PL
@aleron75
Some weeks ago, on Twitter...
Chris Snedaker
@df2002
@aleron75, @philwinkle happen to
be a couple amazing people who
have helped this situation... and
probably don’t realize it.
So thanks to you two as well
Some days ago, Chris wrote this message,
thanking Philip Jackson and me for
something we did that helped him a lot.
He was answering to a message of
appreciation by his boss about how he
handled a situation during a meeting with a
customer of theirs.
And he was right: I had no clue why he was
thanking me. I wasn’t even sure to know him
at all.
6. #MM18PL#MM18PL
@aleron75
Some days before, on Slack...
But then I realized that some days before, I
answered a question by this guy in the MSI
Slack Channel.
I just gave a simple advice and example
about how to implement something on MSI
and I didn’t realize that it was so important
for him until his tweet, that made my day.
So, learning is great, but being useful to
someone else is even greater. Someone
even says that it’s the secret of happiness.
7. #MM18PL
@aleron75
Learn & Give Back
So this is my first take away: contributing means
having great opportunities to learn and the
privilege to help others, other than
ourselves.
9. #MM18PL#MM18PL
@aleron75
KICK OFF
Sep 2013
May 2017
MM-DE hackathon
MSI – Story & Roadmap
MSI was an internal Magento project whose
first requirement was documented on
September 2013 but its development was
never accomplished.
The Community-driven project was kickstarted
during the contribution day of MM-DE
organized by Firegento in Leipzig on May
2017.
I joined in July 2017.
10. #MM18PL#MM18PL
@aleron75
MSI – Story & Roadmap
KICK OFF
20 May 2017
MM-DE hackathon
MILESTONE I
MVP
Magento 2.3
Three milestones were defined.
The first milestone consists of the minimum
set of functionality (MVP) to let merchants
natively manage multiple stock locations.
It is packed into Magento 2.3, that will be
officially released… I guess very soon.
11. #MM18PL#MM18PL
@aleron75
MSI – Story & Roadmap
KICK OFF
20 May 2017
MM-DE hackathon
MILESTONE I
MVP
Magento 2.3
MILESTONE II
config & mass actions
Magento 2.3.x
The second milestone has already been
developed and contains improvements
related to configuration and mass
inventory actions.
It will be part of Magento 2.3.something, that
means, part of one of the more frequent
patch updates.
12. #MM18PL#MM18PL
@aleron75
MSI – Story & Roadmap
KICK OFF
20 May 2017
MM-DE hackathon
MILESTONE I
MVP
Magento 2.3
MILESTONE III
improvements
Magento 2.x
MILESTONE II
config & mass actions
Magento 2.3.x
The third milestone includes the rest of the
product backlog, that means, a set of
improvements part of which, I guess, will be
driven by user feedback.
13. #MM18PL#MM18PL
@aleron75
KICK OFF
20 May 2017
MM-DE hackathon
MILESTONE I
MVP
Magento 2.3
MILESTONE II
config & mass actions
Magento 2.3.x
MILESTONE III
improvements
Magento 2.x
MSI – Story & Roadmap
Very Important Note: MSI is and will remain a
freely available feature of Magento Open
Source.
14. #MM18PL#MM18PL
@aleron75
#Community
At date, more than 60 ppl and 16 agencies
contributed over time submitting ~700 PRs.
Big project: at date it represents more than
12% of the entire Magento codebase.
Considered a reference for:
- best development practices
- insight of future Magento architecture
- good documentation
15. #MM18PL#MM18PL
@aleron75
Not technical… yet
It’s time to be more technical.
About the lessons learned, I used to talk a lot
about Domain-Driven Design in my previous
presentations but it’s a very intense topic and I
don’t have much time.
Thus, I’ll talk about how we applied the concepts
from CQRS and Event Sourcing to MSI.
16. #MM18PL#MM18PL
@aleron75
Before starting, a necessary disclaimer.
Once we experience the benefits of new
patterns or technologies, we are tempted to
use them everywhere.
There can be some drawbacks or simply “no
additional benefits” with what we will see and
we should always take them into account
instead of applying them blindly.
18. #MM18PL#MM18PL
@aleron75
The beginning: CQS
Bertrand Meyer
@Bertrand_Meyer
Queries return results,
but never change the state.
Commands change the state,
but never return values.
Let’s start from the beginning, that is, from CQS,
introduced by Betrand Meyer in the 1990s.
CQS stands for Command-Query Separation
and it’s an implementation pattern requiring
us to avoid assigning both read and write
responsibility to the same method of a class.
19. #MM18PL#MM18PL
@aleron75
A code snippet is worth a thousand words.
This is an example of code that doesn’t apply
the CQS pattern.
I’m pretty sure that every one of us tends to
avoid such kind of code but don’t give it
always for granted...
20. #MM18PL#MM18PL
@aleron75
This is real code taken from Magento 2 that
doesn’t apply CQS: this method returns a
value (so it’s a query) but it’s also a command
because changes the state of the system,
creating a directory if it doesn’t exist.
21. #MM18PL#MM18PL
@aleron75
Just let me give credits to the guy formerly
known as “Riccardo Tempesta”, nowadays
called The Rick, for pointing me to this
example.
22. #MM18PL#MM18PL
@aleron75
This, instead, is what Meyer means: you can
see in this class we have methods that return
data (queries) separated from methods that
write data (commands) and change the state.
23. #MM18PL#MM18PL
@aleron75
The evolution: CQRS
Greg Young
@gregyoung
Separate systems that represent
the state of the application from
those that change it.
So what’s CQRS? CQRS stands for Command-
Query Responsibility Segregation and despite
the similar name, the difference is remarkable:
it is an architectural pattern.
The responsibility is not only split at method
level but at the model level.
That’s why we talk about segregation.
24. #MM18PL#MM18PL
@aleron75
Again, small code examples are worth a
thousand words.
Here we have two separate classes, one for
reading and one for writing.
Note that the storages used by these two
models can be different even if they don’t
necessarily have to be.
25. #MM18PL#MM18PL
@aleron75
And this is a diagram of how we applied this
paradigm in MSI.
A source is typically a physical place where our
goods are stored, like a warehouse, a depot, a
brick & mortar store.
A source item is an entity through which we
write product availability, changing the state
of the system (typically a backend operation)
26. #MM18PL#MM18PL
@aleron75
A stock is the aggregation of different sources
that determines the total availability of a
product across different sources.
A stock item is an entity through which we read
product availability (typically a frontend
operation)
28. #MM18PL#MM18PL
@aleron75
CQRS: benefits
Single responsibility
Domain simplification
Better resources assignment
CQRS gives us a better understanding of what
is responsible for changing the state of a
system.
This separation brings to domain simplification:
a single model is no more responsible for both
operations, thus they can be assigned to two
simpler models which are also simpler to
adapt to business changes.
Furthermore, since we separate the systems
that write and read, in situations where, for
example, read operations are more frequent
than write ones, we can better assign
resources and scale our application properly.
29. #MM18PL#MM18PL
@aleron75
CQRS: drawbacks
More analysis
Duplication handling
Eventual consistency
CQRS is not a universal solution.
Applying this pattern comes with some
drawbacks and we should always take them into
account when deciding whether to apply it or not
to our application:
- more analysis due to the additional
complication
- duplication handling
- eventual consistency (avoid in transactions)
30. #MM18PL
@aleron75
Simplify vs Unify
Here we come to the second takeaway I want to
leave you: even if duplication handling is listed
among the things to look-out, duplication also
brings simplification or, put differently, lets us
avoid the coupling given by unification.
CQRS and DDD advocate for simplification
over unification.
32. #MM18PL#MM18PL
@aleron75
Event Sourcing
Martin Fowler
@martinfowler
Capture all changes to an
application state as a sequence of
events.
ES is an architectural pattern that can be very
useful in some circumstances as we will see.
According to Event Sourcing, we store the state
of a system by persisting a sequence of
events that brought us there.
This way not only we can determine the state of
the system at any time but we also have an
insight of how we got there.
33. #MM18PL#MM18PL
@aleron75
Check-out in Magento 2.2
I think the best way of understanding the
benefits of such an approach is seeing it
applied.
This is how Checkout works in Magento 2.2
(and 1.x as well).
Each time we place an order, the product
stocks are updated. That means, stock item
records related to the products we are
purchasing are locked with a SELECT… FOR
UPDATE statement.
That means: users purchasing at least one
same items must wait. And you know that the
worst moment to block users is checkout.
34. #MM18PL#MM18PL
@aleron75
Check-out in Magento 2.3
This is how checkout works in Magento 2.3
thanks to ES: each time we place an order,
some product reservations are appended and
that’s it.
No lock.
No wait.
No “conversion killer” code.
35. #MM18PL#MM18PL
@aleron75
An “only” choice
To be honest, this was the only choice we had.
Since determining from which source to ship
items could be a time-consuming activity, we
couldn’t do that during checkout.
We had to move it from placing the order to the
fulfilling phase.
When an order is placed, we only needed to
record the information of the qty to reserve,
without updating the inventory in real-time.
38. #MM18PL#MM18PL
@aleron75
Event Sourcing: benefits
Immutability
Performance improvement
Valuable information
I think that at this point the benefits of applying a
pattern like ES are clear but let’s recap:
- thanks to their immutable nature, events are
append-only operations
- since those records are never updated, we
don’t have locks on them
- since we keep track of all the events related to
product quantity, a brand new set of inventory
information can be extracted for business
analysis
40. #MM18PL#MM18PL
@aleron75
Event Sourcing: drawbacks
Not well known
More analysis
More disk space
Well, despite it was introduced in 2005 it is still a
not very well known pattern.
As it happens for CQRS, it requires more
analysis.
And yes, it requires more disk space, deal with
it.
41. #MM18PL
@aleron75
Coding !== SW Design
And here is the third and last takeaway I want to
leave you.
As we have seen, some changes in the design
of our software can bring huge benefits.
Sooner or later, in our development career, we
must understand the difference between
writing code and designing software.
No matter if you are in your 20s or 40s, there is
always something new to learn, so never stop
improving.
42. #MM18PL
@aleron75
Thank you!Thank you!
Thank you, for the time you spent listening,
watching, or reading this presentation.
And big thanks also go to :
- The MCE team and all the folks contributing to
Magento 2 and MSI – tw + gh
- Lori Krell for the beautiful icons and for writing
the great MSI User Guide - tw
- Holger Wolterdorf’s presentation for CQRS
and ES inspiration - tw
If you have any questions, feel free to reach me
on Twitter or Slack.