lerenn / cryptellation

Scalable cryptocurrency investment system
https://cryptellation.dev
GNU Affero General Public License v3.0
5 stars 3 forks source link

Change SQL to NoSQL #110

Closed lerenn closed 5 months ago

lerenn commented 6 months ago

There is no relationships in the database and the migrations are a pain. This would leverage the lazy migration.

gedw99 commented 5 months ago

Hey @lerenn

there is a nice sqlite system that does CRDT multi master sync and subscriptions that I am using with NATS.

https://github.com/superfly/corrosion

It might be your cup of tea.

The big deal is that all instances sync without clashes, because its using a basic CRDT approach.

I managed to get it running and the subscription can feed into NATS easily because its a simple HTTP API.

https://superfly.github.io/corrosion/api/subscriptions.html

Check out the way the change feed works in that docs. Its is quite easy to get row level updates on the data.

I have no idea if this helps you or not, but its an interesting option compared to mongo is you want really high HA / DR without any co-ordination needed.