flypiggyyoyoyo commented on PR #805: URL: https://github.com/apache/incubator-seata-go/pull/805#issuecomment-2954512370
Let me explain the design rationale behind initializing the persistence components. The implementations of the persistence interfaces reside in the store package. Directly invoking the store package from core would create circular dependencies and violate the Dependency Inversion Principle. The core issue is that the core package is designed as a high-level abstraction layer responsible for defining core logic and abstract interfaces. This design ensures that high-level modules (like the state machine engine) do not depend on low-level modules (such as the storage implementations in store). Instead, both depend on abstractions (e.g., the statemachine_store interface file in core, which is shared by both core and store). This is precisely why I didn't opt to resolve circular dependencies by splitting the abstractions in the core packageāa move that would undermine the package's original design intent and entail significant risks and effort. In fact, I created a dedicated branch to experiment with splitting the core package, which confirmed my concerns. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@seata.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@seata.apache.org For additional commands, e-mail: notifications-h...@seata.apache.org