mxsm commented on PR #4332: URL: https://github.com/apache/eventmesh/pull/4332#issuecomment-1687921845
> @mxsm The way I was looking this implementation is a bit different. What do you think about a wrapper API around vanilla **jdbc** with the ability to load a database driver depending on the source(MySQL, PostgreSQL, SQL Server etc...) or the sink(MySQL, PostgreSQL, SQL Server etc..). @Pil0tXia @HattoriHenzo Thank you for your suggestion. Here is an abstract architecture diagram of my code: The diagram is divided into three parts:  The main idea of the design is to parse the data model of the database supporting Jdbc into the corresponding EventMesh event model for processing.Provide a universal interface for interactivity with the database layer and load different database drivers through protocols. Here, I provide dynamic loading of database drivers through JdbcConnection. Later, additional database support can be added by simply including the corresponding database JDBC driver. When the module starts, it automatically loads the corresponding driver based on the configured JDBC protocol. 1. The JdbcConnection API wrapper part is mainly responsible for loading different drivers based on the configured JDBC protocol and creating a connection for the engine to use, for example, configuring jdbc:mysql://localhost:3306 would load the MySQL driver.The JdbcConnection can load different database drivers based on different protocols. 2. The abstract engine module is divided into two types: a snapshot engine for processing data snapshots and a CDC engine for processing database CDC. The engine is responsible for converting data into custom events within EventMesh. 3. Task management mainly manages tasks for processing events. Tasks are divided into two categories: tasks for processing snapshot events (these tasks can be closed after snapshot processing is complete), and tasks for processing CDC events. I will improve the code and ask for your help to review it later. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
