reaction/rust
ppom 9cc702e9c7 Replace postcard by bincode
- The interface is easier
- This permits me to have unbounded buffers.

I did some benchmarking on both options.
I can't see any difference in terms of
- CPU performance,
- memory usage, and
- stockage size.

I used this file: `datasize.jsonnet`
```jsonnet
{
  patterns: {
    num: {
      regex: @'([0-9]+)',
    },
  },
  streams: {
    s1: {
      cmd: ['seq', '-w', '499999'],
      filters: {
        f1: {
          regex: [
            '^<num>$',
          ],
          retry: 10,
          retryperiod: '1m',
          actions: {
            a: {
              cmd: ['true'],
            },
            b: {
              cmd: ['true'],
              after: '1m',
            },
          },
        },
      },
    },
  },
}
```
And this commands:

```
rm reaction-*
sudo systemd-run --wait -p User=ao -p MemoryAccounting=yes -p WorkingDirectory=(pwd) -p Environment=PATH=/run/current-system/sw/bin/ time ./target/release/reaction start -c datasize.jsonnet && ls -l reaction-matches.db
sudo systemd-run --wait -p User=ao -p MemoryAccounting=yes -p WorkingDirectory=(pwd) -p Environment=PATH=/run/current-system/sw/bin/ time ./target/release/reaction start -c datasize.jsonnet && ls -l reaction-matches.db
sudo systemd-run --wait -p User=ao -p MemoryAccounting=yes -p WorkingDirectory=(pwd) -p Environment=PATH=/run/current-system/sw/bin/ time ./target/release/reaction start -c datasize.jsonnet && ls -l reaction-matches.db
```
At the first invocation, reaction reads no DB.
At the second invocation, reaction reads a DB.
At the third invocation, reaction reads a double-sized DB.
2024-10-24 12:00:00 +02:00
..
src Replace postcard by bincode 2024-10-24 12:00:00 +02:00
.gitignore initial rust commit 2024-10-24 12:00:00 +02:00
Cargo.lock Replace postcard by bincode 2024-10-24 12:00:00 +02:00
Cargo.toml Replace postcard by bincode 2024-10-24 12:00:00 +02:00
datasize.jsonnet Replace postcard by bincode 2024-10-24 12:00:00 +02:00
example.json WIP configuration setup 2024-10-24 12:00:00 +02:00
heavy-load.yml fix database deserializing and use BufWriter 2024-10-24 12:00:00 +02:00
test.jsonnet Optimization by changing ownership model 2024-10-24 12:00:00 +02:00