SlideShare a Scribd company logo
1 of 55
Multi-Source
Inventory: The Largest
Community-Developed
Feature in Magento
Mark Brinton
Sr. Manager, Product | Magento Commerce
@markabrinton
Igor Miniailo
Software Engineer | Magento Commerce
@iminyaylo
Where did we start?
West
Central
East
Requests from
merchants and
partners
• Need Multiple
warehouses
• Can’t split
inventory for a
single product
Current state
• Single stock only
• Must customize or
extend
• Can be complex to
manage and
upgrade
Multiple types
needed
• Warehouses
• Stores
• Distribution
Centers
• Drop Shipping
Increasingly
common
• Even for smaller
merchants
• Applies to both
B2C and B2B
The MSI “Story”
Original artwork ©2012 Seth Wolfshornd
Validating the request
High interest and
common need
• Not an edge case
• Multiple validation signs
• B2C and B2B
• SMB and Enterprise
Suitable for core
development
• Impacts many modules
or areas of core
• Key part of the order
process or checkout
• Complex to customize
properly
Base for extension
• Drive standard approach
• Natural extension points
• Creates marketplace
opportunity
Top 3 in partner voting
Most commented issue
on GitHub
Top 5 on Magento
Forums
Many merchant types
and sizes
Inventory is complex
and benefits from a
consistent architecture
Impacts checkout,
shipment, returns, etc.
API integrations
common for inventory
Source Selection
algorithm logical to
customize
Let’s get started!
• Originally an internal project
• First requirements documented in September 2013
• Assigned to Dragons team
• Went through multiple name changes:
– Multiple Warehouse / Node / Source Inventory
• Final naming decision: Multi-Source Inventory
– Source is the most flexible name to handle multiple location types
– Consistent with naming approach used in Magento Order
Management
Original internal Epic MAGETWO-14308
Progress!
Source management
Assign products and
quantity to sources
Priority-based selection
algorithm for shipment
Software development is difficult
• Didn’t complete all stories for the feature
• With only one team assigned, velocity was not as high as we
needed to maintain pace
• Inventory is complex, with partial or incremental release
challenging
– Touches many areas of the core and multiple modules
– All aspects of merchant inventory process must be supported, from
purchasing to orders and through to shipment and returns
• Internal constraints on breaking changes while making major
changes to inventory created technical debt
• Other projects took higher priority
So, now what?
• Market research has not changed – the feature is still important
• How can we continue without internal teams assigned?
• Convenient timing
– Community Engineering Team created in February 2017
– Wanted to expand engagement with the community
– Interest from community members
– Have a documented feature ready, with some work completed (we
ended up starting from the beginning)
The community development model
Benefits for Magento
Improved velocity for new features
Localized expertise for inventory
management differences by market
Direct client perspective
More reviewers = faster to find bugs
Get feedback while building the
feature, not after release
Project Goals
Showcase the depth and talent of
community engineers
Improve our working process for
complex features with remote
developers
Increase developer engagement with
Magento
Reduce time to build without utilizing
full team of internal developers
But how can we recruit developers?
• All contributors will be volunteers
• Can’t assign work to anyone, they
must offer to help
• Need to make the opportunity
compelling for participants
• So, how to start?
– Join an existing community event
to build momentum for the project
Project Kickoff: Meet Magento Germany
Thank You!
What did we offer to participants?
• Partner with our developers and architects
• Learn Magento best practices
• Get listed as a contributor in release notes
• Intellectual challenge of a complex feature
• Chance to collaborate with other developers
and build community relationships
• Strengthen reputation with merchants
• A faster release of MSI for clients
• No more customizing inventory for clients
• Opportunity to give back to the community
Igor Miniailo@RicTempesta
Another essential ingredient: sweets!
Hackathon results
First Pull Requests accepted at MMDE
All events must come to an end
Ben Marks Mark Brinton
Remote project management process
• Started with
– Familiar to developers
– Avoided difficult process of granting
access to Magento JIRA instance
• Multiple features
– Code and source control
– Wiki for documentation
– Individual issue tracking
– Comments and collaboration
– Pull Requests for contributions
• Initially tracked stories in a wiki table
MSI Community: GitHub
Our Community
Engineering GitHub
repository contains all
code for the project and is
used to manage pull
requests, assign stories,
and track issues. Any
developer can see how
the project has developed
over time and submit pull
requests for review.
github.com/magento-engcom/msi/
MSI Community: Wiki
Our Community
Engineering wiki contains
documentation for the
project, including
technical vision,
architecture, definition for
each story, UX, and
roadmap. This enables
new developers to quickly
understand the project
and participate.
github.com/magento-engcom/msi/wiki
MSI Community: Slack
Our Community
Engineering Slack has
specific channels for MSI
questions and discussion.
Developers can get help
with the project and
collaborate together,
regardless of time zone.
magentocommeng.slack.com
Meet Magento Germany
Leipzig, Germany
Meet Magento Sweden
Stockholm, Sweden
Magento Live UK
London, United Kingdom
Mage Unconference
Utrecht, Netherlands
Magento Hackathon
Munich, Germany
Meet Magento Romania
Cluj, Romania
Meet Magento New York
New York City, USA
Mage Titans Austin
Austin, USA
MSI Contribution Week
Kolbermoor, Germany
Meet Magento Spain
Madrid, Spain
Mage Test Fest
Amersfoort, Netherlands
Atwix Contribution Day
Khmelnytskyi, Ukraine
Mage Titans Manchester
Manchester, United Kingdom
Amasty Contribution Day
Minsk, Belarus
Mage Conf Kiev
Kiev, Ukraine
2017 MSI Community Events
More contributors = more complexity
• As more contributors joined the project, it
became difficult to manage on the wiki
– Many additional stories created
– Issues manually linked together
– Not possible to report on stories
– Prioritization is not easily available
• Also, it was not clear where someone new
to the project could start participating
MSI Community: ZenHub
• Enter Zenhub
(demonstrate) – list
the specific benefits –
prioritzation, stages,
epics and stories,
estimations in a
single easily updated
place, reporting. Also
given this for free
because this was an
open source project!
We reached an
agreement with them
github.com/magento-engcom/msi/
Zenhub Benefits
• Track individual stories
• Create Epics and relate stories
• Assign tasks
• Prioritize work
• Track estimations
• Report on progress
MSI Community: Weekly Demo
Demos are held for the MSI
project every week on
Friday using Zoom. Any
developer can attend the
demo to see what is
happening on the project.
All demos are recorded and
posted on YouTube.
bit.ly/MSIdemo
MSI Community: Standup and Grooming
Daily standup and recurring
grooming meetings are
optional for contributors. In
these meetings we discuss
issues in more detail and
plan stories.
All meetings are conducted
using Zoom to include
remote attendees.
Testing MSI using MFTF*
• 1st Community Extension to utilize MFTF
• Results to date:
– Discovered gaps in MFTF which are being addressed
– Finalized the location of Test Folders for Modules:
– Discovered gaps in our Jenkins/Bamboo builds which
are also being addressed
– Created Multiple automated tests (30+)
– Discovered several MSI bugs from the tests we created
*Magento Functional Testing Framework
Old: dev/tests/acceptance/tests/functional/Magento/FunctionalTest/[Module]/Test
New: /app/code/Magento/[Module]/Test/Acceptance
Architect Product Manager UX Designer
QA Lead Tech Writer Community Engineers
How we supported the MSI project
400
401
15
16
65
66 Submitted
Pull Requests
Individual
Contributors
Agencies
Represented
MSI Project Contributions
interjar
Merchant Benefits of MSI
• Manage multiple-location inventory from the admin
– Familiar interface where they already manage orders, catalog, etc.
• Assign products to sources and manage quantity in each source
• Create Stocks to define sources eligible to deliver for each website
• Control how warehouses are selected/assigned for delivery based on
merchant preferences
– Initial: simple priority algorithm (MVP)
– Later: lowest cost algorithm by distance proxy
• Manually control shipment Sources when override is necessary
• API coverage for integration with 3rd party inventory systems,
warehouses, or custom inventory actions
• Inventory reservations for performant checkout and accurate quantity
available for sale
Technical Overview
@iminyaylo
Technical Overview
• MSI is a brand new way to handle inventory
– Event Sourcing + CQRS architecture
– Scalable Multi-Dimensional indexes for Stocks
– Usage of PHP 7.1 features
– Highly modular design
Technical Overview
• MSI is a brand new way to handle inventory
– MSI is much more than just an extension, but a new way to handle
inventory and reservations for all merchants
– These changes will become part of core in 2.4
– Not just for merchants with >1 source
Size of MSI Project
• 25 modules created in the scope of the project
Inventory Reservations in MSI
• When an order is placed, a reservation is
made to ensure there will be enough
quantity available to fulfill the order
• Reservations are append only operations
to prevent blocking operations and race
conditions at checkout
• The reservations table is periodically
cleaned of reservations that sum to zero
Merchant Benefits
Performant checkout even with high concurrent sessions
Prevents overselling available inventory
Reservation Example – Step 1
France Warehouse
SKU-1: 5 qty
EU Stock
SKU-1: 15 qty
Italy Warehouse
SKU-1: 10 qty
Raw data Index Reservations
Salable Qty: 15 (data from index, empty reservations)
Reservation Example – Step 2
Action: Customer buys 5 products
on frontend (SKU-1)
Reservation Example – Step 3
France Warehouse
SKU-1: 5 qty
EU Stock
SKU-1: 15 qty
Italy Warehouse
SKU-1: 10 qty
Raw data Index Reservations
Salable Qty: 10 (data from index: 15, apply all reservations: -5)
Data is NOT changed
SKU-1: -5 Order #001
Reservation has been added
Reservation Example – Step 4
Actions: From the original order of 5 products, 3 are returned
Reservation Example – Step 5
France Warehouse
SKU-1: 5 qty
EU Stock
SKU-1: 15 qty
Italy Warehouse
SKU-1: 10 qty
Raw data Index Reservations
Salable Qty: 13 (data from index: 15, apply all reservations: -5+3)
Data is NOT changed Reservation has been added
SKU-1: -5
SKU-1: +3
Order #001
Return #001
Reservation Example – Step 6
Actions:
• Admin ships remaining items in order (qty 2)
• Reindex on shipment of order
Reservation Example – Step 7
France Warehouse
SKU-1: 3 qty
EU Stock
SKU-1: 13 qty
Italy Warehouse
SKU-1: 10 qty
Raw data Index Reservations
Salable Qty: 13 (data from index: 13, apply all reservations: -5+3+2=0)
Data is CHANGED
SKU-1: -5
SKU-1: +3
SKU-1: +2
Order #001
Return #001
Order #001 Shipment
Reservation has been added
Reservation_id Stock_id sku quantity metadata
1 2 SKU-1 -5.000 order_placed:order:1
2 2 SKU-1 3.000 order_cancelled:order:1
3 2 SKU-1 2.000 shipment_created:order:1
Reservation Example – Step 8
Action:
• Reservation cleaning
• Looping through these reservations we can find reservations
which in sum return 0 (Zero) and remove them
Reservation Example – Step 9 (like Step 1)
France Warehouse
SKU-1: 3 qty
EU Stock
SKU-1: 13 qty
Italy Warehouse
SKU-1: 10 qty
Raw data Index Reservations
Salable Qty: 13 (data from index, empty reservations table)
Data is NOT changed Reservations have been
removed
Extension points and APIs in MSI
• For integration with ERP and PIM systems
– Inventory Sales API (Reservations placement)
• For extension developers
– Source Selection Algorithm APIs to provide own more efficient and
business oriented choice of Sources for order fulfillment
Customizing Source Selection Algorithm
Project Summary
@markabrinton
Project Challenges
Challenge Mitigation Strategies
Attracting developers Help developers get started at in-person events
Offer incentives (complexity, recognition, collaboration)
Retaining developers Groom stories into multiple sizes (S, M, L) to match
developer availability
Provide detailed feedback and code review
Time zones and
different working hours
Slack channels to answer questions in real time, even
when Magento team participants are offline
Remote contributors Software tools: Zoom, YouTube, Slack, GitHub
Distributed contribution day for virtual participation
Estimating velocity
(most difficult)
Rough sizing based on events and attendees
Regular estimates from consistent participants
(only works in the short term)
Lessons Learned
• Project management methods
need to change with
contributors and complexity
• Experiment with different tools
• Start new participants at
events, then encourage regular
contributions
• Use voting to quickly refine
priority and approach questions
• Demos show progress, build momentum, and help newcomers
• Define features partially and take community input
What’s next for Community Projects
• Significant investment in Community Engineering
• Coming soon: partner internal development teams with
community contributors on core features
+
Austin, Texas
3
Kyiv, Ukraine
6
Frankfurt, Germany
1
Try it out!
• MSI development code
is already available
• Clone on GitHub and
follow our progress
github.com/magento-engcom/msi/wiki
Become a Contributor
• Want to help with MSI or another community project?
– Email Community Engineering to get started
– Not an engineer? You can also contribute to documentation!
– Other projects
• Bulk API
• Import / Export enhancements
• PHP 7.2 Compatibility
• And more!
engcom@magento.com
Q & A

More Related Content

What's hot

Product Overview: Mobile and 4X Faster Bonita BPM 6
Product Overview: Mobile and 4X Faster Bonita BPM 6Product Overview: Mobile and 4X Faster Bonita BPM 6
Product Overview: Mobile and 4X Faster Bonita BPM 6
Bonitasoft
 

What's hot (20)

Extensibility of Magento, the look into the future
Extensibility of Magento, the look into the futureExtensibility of Magento, the look into the future
Extensibility of Magento, the look into the future
 
Backwards Compatibility Developers Guide. #MM17NL
Backwards Compatibility Developers Guide. #MM17NLBackwards Compatibility Developers Guide. #MM17NL
Backwards Compatibility Developers Guide. #MM17NL
 
Valeriy Nayda - Best Practices in Magento 2. Based on Multi Source Inventory ...
Valeriy Nayda - Best Practices in Magento 2. Based on Multi Source Inventory ...Valeriy Nayda - Best Practices in Magento 2. Based on Multi Source Inventory ...
Valeriy Nayda - Best Practices in Magento 2. Based on Multi Source Inventory ...
 
Igor Miniailo - Magento 2 API Design Best Practices
Igor Miniailo - Magento 2 API Design Best PracticesIgor Miniailo - Magento 2 API Design Best Practices
Igor Miniailo - Magento 2 API Design Best Practices
 
Backward Compatibility Developer's Guide Webinar
Backward Compatibility Developer's Guide WebinarBackward Compatibility Developer's Guide Webinar
Backward Compatibility Developer's Guide Webinar
 
Volodymyr Kublytskyi - Develop Product, Design Platform
Volodymyr Kublytskyi - Develop Product, Design PlatformVolodymyr Kublytskyi - Develop Product, Design Platform
Volodymyr Kublytskyi - Develop Product, Design Platform
 
Jacopo Nardiello - From CI to Prod: Running Magento at scale with Kubernetes
Jacopo Nardiello - From CI to Prod: Running Magento at scale with KubernetesJacopo Nardiello - From CI to Prod: Running Magento at scale with Kubernetes
Jacopo Nardiello - From CI to Prod: Running Magento at scale with Kubernetes
 
Experience in Magento Community Projects
Experience in Magento Community ProjectsExperience in Magento Community Projects
Experience in Magento Community Projects
 
James Zetlen - PWA Studio Integration…With You
James Zetlen - PWA Studio Integration…With YouJames Zetlen - PWA Studio Integration…With You
James Zetlen - PWA Studio Integration…With You
 
Mli 2017 technical m2 developer experience
Mli 2017 technical m2 developer experienceMli 2017 technical m2 developer experience
Mli 2017 technical m2 developer experience
 
Chernivtsi Magento Meetup&Contribution day. Naida V.
Chernivtsi Magento Meetup&Contribution day. Naida V.Chernivtsi Magento Meetup&Contribution day. Naida V.
Chernivtsi Magento Meetup&Contribution day. Naida V.
 
Magento Technical guidelines
Magento Technical guidelinesMagento Technical guidelines
Magento Technical guidelines
 
Monitoring your cache effectiveness in Magento 2
Monitoring your cache effectiveness in Magento 2Monitoring your cache effectiveness in Magento 2
Monitoring your cache effectiveness in Magento 2
 
Mule soft meetup_indonesia_june2020
Mule soft meetup_indonesia_june2020Mule soft meetup_indonesia_june2020
Mule soft meetup_indonesia_june2020
 
[WSO2 Summit EMEA 2020] Accelerate and Secure Services Integration with WSO2 ...
[WSO2 Summit EMEA 2020] Accelerate and Secure Services Integration with WSO2 ...[WSO2 Summit EMEA 2020] Accelerate and Secure Services Integration with WSO2 ...
[WSO2 Summit EMEA 2020] Accelerate and Secure Services Integration with WSO2 ...
 
OutSystems User Groups - Introduction to OutSystems Architecture (Pune - 7 A...
 OutSystems User Groups - Introduction to OutSystems Architecture (Pune - 7 A... OutSystems User Groups - Introduction to OutSystems Architecture (Pune - 7 A...
OutSystems User Groups - Introduction to OutSystems Architecture (Pune - 7 A...
 
Product Overview: Mobile and 4X Faster Bonita BPM 6
Product Overview: Mobile and 4X Faster Bonita BPM 6Product Overview: Mobile and 4X Faster Bonita BPM 6
Product Overview: Mobile and 4X Faster Bonita BPM 6
 
API-Centric Hybrid Integration Platform for Microservices or ESB Style Archit...
API-Centric Hybrid Integration Platform for Microservices or ESB Style Archit...API-Centric Hybrid Integration Platform for Microservices or ESB Style Archit...
API-Centric Hybrid Integration Platform for Microservices or ESB Style Archit...
 
What’s New With WSO2 Open Banking?
What’s New With WSO2 Open Banking?What’s New With WSO2 Open Banking?
What’s New With WSO2 Open Banking?
 
[WSO2 Summit EMEA 2020] Building an Interactive API Marketplace
[WSO2 Summit EMEA 2020] Building an Interactive API Marketplace[WSO2 Summit EMEA 2020] Building an Interactive API Marketplace
[WSO2 Summit EMEA 2020] Building an Interactive API Marketplace
 

Similar to Multi-Source Inventory. Imagine. Las Vegas. 2018

Managing Multiple Store Fronts on Magento
Managing Multiple Store Fronts on MagentoManaging Multiple Store Fronts on Magento
Managing Multiple Store Fronts on Magento
Geoffrey Mobisson
 
Managing Multiple Store Fronts on Magento
Managing Multiple Store Fronts on MagentoManaging Multiple Store Fronts on Magento
Managing Multiple Store Fronts on Magento
Geoffrey Mobisson
 
OpenERP R&D
OpenERP R&DOpenERP R&D
OpenERP R&D
Odoo
 

Similar to Multi-Source Inventory. Imagine. Las Vegas. 2018 (20)

Introduction to Versioning (VCS) for Developers
Introduction to Versioning (VCS) for DevelopersIntroduction to Versioning (VCS) for Developers
Introduction to Versioning (VCS) for Developers
 
Managing Multiple Store Fronts on Magento
Managing Multiple Store Fronts on MagentoManaging Multiple Store Fronts on Magento
Managing Multiple Store Fronts on Magento
 
Shop24 Presentation Slide sixth semester
Shop24 Presentation Slide sixth semesterShop24 Presentation Slide sixth semester
Shop24 Presentation Slide sixth semester
 
Continuous Integration
Continuous IntegrationContinuous Integration
Continuous Integration
 
Git in the Enterprise: How to succeed at DevOps using Git and a monorepo
Git in the Enterprise: How to succeed at DevOps using Git and a monorepoGit in the Enterprise: How to succeed at DevOps using Git and a monorepo
Git in the Enterprise: How to succeed at DevOps using Git and a monorepo
 
Git in the Enterprise: How to succeed at DevOps using Git and a monorepo
Git in the Enterprise: How to succeed at DevOps using Git and a monorepo Git in the Enterprise: How to succeed at DevOps using Git and a monorepo
Git in the Enterprise: How to succeed at DevOps using Git and a monorepo
 
Technical stories v1.2
Technical stories v1.2Technical stories v1.2
Technical stories v1.2
 
New life inside monolithic application
New life inside monolithic applicationNew life inside monolithic application
New life inside monolithic application
 
From no services to Microservices
From no services to MicroservicesFrom no services to Microservices
From no services to Microservices
 
#spsclt18 vincent biret #spfx #devops
#spsclt18 vincent biret #spfx #devops#spsclt18 vincent biret #spfx #devops
#spsclt18 vincent biret #spfx #devops
 
How to overcome challenges in it system evolution
How to overcome challenges in it system evolutionHow to overcome challenges in it system evolution
How to overcome challenges in it system evolution
 
Managing Multiple Store Fronts on Magento
Managing Multiple Store Fronts on MagentoManaging Multiple Store Fronts on Magento
Managing Multiple Store Fronts on Magento
 
OpenERP R&D
OpenERP R&DOpenERP R&D
OpenERP R&D
 
QCon 2015 - Microservices Track Notes
QCon 2015 - Microservices Track Notes QCon 2015 - Microservices Track Notes
QCon 2015 - Microservices Track Notes
 
Making software development processes to work for you
Making software development processes to work for youMaking software development processes to work for you
Making software development processes to work for you
 
Serverless chatbot: from idea to production at blazing speed
Serverless chatbot: from idea to production at blazing speedServerless chatbot: from idea to production at blazing speed
Serverless chatbot: from idea to production at blazing speed
 
TUTTO SU VISUAL STUDIO ALM 2015
TUTTO SU VISUAL STUDIO ALM 2015TUTTO SU VISUAL STUDIO ALM 2015
TUTTO SU VISUAL STUDIO ALM 2015
 
Big ideas in small packages - How microservices helped us to scale our vision
Big ideas in small packages  - How microservices helped us to scale our visionBig ideas in small packages  - How microservices helped us to scale our vision
Big ideas in small packages - How microservices helped us to scale our vision
 
Out With the Old, in With the Open-source: Brainshark's Complete CMS Migration
Out With the Old, in With the Open-source: Brainshark's Complete CMS MigrationOut With the Old, in With the Open-source: Brainshark's Complete CMS Migration
Out With the Old, in With the Open-source: Brainshark's Complete CMS Migration
 
Architecting for Huper Growth and Great Engineering Culture
Architecting for Huper Growth and Great Engineering CultureArchitecting for Huper Growth and Great Engineering Culture
Architecting for Huper Growth and Great Engineering Culture
 

More from Igor Miniailo

More from Igor Miniailo (14)

Magento Storefront architecture
Magento Storefront architectureMagento Storefront architecture
Magento Storefront architecture
 
MageConf 2017, Design API Best Practices
MageConf 2017, Design API Best PracticesMageConf 2017, Design API Best Practices
MageConf 2017, Design API Best Practices
 
Magento 2 Automated Testing via examples of Multi-Source Inventory (MSI)
Magento 2 Automated Testing via examples of Multi-Source Inventory (MSI)Magento 2 Automated Testing via examples of Multi-Source Inventory (MSI)
Magento 2 Automated Testing via examples of Multi-Source Inventory (MSI)
 
Testing in Magento 2
Testing in Magento 2 Testing in Magento 2
Testing in Magento 2
 
API design best practices
API design best practicesAPI design best practices
API design best practices
 
Architecture and workflow of Multi-Source Inventory
Architecture and workflow of Multi-Source InventoryArchitecture and workflow of Multi-Source Inventory
Architecture and workflow of Multi-Source Inventory
 
Dare to Share Magento Community Engineering
Dare to Share Magento Community Engineering Dare to Share Magento Community Engineering
Dare to Share Magento Community Engineering
 
Backward Compatibility Developer's Guide in Magento 2. #MM17CZ
Backward Compatibility Developer's Guide in Magento 2. #MM17CZBackward Compatibility Developer's Guide in Magento 2. #MM17CZ
Backward Compatibility Developer's Guide in Magento 2. #MM17CZ
 
Backward Compatibility Developer's Guide in Magento 2
Backward Compatibility Developer's Guide in Magento 2Backward Compatibility Developer's Guide in Magento 2
Backward Compatibility Developer's Guide in Magento 2
 
Magento Developer Talk. Microservice Architecture and Actor Model
Magento Developer Talk. Microservice Architecture and Actor ModelMagento Developer Talk. Microservice Architecture and Actor Model
Magento Developer Talk. Microservice Architecture and Actor Model
 
Applying Code Customizations to Magento 2
Applying Code Customizations to Magento 2 Applying Code Customizations to Magento 2
Applying Code Customizations to Magento 2
 
Modular development in Magento 2
Modular development in Magento 2Modular development in Magento 2
Modular development in Magento 2
 
Мониторинг веб приложений на PHP в режиме реального времени с помощью Pinba. ...
Мониторинг веб приложений на PHP в режиме реального времени с помощью Pinba. ...Мониторинг веб приложений на PHP в режиме реального времени с помощью Pinba. ...
Мониторинг веб приложений на PHP в режиме реального времени с помощью Pinba. ...
 
Сommand Query Responsibility Segregation (CQRS) - Отделяем Мух от Котлет
Сommand Query Responsibility Segregation (CQRS) - Отделяем Мух от КотлетСommand Query Responsibility Segregation (CQRS) - Отделяем Мух от Котлет
Сommand Query Responsibility Segregation (CQRS) - Отделяем Мух от Котлет
 

Recently uploaded

AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
VishalKumarJha10
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 

Recently uploaded (20)

AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 

Multi-Source Inventory. Imagine. Las Vegas. 2018

  • 1.
  • 3. Mark Brinton Sr. Manager, Product | Magento Commerce @markabrinton Igor Miniailo Software Engineer | Magento Commerce @iminyaylo
  • 4. Where did we start? West Central East Requests from merchants and partners • Need Multiple warehouses • Can’t split inventory for a single product Current state • Single stock only • Must customize or extend • Can be complex to manage and upgrade Multiple types needed • Warehouses • Stores • Distribution Centers • Drop Shipping Increasingly common • Even for smaller merchants • Applies to both B2C and B2B
  • 5. The MSI “Story” Original artwork ©2012 Seth Wolfshornd
  • 6. Validating the request High interest and common need • Not an edge case • Multiple validation signs • B2C and B2B • SMB and Enterprise Suitable for core development • Impacts many modules or areas of core • Key part of the order process or checkout • Complex to customize properly Base for extension • Drive standard approach • Natural extension points • Creates marketplace opportunity Top 3 in partner voting Most commented issue on GitHub Top 5 on Magento Forums Many merchant types and sizes Inventory is complex and benefits from a consistent architecture Impacts checkout, shipment, returns, etc. API integrations common for inventory Source Selection algorithm logical to customize
  • 7. Let’s get started! • Originally an internal project • First requirements documented in September 2013 • Assigned to Dragons team • Went through multiple name changes: – Multiple Warehouse / Node / Source Inventory • Final naming decision: Multi-Source Inventory – Source is the most flexible name to handle multiple location types – Consistent with naming approach used in Magento Order Management
  • 8. Original internal Epic MAGETWO-14308 Progress! Source management Assign products and quantity to sources Priority-based selection algorithm for shipment
  • 9. Software development is difficult • Didn’t complete all stories for the feature • With only one team assigned, velocity was not as high as we needed to maintain pace • Inventory is complex, with partial or incremental release challenging – Touches many areas of the core and multiple modules – All aspects of merchant inventory process must be supported, from purchasing to orders and through to shipment and returns • Internal constraints on breaking changes while making major changes to inventory created technical debt • Other projects took higher priority
  • 10. So, now what? • Market research has not changed – the feature is still important • How can we continue without internal teams assigned? • Convenient timing – Community Engineering Team created in February 2017 – Wanted to expand engagement with the community – Interest from community members – Have a documented feature ready, with some work completed (we ended up starting from the beginning)
  • 11. The community development model Benefits for Magento Improved velocity for new features Localized expertise for inventory management differences by market Direct client perspective More reviewers = faster to find bugs Get feedback while building the feature, not after release Project Goals Showcase the depth and talent of community engineers Improve our working process for complex features with remote developers Increase developer engagement with Magento Reduce time to build without utilizing full team of internal developers
  • 12. But how can we recruit developers? • All contributors will be volunteers • Can’t assign work to anyone, they must offer to help • Need to make the opportunity compelling for participants • So, how to start? – Join an existing community event to build momentum for the project
  • 13. Project Kickoff: Meet Magento Germany Thank You!
  • 14. What did we offer to participants? • Partner with our developers and architects • Learn Magento best practices • Get listed as a contributor in release notes • Intellectual challenge of a complex feature • Chance to collaborate with other developers and build community relationships • Strengthen reputation with merchants • A faster release of MSI for clients • No more customizing inventory for clients • Opportunity to give back to the community Igor Miniailo@RicTempesta
  • 17. First Pull Requests accepted at MMDE
  • 18. All events must come to an end Ben Marks Mark Brinton
  • 19. Remote project management process • Started with – Familiar to developers – Avoided difficult process of granting access to Magento JIRA instance • Multiple features – Code and source control – Wiki for documentation – Individual issue tracking – Comments and collaboration – Pull Requests for contributions • Initially tracked stories in a wiki table
  • 20. MSI Community: GitHub Our Community Engineering GitHub repository contains all code for the project and is used to manage pull requests, assign stories, and track issues. Any developer can see how the project has developed over time and submit pull requests for review. github.com/magento-engcom/msi/
  • 21. MSI Community: Wiki Our Community Engineering wiki contains documentation for the project, including technical vision, architecture, definition for each story, UX, and roadmap. This enables new developers to quickly understand the project and participate. github.com/magento-engcom/msi/wiki
  • 22. MSI Community: Slack Our Community Engineering Slack has specific channels for MSI questions and discussion. Developers can get help with the project and collaborate together, regardless of time zone. magentocommeng.slack.com
  • 23. Meet Magento Germany Leipzig, Germany Meet Magento Sweden Stockholm, Sweden Magento Live UK London, United Kingdom Mage Unconference Utrecht, Netherlands Magento Hackathon Munich, Germany Meet Magento Romania Cluj, Romania Meet Magento New York New York City, USA Mage Titans Austin Austin, USA MSI Contribution Week Kolbermoor, Germany Meet Magento Spain Madrid, Spain Mage Test Fest Amersfoort, Netherlands Atwix Contribution Day Khmelnytskyi, Ukraine Mage Titans Manchester Manchester, United Kingdom Amasty Contribution Day Minsk, Belarus Mage Conf Kiev Kiev, Ukraine 2017 MSI Community Events
  • 24. More contributors = more complexity • As more contributors joined the project, it became difficult to manage on the wiki – Many additional stories created – Issues manually linked together – Not possible to report on stories – Prioritization is not easily available • Also, it was not clear where someone new to the project could start participating
  • 25. MSI Community: ZenHub • Enter Zenhub (demonstrate) – list the specific benefits – prioritzation, stages, epics and stories, estimations in a single easily updated place, reporting. Also given this for free because this was an open source project! We reached an agreement with them github.com/magento-engcom/msi/
  • 26. Zenhub Benefits • Track individual stories • Create Epics and relate stories • Assign tasks • Prioritize work • Track estimations • Report on progress
  • 27. MSI Community: Weekly Demo Demos are held for the MSI project every week on Friday using Zoom. Any developer can attend the demo to see what is happening on the project. All demos are recorded and posted on YouTube. bit.ly/MSIdemo
  • 28. MSI Community: Standup and Grooming Daily standup and recurring grooming meetings are optional for contributors. In these meetings we discuss issues in more detail and plan stories. All meetings are conducted using Zoom to include remote attendees.
  • 29. Testing MSI using MFTF* • 1st Community Extension to utilize MFTF • Results to date: – Discovered gaps in MFTF which are being addressed – Finalized the location of Test Folders for Modules: – Discovered gaps in our Jenkins/Bamboo builds which are also being addressed – Created Multiple automated tests (30+) – Discovered several MSI bugs from the tests we created *Magento Functional Testing Framework Old: dev/tests/acceptance/tests/functional/Magento/FunctionalTest/[Module]/Test New: /app/code/Magento/[Module]/Test/Acceptance
  • 30. Architect Product Manager UX Designer QA Lead Tech Writer Community Engineers How we supported the MSI project
  • 32. Merchant Benefits of MSI • Manage multiple-location inventory from the admin – Familiar interface where they already manage orders, catalog, etc. • Assign products to sources and manage quantity in each source • Create Stocks to define sources eligible to deliver for each website • Control how warehouses are selected/assigned for delivery based on merchant preferences – Initial: simple priority algorithm (MVP) – Later: lowest cost algorithm by distance proxy • Manually control shipment Sources when override is necessary • API coverage for integration with 3rd party inventory systems, warehouses, or custom inventory actions • Inventory reservations for performant checkout and accurate quantity available for sale
  • 34. Technical Overview • MSI is a brand new way to handle inventory – Event Sourcing + CQRS architecture – Scalable Multi-Dimensional indexes for Stocks – Usage of PHP 7.1 features – Highly modular design
  • 35. Technical Overview • MSI is a brand new way to handle inventory – MSI is much more than just an extension, but a new way to handle inventory and reservations for all merchants – These changes will become part of core in 2.4 – Not just for merchants with >1 source
  • 36. Size of MSI Project • 25 modules created in the scope of the project
  • 37. Inventory Reservations in MSI • When an order is placed, a reservation is made to ensure there will be enough quantity available to fulfill the order • Reservations are append only operations to prevent blocking operations and race conditions at checkout • The reservations table is periodically cleaned of reservations that sum to zero Merchant Benefits Performant checkout even with high concurrent sessions Prevents overselling available inventory
  • 38. Reservation Example – Step 1 France Warehouse SKU-1: 5 qty EU Stock SKU-1: 15 qty Italy Warehouse SKU-1: 10 qty Raw data Index Reservations Salable Qty: 15 (data from index, empty reservations)
  • 39. Reservation Example – Step 2 Action: Customer buys 5 products on frontend (SKU-1)
  • 40. Reservation Example – Step 3 France Warehouse SKU-1: 5 qty EU Stock SKU-1: 15 qty Italy Warehouse SKU-1: 10 qty Raw data Index Reservations Salable Qty: 10 (data from index: 15, apply all reservations: -5) Data is NOT changed SKU-1: -5 Order #001 Reservation has been added
  • 41. Reservation Example – Step 4 Actions: From the original order of 5 products, 3 are returned
  • 42. Reservation Example – Step 5 France Warehouse SKU-1: 5 qty EU Stock SKU-1: 15 qty Italy Warehouse SKU-1: 10 qty Raw data Index Reservations Salable Qty: 13 (data from index: 15, apply all reservations: -5+3) Data is NOT changed Reservation has been added SKU-1: -5 SKU-1: +3 Order #001 Return #001
  • 43. Reservation Example – Step 6 Actions: • Admin ships remaining items in order (qty 2) • Reindex on shipment of order
  • 44. Reservation Example – Step 7 France Warehouse SKU-1: 3 qty EU Stock SKU-1: 13 qty Italy Warehouse SKU-1: 10 qty Raw data Index Reservations Salable Qty: 13 (data from index: 13, apply all reservations: -5+3+2=0) Data is CHANGED SKU-1: -5 SKU-1: +3 SKU-1: +2 Order #001 Return #001 Order #001 Shipment Reservation has been added
  • 45. Reservation_id Stock_id sku quantity metadata 1 2 SKU-1 -5.000 order_placed:order:1 2 2 SKU-1 3.000 order_cancelled:order:1 3 2 SKU-1 2.000 shipment_created:order:1 Reservation Example – Step 8 Action: • Reservation cleaning • Looping through these reservations we can find reservations which in sum return 0 (Zero) and remove them
  • 46. Reservation Example – Step 9 (like Step 1) France Warehouse SKU-1: 3 qty EU Stock SKU-1: 13 qty Italy Warehouse SKU-1: 10 qty Raw data Index Reservations Salable Qty: 13 (data from index, empty reservations table) Data is NOT changed Reservations have been removed
  • 47. Extension points and APIs in MSI • For integration with ERP and PIM systems – Inventory Sales API (Reservations placement) • For extension developers – Source Selection Algorithm APIs to provide own more efficient and business oriented choice of Sources for order fulfillment
  • 50. Project Challenges Challenge Mitigation Strategies Attracting developers Help developers get started at in-person events Offer incentives (complexity, recognition, collaboration) Retaining developers Groom stories into multiple sizes (S, M, L) to match developer availability Provide detailed feedback and code review Time zones and different working hours Slack channels to answer questions in real time, even when Magento team participants are offline Remote contributors Software tools: Zoom, YouTube, Slack, GitHub Distributed contribution day for virtual participation Estimating velocity (most difficult) Rough sizing based on events and attendees Regular estimates from consistent participants (only works in the short term)
  • 51. Lessons Learned • Project management methods need to change with contributors and complexity • Experiment with different tools • Start new participants at events, then encourage regular contributions • Use voting to quickly refine priority and approach questions • Demos show progress, build momentum, and help newcomers • Define features partially and take community input
  • 52. What’s next for Community Projects • Significant investment in Community Engineering • Coming soon: partner internal development teams with community contributors on core features + Austin, Texas 3 Kyiv, Ukraine 6 Frankfurt, Germany 1
  • 53. Try it out! • MSI development code is already available • Clone on GitHub and follow our progress github.com/magento-engcom/msi/wiki
  • 54. Become a Contributor • Want to help with MSI or another community project? – Email Community Engineering to get started – Not an engineer? You can also contribute to documentation! – Other projects • Bulk API • Import / Export enhancements • PHP 7.2 Compatibility • And more! engcom@magento.com
  • 55. Q & A

Editor's Notes

  1. Speaker: None (shows when audience is entering)
  2. Speaker: None (shows when audience is entering)
  3. Hello everyone, and thank you for joining us today. My name is Mark Brinton. I’m the product manager at Magento responsible for the Multisource inventory project. I’m also joined today by Igor Miniailo, the architect for this feature. In today’s session, we will cover the story of the project and how we’ve worked with the community. Igor will also share details on some interesting technical aspects of what we have built.
  4. But first, a little background. This project initially started because we heard many requests from merchants and partners asking for multi warehouse support in Magento. They told us we need multiple warehouses…
  5. As a product manager, I like to summarize what we plan to build from the user’s perspective, which in this case is the merchant. *READ CARD* *click* I also like to imagine what the merchant will feel like when they have this capability
  6. Once we get any request for a feature from our users, we go through a standard validation process. We’re looking for a few key points. First, is there high interest in the feature, and is it something many merchants would benefit from? We want to make sure the request is not for an edge case scenario. To do that, we look for multiple validation signs. Does this appeal to both B2C and B2B merchants? …
  7. With validation of the request complete, we moved to start building the feature.
  8. And we made some progress. Here’s a screenshot of one of the original designs. We completed several important stories, including the ability to manage sources in the admin panel and assigning products and quantity to sources. We also built a priority-based selection algorithm for shipments.
  9. However, we ran into some challenges at that point. We weren’t able to complete all the stories to release the feature.
  10. At this point we were at a decision point. We knew the feature was important. Our market research showed merchants wanted it, but we didn’t have any internal teams available to assign to continue work. Fortunately for us however, this happened right around the time we created our Community Engineering Team…
  11. Using community developers has several benefits for Magento
  12. But, we still have the challenge of recruiting contributors for the project!
  13. We started the project at a hackathon last May, just before Meet Magento Germany
  14. But this isn’t just about how we as Magento benefit from community contributions. We worked hard to offer a compelling opportunity to participants. They had the chance to… Riccardo Tempesta at Mage Titans Italy
  15. And of course, we kept the developers well fed in the process, which is always important. Special thanks to our sponsors on the slide here who helped out with this event.
  16. So what happened at the hackathon? As is common for these events, we had to pitch our project against many other ideas. The good news is Multisource inventory received the most votes. I was very glad at this point, because I didn’t want to travel all the way to Leipzig and fail to recruit volunteers!
  17. We accepted our first pull requests for the project at the event. As you can see from the slide here, we also recognized those contributors in a keynote presentation at the conference.
  18. However, all events must come to and end. We had a great start to the project, but the real work of maintaining momentum started after we flew back to the office. When you are in the same location, it’s easy to answer questions and discuss the best way to solve problems. But how would we do this remotely?
  19. To manage the project remotely, we started with GitHub
  20. Here's what it looks like. In our GitHub repository, users can always download the latest MSI code...
  21. GitHub also has a wiki where we store project information.
  22. We also created some channels on our Community Engineering Slack to allow for collaboration... ** preview of next slide ** Now with this basic framework in place, we needed to expand the number of contributors working on the project. Because a kickoff event had been so successful for us, we decided to double down on events and join as many as possible. Max, who runs the Community Engineering team, definitely earned a lot of frequent flyer miles to move things forward at this point
  23. Here’s a list of events where we had MSI contributions in 2017 alone. We have continued this momentum in 2018.
  24. The good news was we had more people contributing to the project. We were also successful in getting people who started contributing at an event to continue on the project after they returned home, with many working nights and weekends on contributions. This was good, but also introduced challenges
  25. To solve this problem we looked for solutions that could improve what we were already doing on GitHub to manage the project. After some research we discovered ZenHub. ZenHub allows us to follow stories through from design to completion
  26. There are also some other great benefits to ZenHub. Using ZenHub, we can
  27. Another important thing we added was a weekly demo for the project. This allowed us to showcase the work that was being done, give individual developers the chance to be proud of their contributions, and help newcomers onboard to the project
  28. We also added some additional meetings: a daily standup and regular grooming sessions.
  29. Of course it's important to have high quality on any new feature we include in Magento. And MSI is the first community extension that uses the Magento Functional Testing Framework. We also develop test scenarios in a tool called Hiptest, which helps with automation. So far using this approach we also improved MFTF itself. We discovered several gaps in MFTF which are being addressed. We also....
  30. To make the project successful, we also supported it with dedicated resources across several disciplines
  31. I’m excited to announce the contributions for this project have exceeded our expectations. Overall, we’ve had contributions from 66 separate community members
  32. All these contributions have created some great benefits for merchants. With MSI, merchants will be able to manage multiple location inventory from the admin panel.
  33. And now I’ll turn it over to Igor, who will cover some of the interesting technical aspects of the MSI project
  34. Add screenshot of cart here – make sure to use SKU-1 in screenshot
  35. Add screenshot?
  36. And now I’ll turn it back over to Mark, who will review some key learnings from the project
  37. Of course the MSI project, like any project, hasn't been without challenges. Here are some of the main ones we encountered and how we tried to mitigate them. First, the challenge of attracting developers...
  38. With the goal of continuous improvement, here are some of the lessons we have learned so far working on MSI. First, project management methods need to change as the number of contributors and the complexity of the project increases....
  39. In the past year, we’ve made a significant investment in our Community Engineering effort. The team is now 10 people total, with 3 in our Austin office, 6 in Kiev, and one in Frankfurt Germany.
  40. Because this is a community project, all our work is available on GitHub. Please download the code and try it out! You can follow the project progress as we go
  41. And of course, we are always looking to welcome new contributors. If you'd like to contribute to MSI or any other community engineering project, send an email to engcom@magento.com
  42. Q&A – for both product and architect *We can answer both business and technical questions*