3 ms·
You wouldn't 'wait for sync', you would just be continually running the application loop, and it would meanwhile be synchronising? This is just demo code, run
by OJFord 3y ago
You wouldn't 'wait for sync', you would just be continually running the application loop, and it would meanwhile be synchronising?
This is just demo code, run these two short scripts to see a synchronising example, at least that's my reading.
- tyingq 3y agoI think Mycelite is either very early in it's life, or is just an experiment. The replication code[1] has this at the top: //! Replicator prototype //! //! ** For demo use only! And the configuration suggests it sends some data to https://us-east-1.mycelial.com https://us-east-1.mycelial.com [2] And that's not really explained anywhere I can see. I don't think the authors would currently suggest using it for anything real. [1] https://github.com/mycelial/mycelite/blob/main/mycelite/src/replicator/http_replicator.rs https://github.com/mycelial/mycelite/blob/main/mycelite/src/... [2] https://github.com/mycelial/mycelite/blob/main/mycelite/src/config.rs#L66 https://github.com/mycelial/mycelite/blob/main/mycelite/src/...
- cryptonector 3y agoSync notifications need to be async. That goes for `fsync()`/`fdatasync()` as well as for `COMMIT`. In the case of a database-using application you can report transaction non-failure (as in: it was well-formed and accepted) in a UI separately from transaction durability success (i.e., it really finished), and if you have replication to worry about, you can also report replication success separately. Every blocking operation needs an async variant. Everything should be async-first.