bintlabs / python-sync-db

Experimental database synchronization for sqlalchemy
MIT License
47 stars 8 forks source link

State of the project? #1

Open nidico opened 7 years ago

nidico commented 7 years ago

This approach to syncing databases is very interesting!

I read this has been / is being used in production. Are there any insights / follow-up whether this works nicely?

Is this project maintained in some way?

kklingenberg commented 7 years ago

Hello!

Your interest in our little project is humbling. Even though this is currently being used in a production environment (a custom-made ERP), its state can only be described as abandoned, as the issues it presents --particularly in conflict resolution and high concurrency scaling-- are being worked around, rather than solved. I personally don't intend to further work in it, and I believe its purpose to be fulfilled: to explore the spectrum of data synchronization schemes; this project is an amalgamation of other, proved systems (say, Oracle Lite).

As for insights, we have a few. The project attempted to provide a traditional client-server application with synchronization capabilities, given clients that couldn't maintain persistent internet connections. The goal was to be non-invasive towards the relational schema being "enhanced". However, the restrictions imposed over the software stack are, as you might have seen, quite large. In my opinion, this tradeoff isn't something one could call a feature. In the end, if you're looking to implement a data synchronization scheme for a relational model, I'd recommend using a custom scheme with logical deletes and timestamps (e.g. deleted, updated_at), adding said columns to each table, and then keeping a registry of nodes in the network and store synchronization timestamps therein. As for the primary-key auto-increment collision problem: if you can, just use UUIDs (v1). If your database is already populated, strongly consider a massive migration to a more suitable schema.

Of course, if you're already considering a full-schema migration, then start by looking into state-of-the-art synchronized systems, such as Datomic and Google's Firebase.

If you're still interested in the implementation of this library, I can provide my undergraduate thesis, which describes it in broad terms. For in-depth implementation details, the source should be readable enough.

Have a good day!

dvenum commented 6 years ago

Hello.

I found your library and it look interest. Also, I see your message and will not use this sync in real business app. But I see in your answer, you can provide your undergraduate thesis. I will happy to read it in order of increasing my knowledge, also as sources of this lib.

Thanks.

kklingenberg commented 6 years ago

Hello @dvenum !

Thank you for your kind words. I'll send you the document directly. Remember that it has been a while since it was written, so you should expect some claims to be outdated within. I hope you can make something out of it :D

caihenry commented 4 years ago

Hello @kklingenberg

I found your idea the same as mine.It's pretty good because it has no invasion of the db. I will be pleasure to read your thesis if you send me the document. I hope I can be inspired and make an improvement.

kklingenberg commented 4 years ago

Hey @caihenry!

It'd be awesome if you can build upon this :) I'll send you the doc directly. Thank you for your interest!

caihenry commented 4 years ago

Hey @caihenry!

It'd be awesome if you can build upon this :) I'll send you the doc directly. Thank you for your interest!

Hi @kklingenberg! Thanks for your quick response. But I can't find the doc.Where did you send? I just find my yahoo email empty.

kklingenberg commented 4 years ago

So, I asked around and got kindof permission to share it here. Here it is! Proyecto_KKlingenberg.pdf

I think this version isn't exactly the final one, but it's probably very close.

caihenry commented 4 years ago

So, I asked around and got kindof permission to share it here. Here it is! Proyecto_KKlingenberg.pdf

I think this version isn't exactly the final one, but it's probably very close.

Thank you very much. I think that's enough.