Antonio Scandurra
4e085a6f2d
Apply operations only via revision
2023-07-21 12:00:38 +02:00
Antonio Scandurra
517d073806
Remove unused use statement
2023-07-21 11:28:19 +02:00
Antonio Scandurra
cbc4b90df8
Apply missing operations to the common ancestor revision
...
Interestingly, when applying an `Edit` operation, we need to know the
parent revision, which makes the `revision` method recursive.
2023-07-21 11:19:00 +02:00
Antonio Scandurra
1ddd3971d8
Use the new RepoSnapshot::revision method
2023-07-21 10:50:00 +02:00
Antonio Scandurra
939eaaa973
💄
2023-07-21 10:35:19 +02:00
Antonio Scandurra
baf06043cb
Reify a RevisionId struct
2023-07-21 10:30:28 +02:00
Antonio Scandurra
12acc7418e
Refine finding of common ancestor revision and find missing operations
2023-07-21 09:44:17 +02:00
Nathan Sobo
02ea88aa51
Start on a RepoSnapshot::revision method to find/construct a revision from an id
2023-07-20 21:38:53 -06:00
Antonio Scandurra
9d04228853
Add document_id to Edit operation
2023-07-20 17:45:31 +02:00
Antonio Scandurra
56b1aaa6cb
WIP: start on Edit::apply
2023-07-20 14:23:51 +02:00
Antonio Scandurra
e771ede830
Test accessing branches and documents from a different client
2023-07-20 14:12:34 +02:00
Antonio Scandurra
55232486d7
Remove ancestors of the new operation from the head revision
2023-07-20 13:43:03 +02:00
Antonio Scandurra
8c1973c5a2
Make CreateDocument infallible
2023-07-20 13:12:44 +02:00
Antonio Scandurra
287dfc0460
Take a revision instead of a repo snapshot when applying branch ops
2023-07-20 13:11:07 +02:00
Antonio Scandurra
4a8556cd81
Save operation in the DAG only when we're able to apply it
2023-07-20 12:56:46 +02:00
Antonio Scandurra
900deaab50
Apply CreateBranch and CreateDocument operations
2023-07-20 11:56:22 +02:00
Antonio Scandurra
30bac17749
Save deferred operation ids only and store operations separately
2023-07-20 09:17:55 +02:00
Nathan Sobo
d675f10447
Flush deferred operations
2023-07-19 22:37:56 -06:00
Nathan Sobo
b774d83a50
Map sum_tree types to crdb::btree::{Map, Set, Sequence}
2023-07-19 15:49:52 -06:00
Nathan Sobo
b636398093
WIP
2023-07-19 15:38:16 -06:00
Nathan Sobo
88c46e091e
Defer operations when their parent is missing
2023-07-19 15:28:22 -06:00
Antonio Scandurra
8003e84d11
WIP
2023-07-19 19:41:12 +02:00
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