Skip to main content

A Django app to create and manage live replications of SQL database tables.

Project description


Pantograph Database Replicator

Flexible Database replication system compatible with most SQL databases

Table of Contents
  1. About The Project
  2. Quick Start
  3. Roadmap
  4. Contributing
  5. License
  6. Contact
  7. Acknowledgements

About The Project

PDR is a standalone Django app for establishing a reliable, high-performance, cross-platform, live mirror of any table[s] in an SQL database server to any other SQL database server.
Pantograph database replication is event driven, not time driven, ie. it doesn’t update the whole mirror database periodically; Instead, it updates each individual group of affected records in the affected table in the mirror at the moment it's modified in the original database. Which results in a more speedy instant update, yet consumes less bandwidth and server resources. Pantograph database replication is also perfectly reliable because the server listening for changes doesn’t has to be online at the moment changes occur. Instead, the host server creates notification channels where changes are stacked awaiting the listening server’s action to read notification, and update its replications in remote servers.
A list of commonly used resources that I find helpful are listed in the acknowledgements.

Features

  1. Can replicate data to multiple tables in separate databases.
  2. Can replicate data into a new structure, yet, keep it live.
  3. Can replicate data from any kind of SQL database.
  4. Very reliable as pdr events are created by native SQL trigger functions inside source databases.
  5. High in performance as it’s event-driven.
  6. One-way data replication can be used to join data from multiple different tables in multiple different databases into one live table.
  7. Provides a simple easy to use GUI to configure replications.
  8. Distributed as a standalone Django app wrapped in a PyPi package so you can easily integrate it with any existing Django Project.

Built With

The project is based on Django, the popular python framework, SQLAlchemy, A wonderful open-source SQL abstraction layer for the Python programing language, and native SQL trigger functions.

Quick start

  1. Add "reflector" and "django_ace" to your INSTALLED_APPS setting like this::
INSTALLED_APPS = [
    ...
    'django_ace',
    'reflector',
]
  1. Include the admin URLs anywhere in your project urls.py like this::
from django.contrib import admin

urlpatterns = [
    path('admin/', admin.site.urls),
]
  1. Run python manage.py makemigrations and then python manage.py migrate to create the reflector models.

  2. Start the development server and visit http://127.0.0.1:8000/admin/ to setup Databases, SourceTables and then Reflections.

Roadmap

See the open issues for a list of proposed features (and known issues).

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the Apache 2 License. See LICENSE for more information.

Contact

Meena (Menas) Erian - menas@portacode.com

Project Link: https://github.com/meena-erian/pdr

Acknowledgements

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-pdr-0.0.tar.gz (27.9 kB view hashes)

Uploaded Source

Built Distribution

django_pdr-0.0-py3-none-any.whl (37.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page