Scaling an eCommerce
environment
Beyond Magento
Sander Mangel
- Worked at several web agencies
- Currently working as Technical Lead at FitForMe
- 10 as PHP developer, 5 ...
FitForMe
- Food supplements for bariatric patients
- Magento EE 1.14.x
- 13 websites (countries) in 1 installation
- > 100...
Fulfillment
- Warehouse in The Netherlands
- Warehouse in the UK soon active
- Resellers on other continents Q4 2016
B2B o...
Basic outsourced order fulfillment
Scaling An Ecommerce Environment @sandermangel
Expanding requirements
Scaling An Ecommerce Environment @sandermangel
Fulfillment integrated in Magento
- Extracts data from the order & customer object
- Performs some address checks (formatt...
Expanding requirements
Scaling An Ecommerce Environment @sandermangel
POS for pharmacies, events, hospitals and sales agen...
Something like this
Scaling An Ecommerce Environment @sandermangel
Magento as the shipping platform
Magento > Warehouse 1
Magento > Warehouse 2
Magento <> Shipping Contract Manager
ERP <> M...
Magento as the shipping API
Requires a full order, invoice and
shipment to be made in Magento.
No guarantee for a stable A...
Magento sucks at
doing everything
Scaling An Ecommerce Environment @sandermangel
Magento sucks at
doing everything
But excels at being an online catalogue & checkout
Scaling An Ecommerce Environment @san...
Use Magento for its purpose
Magento as a slow, resource heavy
eCommerce platform should never be
used for anything else th...
Using Magento for the rest
- Restricted by Magento
- Creates overhead
- Tightly coupled
Generally, it takes more effort to...
The agency way
- Projects are normally done with 1 framework
- Features are made to fit the technical solution
- Scalabili...
Meeting a merchant needs
- Scope changes as the business grows
- Build features to be easily replaceable, all code is expe...
Make it a
Microservice!
Scaling An Ecommerce Environment @sandermangel
Make it a
Microservice!
Well… Microservice-ish
Scaling An Ecommerce Environment @sandermangel
"In computing, microservices is a software architecture style
in which complex applications are composed of small, indepen...
Ah right, so what does it do?
An application and underlying infrastructure specifically designed and optimized for
one tas...
Ah right, so what does it do?
An application and underlying infrastructure specifically designed and optimized for
one tas...
A different approach
Scaling An Ecommerce Environment @sandermangel
Where to start
- Write down what business logic should be moved to the Microservice
- Document the API interface. What dat...
Bonus tips
- Keep it simple
- Stick to what you know
- Do read up on microservices
- Pick a simple module that has minimal...
Requirements for a framework
- Low learning curve
- Built on PHP and compatible with NginX, PHP 5.6 and up
- Fast & lightw...
Requirements for a framework
- Low learning curve
- Built on PHP and compatible with NginX, PHP 5.6 and up
- Fast & lightw...
Basic Magento model
Extracting Magento
data in models
Logic in
loosely coupled classes
Set up the Database
table
Define the API
interface
And set up a cronjob
So that's it
Scaling An Ecommerce Environment @sandermangel
So that's it
Or is it?
Scaling An Ecommerce Environment @sandermangel
Whats next
Scaling An Ecommerce Environment
- Better infrastructure
@sandermangel
Whats next
- Better infrastructure
- Management Layer
Scaling An Ecommerce Environment @sandermangel
Whats next
- Better infrastructure
- Management Layer
- Using event driven hosting
Scaling An Ecommerce Environment @sande...
Whats next
- Better infrastructure
- Management Layer
- Using event driven hosting
- Build more services
Scaling An Ecomme...
Whats next
- Better infrastructure
- Management Layer
- Using event driven hosting
- Build more services
- URL shortener
S...
Whats next
- Better infrastructure
- Management Layer
- Using event driven hosting
- Build more services
- URL shortener
-...
Whats next
- Better infrastructure
- Management Layer
- Using event driven hosting
- Build more services
- URL shortener
-...
Thank you
Sources
Microservice in general
http://microservices.io/patterns/microservices.html
http://martinfowler.com/arti...
Scaling an eCommerce environment
Scaling an eCommerce environment
Scaling an eCommerce environment
Scaling an eCommerce environment
Scaling an eCommerce environment
Scaling an eCommerce environment
Scaling an eCommerce environment
Scaling an eCommerce environment
Scaling an eCommerce environment
Nächste SlideShare
Wird geladen in …5
×

Scaling an eCommerce environment

664 Aufrufe

Veröffentlicht am

How to scale a particular subset of functionalities in your Magento installation by turning it into a Microservice

Veröffentlicht in: Technologie

Scaling an eCommerce environment

  1. 1. Scaling an eCommerce environment Beyond Magento
  2. 2. Sander Mangel - Worked at several web agencies - Currently working as Technical Lead at FitForMe - 10 as PHP developer, 5 years as Magento developer - MageStackDay, Rotterdam MUG, Meet Magento NL - sandermangel.nl / @sandermangel Scaling An Ecommerce Environment @sandermangel
  3. 3. FitForMe - Food supplements for bariatric patients - Magento EE 1.14.x - 13 websites (countries) in 1 installation - > 1000 orders per week via webshop - Rest via telephone, agents, resellers, pharmacies Migrating to Magento 2 - As a Merchant @sandermangel
  4. 4. Fulfillment - Warehouse in The Netherlands - Warehouse in the UK soon active - Resellers on other continents Q4 2016 B2B orders are booked directly into the ERP system B2C orders via Magento Scaling An Ecommerce Environment @sandermangel
  5. 5. Basic outsourced order fulfillment Scaling An Ecommerce Environment @sandermangel
  6. 6. Expanding requirements Scaling An Ecommerce Environment @sandermangel
  7. 7. Fulfillment integrated in Magento - Extracts data from the order & customer object - Performs some address checks (formatting and validity) - Creates an XML to send to the fulfillment company by FTP - Determines the type of shipping box - And some other magic that fixes/patches order data for fulfillment company Scaling An Ecommerce Environment @sandermangel
  8. 8. Expanding requirements Scaling An Ecommerce Environment @sandermangel POS for pharmacies, events, hospitals and sales agents ERP for B2B, exotic countries and Bulk orders Promotions, loyalty gifts, etc
  9. 9. Something like this Scaling An Ecommerce Environment @sandermangel
  10. 10. Magento as the shipping platform Magento > Warehouse 1 Magento > Warehouse 2 Magento <> Shipping Contract Manager ERP <> Magento POS <> Magento Dotmailer > Magento Scaling An Ecommerce Environment @sandermangel
  11. 11. Magento as the shipping API Requires a full order, invoice and shipment to be made in Magento. No guarantee for a stable API, if Magento changes (modules, updates, etc) the API breaks Magento 2 compatible? Probably not... Scaling An Ecommerce Environment @sandermangel
  12. 12. Magento sucks at doing everything Scaling An Ecommerce Environment @sandermangel
  13. 13. Magento sucks at doing everything But excels at being an online catalogue & checkout Scaling An Ecommerce Environment @sandermangel
  14. 14. Use Magento for its purpose Magento as a slow, resource heavy eCommerce platform should never be used for anything else than being an online catalog and ordering system, which is cached and optimized either out of the box or through a couple of tweaks. Scaling An Ecommerce Environment @sandermangel
  15. 15. Using Magento for the rest - Restricted by Magento - Creates overhead - Tightly coupled Generally, it takes more effort to make it work with Magento than to actually build the feature. Scaling An Ecommerce Environment @sandermangel
  16. 16. The agency way - Projects are normally done with 1 framework - Features are made to fit the technical solution - Scalability is relative - Only keeping in mind project scope - Just make it work for now, changes can be done in a later project - Make sure all hours are billable Scaling An Ecommerce Environment @sandermangel
  17. 17. Meeting a merchant needs - Scope changes as the business grows - Build features to be easily replaceable, all code is expendable - Think outside of frameworks, budgets and scopes defined by business - Should be affordable even when doing high volumes - Applications should be build modular and movable Scaling An Ecommerce Environment @sandermangel
  18. 18. Make it a Microservice! Scaling An Ecommerce Environment @sandermangel
  19. 19. Make it a Microservice! Well… Microservice-ish Scaling An Ecommerce Environment @sandermangel
  20. 20. "In computing, microservices is a software architecture style in which complex applications are composed of small, independent processes communicating with each other using language-agnostic APIs." — https://en.wikipedia.org/wiki/Microservices Scaling An Ecommerce Environment @sandermangel
  21. 21. Ah right, so what does it do? An application and underlying infrastructure specifically designed and optimized for one task with an API interface allowing other systems to communicate with it. Scaling An Ecommerce Environment @sandermangel
  22. 22. Ah right, so what does it do? An application and underlying infrastructure specifically designed and optimized for one task with an API interface allowing other systems to communicate with it. or in the case of the FitForMe Fulfillment module… An application that creates properly formatted shipment orders really well. Scaling An Ecommerce Environment @sandermangel
  23. 23. A different approach Scaling An Ecommerce Environment @sandermangel
  24. 24. Where to start - Write down what business logic should be moved to the Microservice - Document the API interface. What data will be send - Pick a framework to build it in - Set up an environment to run the Microservice. Scaling An Ecommerce Environment @sandermangel
  25. 25. Bonus tips - Keep it simple - Stick to what you know - Do read up on microservices - Pick a simple module that has minimal coupling with Magento - Document, Document, Document Scaling An Ecommerce Environment @sandermangel
  26. 26. Requirements for a framework - Low learning curve - Built on PHP and compatible with NginX, PHP 5.6 and up - Fast & lightweight - Has an API layer built in - Has a testing framework built in Scaling An Ecommerce Environment @sandermangel
  27. 27. Requirements for a framework - Low learning curve - Built on PHP and compatible with NginX, PHP 5.6 and up - Fast & lightweight - Has an API layer built in - Has a testing framework built in Scaling An Ecommerce Environment @sandermangel
  28. 28. Basic Magento model
  29. 29. Extracting Magento data in models
  30. 30. Logic in loosely coupled classes
  31. 31. Set up the Database table
  32. 32. Define the API interface
  33. 33. And set up a cronjob
  34. 34. So that's it Scaling An Ecommerce Environment @sandermangel
  35. 35. So that's it Or is it? Scaling An Ecommerce Environment @sandermangel
  36. 36. Whats next Scaling An Ecommerce Environment - Better infrastructure @sandermangel
  37. 37. Whats next - Better infrastructure - Management Layer Scaling An Ecommerce Environment @sandermangel
  38. 38. Whats next - Better infrastructure - Management Layer - Using event driven hosting Scaling An Ecommerce Environment @sandermangel
  39. 39. Whats next - Better infrastructure - Management Layer - Using event driven hosting - Build more services Scaling An Ecommerce Environment @sandermangel
  40. 40. Whats next - Better infrastructure - Management Layer - Using event driven hosting - Build more services - URL shortener Scaling An Ecommerce Environment @sandermangel
  41. 41. Whats next - Better infrastructure - Management Layer - Using event driven hosting - Build more services - URL shortener - Subscription order generation Scaling An Ecommerce Environment @sandermangel
  42. 42. Whats next - Better infrastructure - Management Layer - Using event driven hosting - Build more services - URL shortener - Subscription order generation - ... Scaling An Ecommerce Environment @sandermangel
  43. 43. Thank you Sources Microservice in general http://microservices.io/patterns/microservices.html http://martinfowler.com/articles/microservices.html http://blog.eventuate.io/2016/01/27/microservices-more-than-just-infrastructure/ Microservice in Magento http://fbrnc.net/blog/2015/10/super-scaling-magento http://alankent.me/2016/01/15/microservices-and-magento-quick-note/ https://firebearstudio.com/blog/microservices-ecommerce-magento.html API in Lumen http://laravelista.com/build-an-api-with-lumen-and-fractal/ slideshare.net/SanderMangel/scaling-an-ecommerce-environment Scaling An Ecommerce Environment @sandermangel

×