AI Briefing
KO

Chronicle of Cart Development

·2021.08.04 09:00

Key point

Market Kurly is pushing forward with a 5th-generation design to resolve deadlock issues in the cart domain and improve performance.

Details

Market Kurly developer Kim Jinsil revealed the 5-year development chronicle of the cart domain. The cart is the starting point of every order, and refactoring was carried out across 4 generations by applying the DDD (Domain-Driven Design) concept on top of the Laravel framework.

1st~3rd Generation: Escaping Legacy and the Cycle of Deadlocks

The 1st generation separated 3,000 lines of code concentrated in the Controller into Service units and improved response speed by introducing Eager Loading. The 2nd generation Stack Cart was designed for migration to Modern Cart, but failed due to deadlocks caused by data differences between tree structures and linear structures. In particular, during the cart Cleansing process, ownership contention occurred when the same account connected simultaneously, causing service outages.

The 3rd generation Modern Cart was deployed using the foundation of Stack Cart, but issues remained with integration with the order form and residual deadlocks under certain traffic conditions.

4th Generation Multi Cart: Transition to a Shared Structure

After identifying that the root cause of the deadlocks lay in the 'single session maintenance policy,' the 4th generation Multi Cart shifted to a method of sharing cart items instead of having them taken from one another. By maintaining n sessions and sharing items, contention was avoided, and technical debt was paid down through the introduction of a cache layer.

5th Generation Goals: Failure Isolation and Resource Minimization

The currently-in-development 5th generation cart focuses on separating functions so it does not become a failure indicator for other domains, and on minimizing Write DB resource allocation by reducing unnecessary DML. It aims to handle large-scale traffic smoothly and is scheduled to be released by the end of this year.

This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.

Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.