The strangler fig pattern for migrating checkout
Migrating from one software system to another can be challenging. Often, the shift is abrupt, causing disruptions in services or functionality. The strangler fig pattern offers a solution by allowing a gradual transition between systems, thereby minimizing potential problems. In this guide, we'll explore how you can effectively apply this method, specifically for migrating the checkout process in commerce platforms. By following a structured, phased approach, you'll gain insights into navigating the migration process smoothly while maximizing value at each step.
The strangler fig pattern explained
The strangler fig pattern, inspired by the strangler fig tree that gradually envelops its host, is an effective software architecture approach for an incremental transition from one system to another. Instead of a high-risk, all-at-once migration, this method promotes building the new system around the edges of the old, allowing both to coexist during the transition phase. Over time, as you implement functionality in the new system, you can gradually retire the corresponding parts of the old system. This approach reduces risk, provides a smoother transition, and ensures that there is a working system in place at any given point. Using the strangler fig pattern helps maintain business continuity while updating technology. To learn more about the strangler fig pattern, visit the commercetools blog.
Starting with the core of digital commerce
Starting with the checkout process can be a great way to begin the migration process to commercetools. Organizations often opt for this method for efficiency and improved return on investment (ROI). Leveraging the strangler fig pattern allows you to address the checkout migration in phases, identifying individual components that provide value independently. This way, you can implement changes based on what you know now, instead of waiting for a full analysis. Though this guide focuses on checkout migration, you can apply the same principles to other parts of your commerce system.
The migration strategy
A phased migration of the existing checkout functionality is crucial for minimizing risk and accelerating time to value when transitioning to a system like commercetools. Segmenting the migration of your checkout into three distinct phases—the low-hanging fruit phase, the deep dive phase, and the harvest phase—helps address challenges and make adjustments more efficiently. This structured approach also enables your team to realize immediate value at different points in the migration, rather than waiting for the full transition to be complete. The strangler fig pattern aids in this process by allowing a piece-by-piece migration of features, ensuring the old system remains functional. In summary, a phased migration ensures a more controlled and effective transition to the new platform. Let’s take a deeper look at each phase.
Low-hanging fruit phase
Objective: implement immediate, impactful improvements. First, migrate parts of the checkout system that require less effort but make a big difference.
In this phase, the primary focus is on migrating features and functionalities that require minimal effort but yield significant benefits. By targeting the low-hanging fruits, such as refining the order creation and payment process, organizations can experience fast improvements in efficiency and user experience. This method not only results in a quicker return on investment but also gives stakeholders clear evidence of the migration's advantages.
Benefits:
- Faster returns: concentrating on high-value, low-effort elements means investments yield benefits sooner.
- Increased stakeholder confidence: demonstrating early successes reinforces stakeholder trust, ensuring continued support and resources for the migration.
- Enhanced user experience: customers benefit from enhanced functionalities early in the process, leading to improved satisfaction and loyalty.
Recommendations:
- Prioritize features by impact and effort: create a matrix to identify the features that are straightforward to implement and have the most impact.
- Engage with business users: collect their insights to identify parts of the checkout process that need immediate enhancements.
- Incorporate feature toggles and gradual rollouts: activate new features for selected users and use incremental releases to transition features, like guest checkout, gradually.
Deep dive phase
Objective: build upon the initial progress and address the more intricate aspects of the migration.
Now that the foundational elements are in place and have started delivering value, it's time to address the more complex functionalities. This phase involves migrating more intricate and nuanced functionalities, ensuring they integrate seamlessly with the existing setup. While these features might demand more effort compared to the previous phase, the experience and insights gained from the low-hanging fruit phase make the process more efficient, ensuring a consistent path to ROI.
Benefits:
- Consistent value growth: as more features are migrated, the platform's capabilities grow, leading to an exponential increase in value.
- Optimized processes: delving deeper allows for refining processes, ensuring faster integration of subsequent functionalities.
- Incremental ROI: each added functionality contributes to returns, ensuring a steady and consistent increase in ROI.
Recommendations:
- Business process audit: take the opportunity to critically evaluate existing checkout processes, avoiding the replication of any obsolete or unnecessary functions from the previous system.
- Focus on integrations: ensure that the more advanced functionalities integrate well with existing systems and services. Utilize the Composable Commerce APIs for seamless integrations with your existing tech stack.
- Performance benchmarking: monitor system performance closely to ensure that the new features don't negatively impact the performance gained in the previous phase.
Harvest phase
Objective: finalize the migration, optimize the system, and realize its full capabilities.
The harvest phase marks the conclusion of the migration process. By this point, every aspect of the checkout system has been migrated, integrated, and fine-tuned for optimal performance. The system now operates at its fullest potential, maximizing value delivery and ROI.
Benefits:
- Maximized ROI: with all features active and running efficiently, the organization sees the greatest return on its migration investment.
- Seamless user experience: the checkout system, now fully integrated, offers a seamless and efficient experience for customers, driving satisfaction and potential revenue growth.
Recommendations:
- Full system review: conduct a comprehensive audit of the migrated functionalities to ensure they are fully optimized and aligned with business objectives.
- Performance tuning: refine the system, focusing especially on API calls to Composable Commerce, ensuring they perform optimally.
- User training: provide comprehensive training for business administrators. This ensures familiarity with the new system and its optimal use.
This structured and phased approach ensures that the focus remains on achieving value early at every stage of migration, making the entire process more efficient and beneficial for the organization.
Mapping the migration phases for checkout
To map the migration phases for the checkout process, begin by identifying the systems and the processes involved. The diagram below provides an example of a typical checkout flow.
Next, determine which parts of the process align with specific migration phases. Start by identifying components suitable for the initial phase. For example, you might allocate the phases as follows:
In this overview, the first phase focuses on migrating payment and order creation. These components often provide significant value and typically have clear requirements.
In the second and third phases, the migration efforts can focus on the more complex parts of the system like promotions, as these are often complex in large organizations.
A practical example
After deciding on the migration phases, let's look at how to implement them, starting with the low-hanging fruit phase. One approach is to begin by redirecting only the guest checkout traffic to Composable Commerce. This strategy offers several advantages. Firstly, it targets a user segment that typically has fewer complexities, like saved account preferences or history, making it easier to troubleshoot and adjust. Secondly, this focused rollout speeds up the feedback cycle, allowing you to rapidly validate system performance and make necessary adjustments. These faster iterations can bring tangible benefits when you migrate to Composable Commerce, such as better cart-to-checkout transitions.
The following diagram illustrates the utilization of the strangler fig pattern to operate two systems in parallel without modifying the existing system's code.
To successfully run two systems simultaneously, we introduce four essential architectural components:
- Routing service or feature toggling: this service determines when to divert guest checkout processes to Composable Commerce, providing a dynamic mechanism for risk mitigation.
- Cart microservice: this component fetches cart information from the existing system and transfers it to fit the data model of Composable Commerce. It subsequently creates a new Cart within the new environment.
- commercetools: a scalable system equipped with a range of products and APIs designed to manage cart, order, and payment processes.
- Payments: commercetools Connect provides diverse payment integration options.
Using this approach, you can achieve a carefully managed migration to commercetools while maintaining the flexibility to monitor performance and make real-time adjustments. To further manage risk, the routing service can initiate the switch with only 10% of guest checkout traffic, allowing for performance monitoring and iterative improvements.
Conclusion
This guide has outlined how to use the strangler fig pattern for migrating your checkout system. By following a phased approach, you can reduce risks and gain benefits at each migration stage. Now, it's your turn to put these insights into action and enjoy the benefits of a modern, efficient checkout system.