Commit graph

29 commits

Author SHA1 Message Date
Antonio Scandurra
2c27e875e5 Move apply_operations to Repo
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-07-19 19:40:58 +02: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
Antonio Scandurra
e6b7bbee25 Fix errors in message/request deserialization code 2023-07-19 10:47:06 +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
Nathan Sobo
8deafe90fc Start on sync module with FibDescending iterator 2023-07-18 16:52:55 -06:00
Antonio Scandurra
0ae7a9974f Wire up creation and joining of rooms
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-07-18 19:30:27 +02: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
6205ac27a5 WIP 2023-07-18 13:16:32 +02:00
Antonio Scandurra
f4d71b2b24 WIP
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-06-30 18:03:43 +02:00
Antonio Scandurra
cdeabcab4e Introduce branches and revisions
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-06-30 10:59:23 +02:00
Antonio Scandurra
4070f67f3b Turn visible into a method on DocumentFragment 2023-06-30 09:21:32 +02:00
Antonio Scandurra
4bc1b57d8f WIP 2023-06-29 12:06:47 +02:00
Antonio Scandurra
4c672c4e5f Add a basic test that passes when editing two documents
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-06-29 11:23:02 +02:00
Antonio Scandurra
e6bd85ffa7 WIP
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-06-28 19:28:40 +02:00
Antonio Scandurra
04cd04ff82 WIP
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-06-28 17:48:27 +02:00
Antonio Scandurra
650282f3d0 WIP 2023-06-28 12:05:42 +02:00
Nathan Sobo
3a71894360 Not how we need to do it 2023-06-28 11:51:00 +02:00
Nathan Sobo
2381e3f650 WIP 2023-06-28 11:51:00 +02:00
Nathan Sobo
1cb53805e2 WIP 2023-06-28 11:51:00 +02:00
Nathan Sobo
2791db41d7 WIP 2023-06-28 11:51:00 +02:00
Antonio Scandurra
1578f5fb35 WIP 2023-06-28 11:51:00 +02:00
Nathan Sobo
d09af1948e WIP: Deeper thinking about versions 2023-06-28 11:51:00 +02:00
Nathan Sobo
754cc01f87 WIP 2023-06-28 11:51:00 +02:00
Nathan Sobo
523ea23b10 WIP 2023-06-28 11:51:00 +02:00
Nathan Sobo
f9b5f102f8 Get sketch of major types compiling 2023-06-28 11:51:00 +02:00
Nathan Sobo
7d1b6cb49d Hello CRDB.
Sketch in types with not much implementation.

Does not compile for fairly trivial reasons.
2023-06-28 11:51:00 +02:00