Commit graph

12 commits

Author SHA1 Message Date
Antonio Scandurra
50f507e38e Maintain ref counts for document handles 2023-08-01 15:07:32 +02:00
Antonio Scandurra
31f84cef14 Broadcast operations when synchronizing with the server 2023-07-25 10:05:59 +02:00
Antonio Scandurra
56b1aaa6cb WIP: start on Edit::apply 2023-07-20 14:23:51 +02:00
Antonio Scandurra
900deaab50 Apply CreateBranch and CreateDocument operations 2023-07-20 11:56:22 +02:00
Nathan Sobo
88c46e091e Defer operations when their parent is missing 2023-07-19 15:28:22 -06:00
Antonio Scandurra
9e03e9d6df Sketch in a bi-directional sync (not yet tested) 2023-07-19 10:25:18 -06:00
Antonio Scandurra
27b06c1d09 Implement clone_repo and start handling synchronization requests 2023-07-19 16:04:44 +02:00
Nathan Sobo
afb0329914 Rework networking code and serialization
Tests aren't passing yet, but I need to wind down for the night.

Decide to try out `serde_bare`.

From GPT: `serde_bare` is a Rust library that provides a fast and efficient Serializer and
Deserializer for the "BARE" (Basic Ad-hoc Runtime Encoding) data format. This
format focuses on being simple, small, fast and working well with anonymous
types, making it useful for sending small ad-hoc messages between systems.

To type messages on the wire, I'm wrapping them in "envelope" enums. These envelopes
then implement an unwrap method that returns a Box<dyn Any>, and we require messages
to be Into their envelope type. It's some boilerplate, but I ultimately like leaning
on Rust more than an external schema, which adds complexity.

I also reworked network abstraction to be just in terms of bytes. Typed handlers
are moved into network-neutral code. It's still broken, but hopefully the direction
is clear.

Heads up: I turned on the `backtrace` feature for `anyhow`.
2023-07-18 23:40:17 -06:00
Antonio Scandurra
be7d4d6ea9 WIP 2023-07-18 19:10:20 +02:00
Antonio Scandurra
00b0189660 Simulate request/responses and room broadcasts with random network delay
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-07-18 18:33:08 +02:00
Antonio Scandurra
5267c6d2cb WIP 2023-07-18 15:11:35 +02:00
Antonio Scandurra
f4d71b2b24 WIP
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-06-30 18:03:43 +02:00