From 306ba25c38f864280c9f78a06816d713f1113416 Mon Sep 17 00:00:00 2001
From: erikjohnston Synapse has a concept of "streams", which are roughly described in Synapse has a concept of "streams", which are roughly described in Streams
-id_generators.py
.
+id_generators.py
.
Generally speaking, streams are a series of notifications that something in Synapse's database has changed that the application might need to respond to.
For example:
@@ -168,9 +168,9 @@ For example:
See synapse.replication.tcp.streams
for the full list of streams.
See synapse.replication.tcp.streams
for the full list of streams.
It is very helpful to understand the streams mechanism when working on any part of Synapse that needs to respond to changes—especially if those changes are made by different workers.
-To that end, let's describe streams formally, paraphrasing from the docstring of AbstractStreamIdGenerator
.
AbstractStreamIdGenerator
.
A stream is an append-only log T1, T2, ..., Tn, ...
of facts1 which grows over time.
Only "writers" can add facts to a stream, and there may be multiple writers.