Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ format, enabling:

**Crate name**: `sqlite-diff-rs` (on crates.io)
**Edition**: 2024, **License**: MIT
**Repository**: <https://github.com/LucaCappelletti94/sqlite-diff-rs>
**Repository**: <https://github.com/connetto-rs/sqlite-diff-rs>

### Key Design Decisions

Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2024"
rust-version = "1.87"
description = "Build SQLite changeset and patchset binary formats programmatically, without SQLite"
license = "MIT"
repository = "https://github.com/LucaCappelletti94/sqlite-diff-rs"
repository = "https://github.com/connetto-rs/sqlite-diff-rs"
documentation = "https://docs.rs/sqlite-diff-rs"
readme = "README.md"
keywords = ["sqlite", "changeset", "patchset", "session", "cdc"]
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

[![Crates.io](https://img.shields.io/crates/v/sqlite-diff-rs.svg)](https://crates.io/crates/sqlite-diff-rs)
[![Documentation](https://docs.rs/sqlite-diff-rs/badge.svg)](https://docs.rs/sqlite-diff-rs)
[![CI](https://github.com/LucaCappelletti94/sqlite-diff-rs/actions/workflows/ci.yml/badge.svg)](https://github.com/LucaCappelletti94/sqlite-diff-rs/actions/workflows/ci.yml)
[![AddressSanitizer](https://github.com/LucaCappelletti94/sqlite-diff-rs/actions/workflows/asan.yml/badge.svg)](https://github.com/LucaCappelletti94/sqlite-diff-rs/actions/workflows/asan.yml)
[![Codecov](https://codecov.io/gh/LucaCappelletti94/sqlite-diff-rs/branch/main/graph/badge.svg)](https://codecov.io/gh/LucaCappelletti94/sqlite-diff-rs)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/LucaCappelletti94/sqlite-diff-rs/blob/main/LICENSE)
[![CI](https://github.com/connetto-rs/sqlite-diff-rs/actions/workflows/ci.yml/badge.svg)](https://github.com/connetto-rs/sqlite-diff-rs/actions/workflows/ci.yml)
[![AddressSanitizer](https://github.com/connetto-rs/sqlite-diff-rs/actions/workflows/asan.yml/badge.svg)](https://github.com/connetto-rs/sqlite-diff-rs/actions/workflows/asan.yml)
[![Codecov](https://codecov.io/gh/connetto-rs/sqlite-diff-rs/branch/main/graph/badge.svg)](https://codecov.io/gh/connetto-rs/sqlite-diff-rs)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/connetto-rs/sqlite-diff-rs/blob/main/LICENSE)

A Rust library for building SQLite [changeset and patchset](https://www.sqlite.org/sessionintro.html) binary formats programmatically.

Expand Down Expand Up @@ -214,4 +214,4 @@ This crate is `no_std` compatible (requires `alloc`). It can be used in embedded

## License

MIT License, see [LICENSE](https://github.com/LucaCappelletti94/sqlite-diff-rs/blob/main/LICENSE) for details.
MIT License, see [LICENSE](https://github.com/connetto-rs/sqlite-diff-rs/blob/main/LICENSE) for details.
30 changes: 15 additions & 15 deletions REPORT.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The downsides are limited compressibility (the binary encoding leaves little red

## Binary Format Overview

![Changeset vs Patchset binary wire format](https://raw.githubusercontent.com/LucaCappelletti94/sqlite-diff-rs/main/docs/format_illustration.svg)
![Changeset vs Patchset binary wire format](https://raw.githubusercontent.com/connetto-rs/sqlite-diff-rs/main/docs/format_illustration.svg)

Both formats share the same container structure: one or more table sections, each with a header followed by change records.

Expand Down Expand Up @@ -42,7 +42,7 @@ Both formats share the same container structure: one or more table sections, eac

Comparison of seven serialization formats for identical database operations on a realistic chat schema with UUID primary keys.

![Payload Size vs Operation Count](https://raw.githubusercontent.com/LucaCappelletti94/sqlite-diff-rs/main/integration-tests/payload-size-bench/plots/ops_scaling.svg)
![Payload Size vs Operation Count](https://raw.githubusercontent.com/connetto-rs/sqlite-diff-rs/main/integration-tests/payload-size-bench/plots/ops_scaling.svg)

### Single Operations (bytes)

Expand Down Expand Up @@ -81,13 +81,13 @@ Protobuf wins on single operations because field numbers take 1 to 2 bytes inste

### Compression Behavior

![Deflate compression](https://raw.githubusercontent.com/LucaCappelletti94/sqlite-diff-rs/main/integration-tests/payload-size-bench/plots/deflate.svg)
![Deflate compression](https://raw.githubusercontent.com/connetto-rs/sqlite-diff-rs/main/integration-tests/payload-size-bench/plots/deflate.svg)

![LZ4 compression](https://raw.githubusercontent.com/LucaCappelletti94/sqlite-diff-rs/main/integration-tests/payload-size-bench/plots/lz4.svg)
![LZ4 compression](https://raw.githubusercontent.com/connetto-rs/sqlite-diff-rs/main/integration-tests/payload-size-bench/plots/lz4.svg)

![Zstd compression](https://raw.githubusercontent.com/LucaCappelletti94/sqlite-diff-rs/main/integration-tests/payload-size-bench/plots/zstd.svg)
![Zstd compression](https://raw.githubusercontent.com/connetto-rs/sqlite-diff-rs/main/integration-tests/payload-size-bench/plots/zstd.svg)

![Compressor comparison for patchset](https://raw.githubusercontent.com/LucaCappelletti94/sqlite-diff-rs/main/integration-tests/payload-size-bench/plots/compressor_comparison_patchset.svg)
![Compressor comparison for patchset](https://raw.githubusercontent.com/connetto-rs/sqlite-diff-rs/main/integration-tests/payload-size-bench/plots/compressor_comparison_patchset.svg)

The binary format's compact encoding leaves limited redundancy for compressors. Text-based formats compress more dramatically but still end up larger than uncompressed patchsets. For bandwidth-constrained scenarios, patchsets offer a good balance without compression overhead.

Expand All @@ -101,7 +101,7 @@ Benchmarks comparing four methods for applying changes to SQLite databases.

#### Integer Primary Key

![Method comparison int_pk](https://raw.githubusercontent.com/LucaCappelletti94/sqlite-diff-rs/main/integration-tests/apply-bench-report/plots/method_int_pk.svg)
![Method comparison int_pk](https://raw.githubusercontent.com/connetto-rs/sqlite-diff-rs/main/integration-tests/apply-bench-report/plots/method_int_pk.svg)

| Method | Median | Speedup vs SQL |
|--------|-------:|---------------:|
Expand All @@ -112,7 +112,7 @@ Benchmarks comparing four methods for applying changes to SQLite databases.

#### UUID Primary Key

![Method comparison uuid_pk](https://raw.githubusercontent.com/LucaCappelletti94/sqlite-diff-rs/main/integration-tests/apply-bench-report/plots/method_uuid_pk.svg)
![Method comparison uuid_pk](https://raw.githubusercontent.com/connetto-rs/sqlite-diff-rs/main/integration-tests/apply-bench-report/plots/method_uuid_pk.svg)

| Method | Median | Speedup vs SQL |
|--------|-------:|---------------:|
Expand All @@ -125,19 +125,19 @@ Benchmarks comparing four methods for applying changes to SQLite databases.

#### Integer PK

![Scaling int_pk empty](https://raw.githubusercontent.com/LucaCappelletti94/sqlite-diff-rs/main/integration-tests/apply-bench-report/plots/scaling_int_pk_empty.svg)
![Scaling int_pk populated](https://raw.githubusercontent.com/LucaCappelletti94/sqlite-diff-rs/main/integration-tests/apply-bench-report/plots/scaling_int_pk_populated.svg)
![Scaling int_pk empty](https://raw.githubusercontent.com/connetto-rs/sqlite-diff-rs/main/integration-tests/apply-bench-report/plots/scaling_int_pk_empty.svg)
![Scaling int_pk populated](https://raw.githubusercontent.com/connetto-rs/sqlite-diff-rs/main/integration-tests/apply-bench-report/plots/scaling_int_pk_populated.svg)

#### UUID PK

![Scaling uuid_pk empty](https://raw.githubusercontent.com/LucaCappelletti94/sqlite-diff-rs/main/integration-tests/apply-bench-report/plots/scaling_uuid_pk_empty.svg)
![Scaling uuid_pk populated](https://raw.githubusercontent.com/LucaCappelletti94/sqlite-diff-rs/main/integration-tests/apply-bench-report/plots/scaling_uuid_pk_populated.svg)
![Scaling uuid_pk empty](https://raw.githubusercontent.com/connetto-rs/sqlite-diff-rs/main/integration-tests/apply-bench-report/plots/scaling_uuid_pk_empty.svg)
![Scaling uuid_pk populated](https://raw.githubusercontent.com/connetto-rs/sqlite-diff-rs/main/integration-tests/apply-bench-report/plots/scaling_uuid_pk_populated.svg)

### Configuration Impact (indexes, triggers, foreign keys)

#### Integer PK

![Config variants int_pk](https://raw.githubusercontent.com/LucaCappelletti94/sqlite-diff-rs/main/integration-tests/apply-bench-report/plots/config_int_pk.svg)
![Config variants int_pk](https://raw.githubusercontent.com/connetto-rs/sqlite-diff-rs/main/integration-tests/apply-bench-report/plots/config_int_pk.svg)

| Config | SQL overhead | Patchset overhead |
|--------|-------------:|------------------:|
Expand All @@ -148,11 +148,11 @@ Benchmarks comparing four methods for applying changes to SQLite databases.

#### UUID PK

![Config variants uuid_pk](https://raw.githubusercontent.com/LucaCappelletti94/sqlite-diff-rs/main/integration-tests/apply-bench-report/plots/config_uuid_pk.svg)
![Config variants uuid_pk](https://raw.githubusercontent.com/connetto-rs/sqlite-diff-rs/main/integration-tests/apply-bench-report/plots/config_uuid_pk.svg)

### Primary Key Type Impact

![PK comparison](https://raw.githubusercontent.com/LucaCappelletti94/sqlite-diff-rs/main/integration-tests/apply-bench-report/plots/pk_comparison.svg)
![PK comparison](https://raw.githubusercontent.com/connetto-rs/sqlite-diff-rs/main/integration-tests/apply-bench-report/plots/pk_comparison.svg)

| Method | int_pk | uuid_pk | Overhead |
|--------|-------:|--------:|---------:|
Expand Down
4 changes: 2 additions & 2 deletions docs/infographic.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion fuzz/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions integration-tests/schema-aware-roundtrip/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion integration-tests/schema-aware-roundtrip/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ sqlite-diff-rs = { path = "../..", default-features = false, features = [
"maxwell",
] }
diesel = { git = "https://github.com/diesel-rs/diesel", features = ["sqlite", "mysql"] }
diesel-sqlite-session = { git = "https://github.com/LucaCappelletti94/diesel-sqlite-session" }
diesel-sqlite-session = { git = "https://github.com/connetto-rs/diesel-sqlite-session" }
testcontainers = "0.27"
tokio = { version = "1", features = ["full"] }
tokio-postgres = "0.7"
Expand Down
Loading