Open benbjohnson opened 3 years ago
Tidb has cdc so adding in case it helps
Thanks, @gedw99. I didn't realize PingCAP had a CDC.
This would be incredibly useful. I've built systems in the past that listen to the MySQL replication stream and turn that into events - having that capability for SQLite would be fantastic.
Seeing you mentioned the sessions extension, I got curious what is the state of its use in go on github.
@freshteapot I asked if this is possible at https://gitlab.com/cznic/sqlite/-/issues/60
@gedw99 thank you for the tip! I wiill keep an eye on this project! sqlite without cgo would be very cool!
@benbjohnson this one is a good primer: https://medium.com/event-driven-utopia/a-gentle-introduction-to-event-driven-change-data-capture-683297625f9b
interested ;)
While Litestream performs physical replication of WAL frames, it would be useful to derive logical changesets from those physical pages. This could be done by using the Ptrmap pages to traverse up the b-tree to the root and from the root page number we can associate the changed page with a table & schema.
One tricky part would be determining how this information is relayed to the application. It could potentially be streamed via a unix socket and the application could have a client that connects to it.
The resulting stream could be a stream of JSON objects or perhaps the session extension format could be used.