-
Notifications
You must be signed in to change notification settings - Fork 1k
Description
Background
Maxwell is an excellent tool for capturing and distributing MySQL binlog changes. Currently, Maxwell's core logic and various producers are tightly coupled within a single codebase. While it is technically possible to integrate Maxwell as a library, the current monolithic package pulls in a large number of unnecessary dependencies, which increases the complexity of integration and maintenance. This forces any project that wants to use its core functionality to either run a full Maxwell daemon or integrate a bulky library with redundant features.
An Idea
I have an idea about adjusting Maxwell's code organization and would like to consult and discuss its feasibility with the project maintainers.
My idea is to restructure the Maxwell codebase into a modular architecture without changing the current distribution method. Specifically, we could:
- Create a
maxwell-coremodule: This module would contain only the code for binlog parsing, change capture, and core routing logic. It would be very lean and would not include any specific producer implementations. - Create separate producer modules: For example,
maxwell-producer-kafka,maxwell-producer-rabbitmq, etc. These modules would depend onmaxwell-core.
The Benefits of This Change
- Lighter and more focused: The
maxwell-coremodule would focus solely on its core tasks. When used as a library, it would no longer pass on unnecessary dependencies, greatly reducing project complexity. - Greater flexibility: Other projects could easily integrate the streamlined
maxwell-coreinto their own code and directly call its core functions without needing to run a separate Maxwell daemon. - Encourages innovation: The community could more easily develop and contribute new producer modules or create custom data processing logic without modifying the core codebase.
I understand this adjustment might require some effort, but in the long run, it would significantly improve Maxwell's flexibility and extensibility.
I'm curious to hear your thoughts on this and whether such a change is on the roadmap for the future. I look forward to your reply.