solid_objects 0.14.2 → 0.14.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +73 -0
- data/README.md +121 -522
- data/benchmark/state_size.rb +5 -0
- data/benchmark/support.rb +63 -0
- data/docs/adr/0006-at-least-once-delivery.md +1 -1
- data/docs/architecture.md +7 -6
- data/docs/authorization.md +4 -4
- data/docs/benchmarks.md +64 -3
- data/docs/correctness.md +2 -2
- data/docs/fit.md +24 -7
- data/docs/local-testing.md +3 -3
- data/docs/migrating-existing-state.md +1 -1
- data/docs/operations.md +32 -4
- data/docs/realtime.md +2 -2
- data/docs/reminders.md +6 -6
- data/docs/research/solid_queue.md +1 -1
- data/docs/roadmap.md +9 -1
- data/lib/solid_objects/configuration.rb +7 -0
- data/lib/solid_objects/executor.rb +44 -18
- data/lib/solid_objects/instrumentation.rb +33 -0
- data/lib/solid_objects/serialization.rb +26 -6
- data/lib/solid_objects/state.rb +5 -0
- data/lib/solid_objects/version.rb +1 -1
- data/sig/generated/lib/solid_objects/configuration.rbs +7 -3
- data/sig/generated/lib/solid_objects/executor.rbs +10 -4
- data/sig/generated/lib/solid_objects/instrumentation.rbs +11 -0
- data/sig/generated/lib/solid_objects/serialization.rbs +19 -0
- data/sig/generated/lib/solid_objects/state.rbs +3 -0
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 32207ee5017c24fa87258061048c532532bcf599d46357ce8da4deef8cb0c93e
|
|
4
|
+
data.tar.gz: d5594c50173f64f96303e91b0bc0b0659335d42b0d16b4df1e6f618ad98041fc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6578fe32fed59a2c8fc6f4209244de1d33793561af20b258d96c8bd7c5cd78e7203fa08ebaea4a2c8315c89980bf4033852d00c3f4cadad3a6986c766dea7dad
|
|
7
|
+
data.tar.gz: ec2db7a0481f6075ef9e1565a47f972bc41f6d464b65a7700139b4209636e079a254454007857ce7988fb1d01b745277a71a737d8f3e49f340e768106b511c38
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,78 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.14.4 - 2026-08-30
|
|
4
|
+
|
|
5
|
+
- Reuse the encoding the after image already built. `State#to_h` copies the
|
|
6
|
+
state by encoding it and parsing the result, then threw the encoded string
|
|
7
|
+
away, and `complete` normalized and encoded the same hash a second time to
|
|
8
|
+
measure it. `to_h_with_byte_size` returns the copy with the size of the
|
|
9
|
+
encoding that produced it, so a committed turn now traverses the state twice
|
|
10
|
+
rather than three times and encodes it twice rather than three times.
|
|
11
|
+
Measured on SQLite against 0.14.3, committed throughput rises 5.3% at 13 KB
|
|
12
|
+
of state, 16.1% at 116 KB, and 12.0% at 1 MB. `docs/benchmarks.md` holds the
|
|
13
|
+
numbers. `solid-objects-js` already measured the string it commits; this
|
|
14
|
+
brings the gem to the same shape.
|
|
15
|
+
- Add `Serialization.deep_copy_with_byte_size`, which returns a deep copy
|
|
16
|
+
beside the size of its encoded form. `deep_copy` now calls it, so both
|
|
17
|
+
encode once.
|
|
18
|
+
- Enforce `max_state_bytes` against the size the after image reports rather
|
|
19
|
+
than by encoding the state again. The turn still fails with
|
|
20
|
+
`PayloadTooLarge` before it opens its commit transaction, which a test now
|
|
21
|
+
covers end to end.
|
|
22
|
+
|
|
23
|
+
## 0.14.3 - 2026-08-29
|
|
24
|
+
|
|
25
|
+
- Cut one of the three full state copies a committed turn made. The executor
|
|
26
|
+
built the after image twice, once to answer whether the state changed and
|
|
27
|
+
once for the committed row, and a synchronous query built a third for the
|
|
28
|
+
mutation guard. One image now answers all three. Measured on SQLite,
|
|
29
|
+
committed throughput rises 4.8% at 13 KB of state, 3.1% at 116 KB, and 10.2%
|
|
30
|
+
at 1 MB. `benchmark/state_size.rb` is the scenario and `docs/benchmarks.md`
|
|
31
|
+
holds the numbers. The guard now compares the image taken after the
|
|
32
|
+
observables are read, so a query whose observable mutates state also fails
|
|
33
|
+
with `InvalidActor`.
|
|
34
|
+
- Stop building an encoded string that `Serialization.dump` discarded. The
|
|
35
|
+
method encoded every value to measure it, while most call sites pass no
|
|
36
|
+
`max_bytes`. It now encodes only when a limit applies. That encoding was also
|
|
37
|
+
the only check that a string held valid bytes, so `normalize` now checks the
|
|
38
|
+
encoding of every string and key it visits. A value it rejects raises
|
|
39
|
+
`InvalidPayload` at the call that staged it, as before, rather than a
|
|
40
|
+
`JSON::GeneratorError` from inside the commit transaction.
|
|
41
|
+
- Add `warn_state_bytes`, a soft threshold that defaults to 64 KB and must not
|
|
42
|
+
exceed `max_state_bytes`. A commit above it reports
|
|
43
|
+
`solid_objects.state.large` with the actor identity, the `byte_count`, and
|
|
44
|
+
the threshold. The event carries no application state, and it reports after
|
|
45
|
+
the commit. `max_state_bytes` keeps its 5 MB default, which measurement shows
|
|
46
|
+
is a limit rather than an operating point. The setting, the event, and its
|
|
47
|
+
payload match `warnStateBytes` in solid-objects-js, which defaults to 128 KB,
|
|
48
|
+
because the Node curve falls later than this one.
|
|
49
|
+
- Report a committed turn without letting a subscriber fail it. Every event
|
|
50
|
+
the executor emitted after its commit ran outside a rescue, so a subscriber
|
|
51
|
+
that raised turned a committed turn into a failed one: the runtime skipped
|
|
52
|
+
`message.completed`, tried to fail a message whose claim it had already
|
|
53
|
+
destroyed, and lost the worker pass. Those reports now go through
|
|
54
|
+
`instrument_after_commit`, which reports a raising subscriber as
|
|
55
|
+
`solid_objects.instrumentation.failed` and continues. This matches the
|
|
56
|
+
isolation `solid-objects-js` already applied to every event it emits.
|
|
57
|
+
|
|
58
|
+
- Align the use-case claims with solid-objects-js. "Is it worth installing
|
|
59
|
+
here?" listed long-lived workflows without a limit, while `docs/fit.md`
|
|
60
|
+
called a rate limiter an anti-pattern and the JS README sold per-key rate
|
|
61
|
+
limits. Both projects now say the same thing: a low-rate quota that a
|
|
62
|
+
reminder refills fits, because each check is one durable ordered message; a
|
|
63
|
+
limiter that every request touches does not; and a workflow fits when one
|
|
64
|
+
entity owns the mutable state and its mailbox holds the step order. A durable
|
|
65
|
+
execution engine that replays named steps from a step log remains a different
|
|
66
|
+
tool.
|
|
67
|
+
- Name Solid Objects Pro in `docs/fit.md` for the high-QPS cases the guide
|
|
68
|
+
rejects, and map its three capabilities onto them: grouped operations,
|
|
69
|
+
ephemeral operations, and reactive projections. The README already pointed
|
|
70
|
+
there; the fit guide stopped at "anti-pattern".
|
|
71
|
+
- Title the README "Solid Objects Ruby", matching "Solid Objects JS" in the
|
|
72
|
+
Node package, and give both the same two badges. The CI badge now pins
|
|
73
|
+
`?branch=main`, and a RubyGems version badge sits beside it. The gem name,
|
|
74
|
+
the module, and the published metadata do not change.
|
|
75
|
+
|
|
3
76
|
## 0.14.2 - 2026-08-25
|
|
4
77
|
|
|
5
78
|
- Rewrite the first screen around the objection a reader actually has. The
|