Commit graph

48 commits

Author SHA1 Message Date
github-actions[bot]
c36664e784
chore: version packages (#435)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-27 21:34:04 +08:00
github-actions[bot]
6333cf0a09
chore: version packages (#433)
Some checks are pending
Release WASM / Release (push) Waiting to run
Test All / build (push) Waiting to run
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-27 21:08:11 +08:00
github-actions[bot]
d2b0520f86
chore: version packages (#403)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-07-14 17:03:19 +08:00
github-actions[bot]
c3a763e07d chore: version packages 2024-06-28 00:04:09 +08:00
github-actions[bot]
b30bb18f77 chore: version packages 2024-06-21 12:11:28 +08:00
github-actions[bot]
2940029b63
chore: version packages (#386)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-06-13 15:31:53 +08:00
Zixuan Chen
9be969dd38
chore: release 2024-06-07 14:14:26 +08:00
github-actions[bot]
f86421ee75
chore: version packages (#379)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-06-06 16:59:07 +08:00
github-actions[bot]
7fc85b1b04
chore: version packages (#370)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-05-23 10:28:24 +08:00
github-actions[bot]
c8bbb437ca
chore: version packages (#366)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-05-21 13:12:38 +08:00
github-actions[bot]
d01fd66e39
chore: version packages (#364)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-05-21 06:40:05 +08:00
github-actions[bot]
3f23a67bb4
chore: version packages (#355)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-05-09 16:31:21 +08:00
github-actions[bot]
da8a0f63e5 chore: version packages 2024-05-04 11:41:30 +08:00
github-actions[bot]
307df25691
chore: version packages (#346)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-05-02 16:54:47 +08:00
github-actions[bot]
41d198d9e4
chore: version packages (#333)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-04-26 12:29:22 +08:00
github-actions[bot]
1b59909490
chore: version packages (#332)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-04-24 19:29:58 +08:00
github-actions[bot]
4700ead1c1
chore: version packages (#326)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-04-18 19:56:47 +08:00
github-actions[bot]
e8352ad38d
chore: version packages (#321)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-04-17 15:15:17 +08:00
github-actions[bot]
d51c566326
chore: version packages (#319)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-04-14 22:15:07 +08:00
Zixuan Chen
8752c229f9
chore(js): bump version 2024-04-10 12:30:21 +08:00
Zixuan Chen
095e93b327
chore(wasm): bump version 2024-04-09 16:10:28 +08:00
Zixuan Chen
205fa94653
chore: bump loro-crdt 2024-04-05 02:25:25 +08:00
Zixuan Chen
1015ee33a7
chore: bump loro-crdt 2024-03-31 02:12:06 +08:00
Zixuan Chen
422e442012
chore: bump loro-crdt to 0.13.0 2024-03-30 11:44:18 +08:00
Zixuan Chen
e58e4e3fdd
chore: bump loro-crdt to v0.12.0 2024-03-27 23:53:34 +08:00
Zixuan Chen
751082f307
chore: bump 2024-02-17 14:42:37 +08:00
Zixuan Chen
7a75673fb8
chore: bump version of loro-crdt 2024-02-10 22:25:05 +08:00
Zixuan Chen
fd7c37c94e
chore: bump version to 0.10.1 2024-01-24 10:01:30 +08:00
Zixuan Chen
e304af05f4
chore: bump loro-crdt 2024-01-22 13:00:42 +08:00
Zixuan Chen
dbef6b0a38
chore: bump loro-crdt version 2024-01-21 20:04:31 +08:00
Zixuan Chen
bbea78b9bf
chore: bump version 2024-01-20 00:59:07 +08:00
Zixuan Chen
2b86783467
chore: bump loro-crdt version 2024-01-19 22:23:24 +08:00
Zixuan Chen
3a2c9523cd
chore: bump loro-crdt version 2024-01-18 13:30:26 +08:00
Zixuan Chen
ce1ac36b62
chore: bump loro-crdt version 2024-01-17 23:00:50 +08:00
Zixuan Chen
08390cb0de
chore: loro-crdt v0.8.0 2024-01-05 16:11:09 +08:00
Zixuan Chen
bc27a47531
feat: stabilizing encoding (#219)
This PR implements a new encode schema that is more extendible and more compact. It’s also simpler and takes less binary size and maintaining effort. It is inspired by the [Automerge Encoding Format](https://automerge.org/automerge-binary-format-spec/).

The main motivation is the extensibility. When we integrate a new CRDT algorithm, we don’t want to make a breaking change to the encoding or keep multiple versions of the encoding schema in the code, as it will make our WASM size much larger. We need a stable and extendible encoding schema for our v1.0 version.

This PR also exposes the ops that compose the current container state. For example, now you can make a query about which operation a certain character quickly. This behavior is required in the new snapshot encoding, so it’s included in this PR.

# Encoding Schema

## Header

The header has 22 bytes.

- (0-4 bytes) Magic Bytes: The encoding starts with `loro` as magic bytes.
- (4-20 bytes) Checksum: MD5 checksum of the encoded data, including the header starting from 20th bytes. The checksum is encoded as a 16-byte array. The `checksum` and `magic bytes` fields are trimmed when calculating the checksum.
- (20-21 bytes) Encoding Method (2 bytes, big endian): Multiple encoding methods are available for a specific encoding version.

## Encode Mode: Updates

In this approach, only ops, specifically their historical record, are encoded, while document states are excluded.

Like Automerge's format, we employ columnar encoding for operations and changes.

Previously, operations were ordered by their Operation ID (OpId) before columnar encoding. However, sorting operations based on their respective containers initially enhance compression potential.

## Encode Mode: Snapshot

This mode simultaneously captures document state and historical data. Upon importing a snapshot into a new document, initialization occurs directly from the snapshot, bypassing the need for CRDT-based recalculations.

Unlike previous snapshot encoding methods, the current binary output in snapshot mode is compatible with the updates mode. This enhances the efficiency of importing snapshots into non-empty documents, where initialization via snapshot is infeasible. 

Additionally, when feasible, we leverage the sequence of operations to construct state snapshots. In CRDTs, deducing the specific ops constituting the current container state is feasible. These ops are tagged in relation to the container, facilitating direct state reconstruction from them. This approach, pioneered by Automerge, significantly improves compression efficiency.
2024-01-02 17:03:24 +08:00
Zixuan Chen
9477717e3e
chore: bump loro-crdt versions to v0.7.1 2023-12-26 18:01:14 +08:00
Zixuan Chen
c2877e8468
chore: bump version 2023-12-14 10:38:54 +08:00
Zixuan Chen
ce36f8adbd
chore: bump version 2023-12-07 15:27:22 +08:00
Zixuan Chen
b689f5b1cd
chore: bump version 2023-12-06 23:39:55 +08:00
Zixuan Chen
4112a28607
chore: bump loro-crdt 2023-12-05 14:53:01 +08:00
Zixuan Chen
aa87a96286
chore: bump loro-crdt js 2023-12-05 14:31:06 +08:00
Zixuan Chen
bbf8acd767
chore: bump version 2023-12-05 13:58:00 +08:00
Zixuan Chen
e4814aa627
chore: init changesets 2023-12-05 13:38:09 +08:00
Zixuan Chen
8b6f49f3b3
chore(release): 0.5.0 2023-11-27 17:56:04 +08:00
Zixuan Chen
ed5324b506
chore(release): 0.4.3 2023-11-16 22:26:41 +08:00
Zixuan Chen
a484484934
chore(release): 0.4.2 2023-11-16 21:53:04 +08:00
Zixuan Chen
2129421b6a
chore(release): 0.4.1 2023-11-12 21:09:42 +08:00