The document discusses an alternative checkout flow architecture for Magento that focuses on improved performance, scalability, and customizability. Key aspects include separating the checkout into independent applications, using a unidirectional data flow between components, supporting multi-address checkout out of the box, calculating totals in a pipeline using immutable objects, and storing totals data in a unified format. The proposed changes are aimed at simplifying integration, replacing components, and improving the scalability and extensibility of the checkout system.
2. #MM19PL
Checkout features
- One-page checkout with support for different shipping carriers
- Multi-address checkout
- Instant Purchase with the ability to place an order from a product page
- Multiple payments integrations like PayPal, Braintree, Authorize.net
- Vault tokenization
- Different security features like 3D-Secure verification, anti-fraud protection
10. #MM19PLGraphQL
- All resources are connected
- Declarative data fetching
- Type system and schema definition
- Multiple queries and mutations can be done via one request
11. #MM19PL
No HTTP caching
No API versioning
Tricky to implement rate limiting
Query complexity
Query in indefinite depth
But
27. #MM19PL
Checkout improvements
Better application performance
Components replaceability
Improved headless integration experience (GraphQL)
GraphQL API for building checkout flow via single HTTP query
Separated API for Cart and Quote
Multi-address checkout based on multi-quote flow
API for Requisition List and Negotiable Quote
30. #MM19PL
Mutable
- Simpler to create, test and use
- Help to avoid temporal coupling
- Easier to cache
- Do not change the state- Can be updated any time
- Are thread-safe
- Help avoid side effects
- Easier to implement
- Easier to extend
- Cheaper for creation
https://github.com/magento/architecture/pull/207
Immutable
36. #MM19PL
UUID advantages & disadvantages
Unique across applications/tables/databases
Environment independent
A value is known before the entity is saved
A value does not expose the information about the entity
Suitable for distributed systems
Take up more storage space
More difficult for debugging
Less performant than the auto increment
38. #MM19PL
Summary
- Performance improvements
- Components replaceability
- Improvements to API customizability and extensibility
- Independent storefront and store management applications
- Clear boundaries between Cart and Quote components
- Unidirectional flow reduces communication between components
- Multi-address checkout out-of-box
- Support of immutable multi-quotes
- A unified interface for totals calculation
- Simplified and unified totals storage