Add Data Sync Plugin for External Database Replication#95
Open
Kunal-Darekar wants to merge 22 commits intoouterbase:mainfrom
Open
Add Data Sync Plugin for External Database Replication#95Kunal-Darekar wants to merge 22 commits intoouterbase:mainfrom
Kunal-Darekar wants to merge 22 commits intoouterbase:mainfrom
Conversation
- Implement chunked processing for large database dumps - Add R2 storage integration for dump files - Configure export timeouts and breathing intervals - Add environment variables for dump configuration Resolves outerbase#93
- Implement chunked processing for large database dumps - Add R2 storage integration for dump files - Configure export timeouts and breathing intervals - Add environment variables for dump configuration Resolves outerbase#93
- Implement chunked processing for large database dumps - Add R2 storage integration for dump files - Configure export timeouts and breathing intervals - Add environment variables for dump configuration Resolves outerbase#93
- Implement chunked processing for large database dumps - Add R2 storage integration for dump files - Configure export timeouts and breathing intervals - Add environment variables for dump configuration Resolves outerbase#93
- Implement chunked processing for large database dumps - Add R2 storage integration for dump files - Configure export timeouts and breathing intervals - Add environment variables for dump configuration Resolves outerbase#93
- Implement chunked processing for large database dumps - Add R2 storage integration for dump files - Configure export timeouts and breathing intervals - Add environment variables for dump configuration Resolves outerbase#93
- Implement chunked processing for large database dumps - Add R2 storage integration for dump files - Configure export timeouts and breathing intervals - Add environment variables for dump configuration Resolves outerbase#93
- Implement chunked processing for large database dumps - Add R2 storage integration for dump files - Configure export timeouts and breathing intervals - Add environment variables for dump configuration Resolves outerbase#93
- Implement chunked processing for large database dumps - Add R2 storage integration for dump files - Configure export timeouts and breathing intervals - Add environment variables for dump configuration Resolves outerbase#93
- Implement chunked processing for large database dumps - Add R2 storage integration for dump files - Configure export timeouts and breathing intervals - Add environment variables for dump configuration Resolves outerbase#93
- Implement chunked processing for large database dumps - Add R2 storage integration for dump files - Configure export timeouts and breathing intervals - Add environment variables for dump configuration Resolves outerbase#93
- Implement chunked processing for large database dumps - Add R2 storage integration for dump files - Configure export timeouts and breathing intervals - Add environment variables for dump configuration Resolves outerbase#93
- Implement chunked processing for large database dumps - Add R2 storage integration for dump files - Configure export timeouts and breathing intervals - Add environment variables for dump configuration Resolves outerbase#93
- Implement chunked processing for large database dumps - Add R2 storage integration for dump files - Configure export timeouts and breathing intervals - Add environment variables for dump configuration Resolves outerbase#93
- Implement chunked processing for large database dumps - Add R2 storage integration for dump files - Configure export timeouts and breathing intervals - Add environment variables for dump configuration Resolves outerbase#93
This commit adds a new Data Sync Plugin that enables StarbaseDB to replicate data from external databases. Features include: - Automatic synchronization with configurable intervals - Support for PostgreSQL, MySQL, MongoDB and other databases - Incremental updates with change tracking - Selective table synchronization - Comprehensive error handling - Complete test suite and documentation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
/Fixes #72
/claim #72
Overview
This PR adds a new Data Sync Plugin that enables StarbaseDB to replicate data from external databases to the internal SQLite database. The plugin provides a robust, configurable solution for keeping data synchronized across different database systems.
Features
Implementation Details
Files Added/Modified
plugins/data_sync/index.ts- Main plugin implementationplugins/data_sync/index.test.ts- Test suiteplugins/data_sync/readme.md- Documentationplugins/data_sync/demo/setup.sql- Demo database setupplugins/data_sync/demo/test.ts- Demo implementationplugins/data_sync/demo/wrangler.toml- Configuration examplevitest.config.ts- Updated test configurationpackage.json- Added test scripttsconfig.json- Updated TypeScript configurationTesting
Setup and Configuration
Prerequisites
Installation Steps
Start a PostgreSQL instance:
Configure the plugin in wrangler.toml:
Set up environment variables for database credentials:
Initialize test database:
psql -U postgres -d postgres -c "CREATE DATABASE starbase_demo;" psql -U postgres -d starbase_demo -f plugins/data_sync/demo/setup.sqlTest synchronization:
Documentation
Future Improvements