12 ms·
The Session Extension
- FrostKiwi 5y agoNow that's some lucky timing! Literally in 12 hours I'm supposed to work on how to sync machines without network access, that write to SQLite databases. SQLite never ceases to amaze me.
- roberto 5y agoNNCP (http://www.nncpgo.org/ http://www.nncpgo.org/) can be helpful here as well, in conjunction with the SQLite session extension.
- pdimitar 5y agoEspecially the combination of Syncthing and `nncp-xfer` is super useful. NNCP usually has strict routing which can be a hassle to guarantee (machine D only gets packets from machine A if they went through machine B and C first). Using Syncthing as a central storage for NNCP packets circumvents the strict routing requirement.
- rakoo 5y agoIt sounds like litestream (https://litestream.io/ https://litestream.io/) might be useful to you here
- unstatedAnswers 5y ago> without network access I don’t think it’ll be useful here
- melony 5y agoIf the underlying changeset is commutative, then you get a CRDT.
- samwillis 5y agoI don't think it does with a patchset but maybe could with a changeset: > When processing an UPDATE change, the following conflicts may be detected: > The target database may contain a row with the specified PRIMARY KEY values, but the current values of the fields that will be modified by the change may not match the original values stored within the changeset. This type of conflict is not detected when using a patchset. Also, if you have A and B, both initially the same, modify both with an UPDATE on the same existing row, and send and apply the patchiest to each other, I think they will overate each other and have a different state... Edit: I wander if there is a way to add a last_mod column to the tables and so only a more recent UPDATE would be executed from a patch set? It would only work at the row level but for most cases that should be ok. You could always create other tables for more granular control. It looks like you can provide a conflict hander too that can replace the update statement, that could be useful for merging conflicting changes. This could be exactly what I want for something!
- karlmdavis 5y agoPlease don’t ever use time stamps for synchronization. You will have a bad time. Clock skew is an insidious problem: things may look like they’re working, but they’re not. Given all of the clock bugs out there it’s sometimes not even safe to rely on the clock on a single machine. Across multiple machines it’s hopeless. Please note that this doesn’t apply if you have a fancy time source like Google uses in their fancy cloud DB (whose name escapes me at the moment).
- burntcaramel 5y agoIt’s called Spanner and TrueTime. Their docs are a good read: https://cloud.google.com/spanner/docs/true-time-external-consistency https://cloud.google.com/spanner/docs/true-time-external-con...
- agency 5y agoThis is nice if you can afford to have atomic clocks in your data centers and whole infrastructure teams working on keeping your clocks in sync (read: if you are Google) but otherwise you're probably gonna have a bad time.
- api 5y agoSQLite plus a fast Raft replication and consensus implementation is the next Postgres. Change my mind.
- howdydoo 5y agohttps://www.sqlite.org/whentouse.html https://www.sqlite.org/whentouse.html See: Situations Where A Client/Server RDBMS May Work Better
- thegeekpirate 5y agohttps://github.com/rqlite/rqlite https://github.com/rqlite/rqlite https://github.com/canonical/dqlite https://github.com/canonical/dqlite
- deleted 5y ago[deleted]
- rocmcd 5y agoThis exists already with rqlite: https://github.com/rqlite/rqlite https://github.com/rqlite/rqlite As much as I love the idea, Raft is not a silver bullet and can break in strange and inconspicuous ways that may be difficult to fix. It can also lead to subtle inconsistencies in the data depending on what data you are putting in it. Overall it may be good in some situations, but I doubt it will dislodge Postgres in any meaningful way.
- Conlectus 5y agoWouldn't this be true of any form of replication, including whatever Postgres uses? Or is the proof of correctness for Raft weaker than some other class of consensus? Edit: from rqlite's FAQ > Raft is a Consistency-Partition (CP) protocol. This means that if a rqlite cluster is partitioned, only the side of the cluster that contains a majority of the nodes will be available. Disconcertingly, this sounds like they assume that only one side of a partition can contain a majority of nodes. This isn't true if the partition is partial, eg A<-->B, B<-->C, A<-/->C.
- 5y ago
- koeng 5y agoAnyone have resources on how to actually use this? I see they provide C code, but I'd greatly prefer some kind of simplified interface or introduction to what is happening (kind of like how litestream has a getting started https://litestream.io/getting-started/ https://litestream.io/getting-started/ )
- jksmith 5y agoI have to say I love sqlite Fossil. Put it behind nginx and it works beautifully.
- funOtter 5y agoI'm not familiar - for what do you use sqlite Fossil?
- pinerd3 5y agoFossil is a version control system — it's what SQLite uses and it includes a static site/documentation generator, which is (AIUI) what generates sqlite.org. See https://sqlite.org/whynotgit.html https://sqlite.org/whynotgit.html and https://fossil-scm.org https://fossil-scm.org.
- mosselman 5y agoDoes something like this exist in postgres? The use case is an upgrade from postgres 10 to 11. The last time we upgraded (to 13), some queries turned out not to work well, so we were forced to go back to the old server. In the meantime stuff was written to the new server which we then manually put into the old db before switching over to the old. Result: lots of downtime. Is there a way to create a changeset like this in postgres?