-
Notifications
You must be signed in to change notification settings - Fork 40
Add Data Sync Plugin for External Database Replication #95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Kunal-Darekar
wants to merge
22
commits into
outerbase:main
Choose a base branch
from
Kunal-Darekar:feature/data-sync-plugin
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add Data Sync Plugin for External Database Replication #95
Kunal-Darekar
wants to merge
22
commits into
outerbase:main
from
Kunal-Darekar:feature/data-sync-plugin
Conversation
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
- 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
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.sql
Test synchronization:
Documentation
Future Improvements