BlyxDocumentation
Browse chapters
Documentation / Workflow recipes

Fulmar · Commit offsets without skipping unfinished deliveries

Choose a contiguous commit offset from an out-of-order delivery trace.

Commit offsets without skipping unfinished deliveries

Committing the largest acknowledged offset can skip a message that is still in flight. Advance only through a contiguous prefix. Acknowledging offsets 4 and 6 advances the cursor only to 5. Offset 6 can remain acknowledged until 5 completes.

Run the framework with your own input

Install Blyx 0.2.1 and a Rust toolchain with a host linker, then run the versioned project. Each positional argument is a number or a comma-separated numerical vector. The CLI accepts up to 16 entries per vector. The imported module accepts longer inputs.

git clone --depth 1 --branch v0.1.0 https://github.com/Rahulchaube1/blyx-fulmar.git
cd blyx-fulmar
blyxc native-run project.blyx -- "4,6,5,6" "4,6" 4

API and return values

Returns [next commit, observed gaps, stale deliveries, per-trace high water]. Acknowledgements at or beyond start must refer to delivered offsets in this trace. Invalid input returns an empty vector.

ArgumentAccepted input
deliveredVector of: nonnegative exact integer
ackedVector of: nonnegative exact integer
startnonnegative exact integer

Use the libraries independently

The framework vendors the same library source published in these two repositories. Each module has its own package page, input contract and regression suite.

Try the program

Output Ready
Expected output
5
1
2
7
Open in the full playground →

Practice

Change delivered = [2, 3], acked = [3, 2], start = 2.0. Predict the result, then run the program.

Hint

Returns [next commit, observed gaps, stale deliveries, per-trace high water]. Acknowledgements at or beyond start must refer to delivered offsets in this trace.

Worked solution

The result vector is [4, 0, 0, 4]. Compare its fields with the return layout in the API section.

Find

    let delivered = [4, 6, 5, 6];

Replace with

    let delivered = [2, 3];

Find

    let acked = [4, 6];

Replace with

    let acked = [3, 2];

Find

    let start = 4.0;

Replace with

    let start = 2.0;

Output after the change

4
0
0
4