0
0
mirror of https://github.com/tursodatabase/libsql.git synced 2025-07-01 22:48:05 +00:00
Files
libsql/libsql-server/src/test
Athos 7ce212604e Proof of concept of CDC on libsql-server (#1388)
* Add SQLD_HTTP_PRIMARY_URL config and pass it all the way down to user routes

* Add broadcaster struct to namespaces to notify updates

* Add user route that allows listening to updates

* Aggregate events before broadcasting them

* Unsubscribe when stream is dropped and other minor improvements

* Add BrodcasterRegistry and BrodcasterHandle to manage broadcaster lifecycle

* Simplify code

* Update hooks during statement execution

Connection can live arbitrarily long, so we can't only register hooks
when they are created.

* Always inline should serialize checker of broadcaster message

Co-authored-by: Lucio Franco <luciofranco14@gmail.com>

* Replace HashMap with BTreeMap on broadcaster state

It improves performance on the case where we have thousands of updates
to the same table.

* Add counters to events sent and dropped

---------

Co-authored-by: Lucio Franco <luciofranco14@gmail.com>
2024-06-13 13:28:06 +00:00
..
2023-10-17 17:41:26 +02:00