ratomic 0.4.0-x86_64-darwin → 0.4.1-x86_64-darwin

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 12215452724efab8d2f4ffa4d3db8e0f96d48386a53ffda0a6d432c30ef6e451
4
- data.tar.gz: d464217952e174043daa752d5c132847d4f5754ea1c27609c4ef78c9ac83669c
3
+ metadata.gz: 43b29ffe2514d33c566e176390dd5faa833a274e5d57f52cd573153badc69d77
4
+ data.tar.gz: 855796bfaba76f6f2ab09c89f45d7e4290710e000b31fa939835cb6b5167f63e
5
5
  SHA512:
6
- metadata.gz: 57e4e77864cab642f2690bbb9c49d0cb97ac6c0b3d929cb1408519fe5b73631875f79ae8cb1b111852f2605b2ff6f4ca64d6d2c2960bc6a70eab0513447b722c
7
- data.tar.gz: 98ac8e2fffb0b3db13460a15b1f404469397a753209738f0e93b88bf473167ce5a2a49f88b6df60d6c38f1442f8c8a9167cf793a50956fb0ce30ca81101bd693
6
+ metadata.gz: f3f11e53576f4e121749b042e3a29b06d1639eb97c50bf0bd4972653c1c63d225e85cf2e5bf7cc449114409316ab0e1ddb81e33f1047f5850e4e01a2ea0e33d8
7
+ data.tar.gz: 48f61a1c27a45c91d0c77d7f2181ca07c8bf0561f24ca4d09d7f21bba3b97d9e1f64bbf8a7fef7696c26f376cdd490c53bbb1b8de9f9e6bb428f41af2a0a4bbf
data/CHANGELOG.md CHANGED
@@ -1,5 +1,37 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## 0.4.1
4
+
5
+ ### Documentation
6
+
7
+ - Document the `LocalPool` factory contract.
8
+ - Clarify ownership-transfer versus resource-locality semantics.
9
+ - Add guidance for designing Ractor-shareable factory objects.
10
+ - Add examples of correct and incorrect factory implementations.
11
+ - Improve `LocalPool` API documentation and YARD comments.
12
+
13
+ ### Smoke Tests
14
+
15
+ - Add PostgreSQL smoke tests alongside Redis smoke tests.
16
+ - Consolidate smoke-test documentation.
17
+ - Add captured Redis and PostgreSQL validation snapshots.
18
+ - Document expected outcomes and interpretation of smoke-test runs.
19
+
20
+ ### Validation
21
+
22
+ Redis and PostgreSQL smoke tests now demonstrate:
23
+
24
+ - successful Thread and Ractor execution
25
+ - no `Ractor::MovedError`
26
+ - no `Ractor::IsolationError`
27
+ - successful queue draining
28
+ - preservation of live resource ownership
29
+ - safe reuse of Redis clients and PostgreSQL connections
30
+
31
+ These tests validate that `LocalPool` is a general-purpose
32
+ resource-locality primitive for stateful network clients rather
33
+ than a Redis-specific abstraction.
34
+
3
35
  ## [0.4.0] - 2026-06-10
4
36
 
5
37
  ### Added
@@ -10,6 +42,8 @@
10
42
  * Added RBS definitions for `LocalPool`.
11
43
  * Expanded API documentation and usage examples.
12
44
 
45
+
46
+
13
47
  ### Design
14
48
 
15
49
  `Ratomic::Pool` and `Ratomic::LocalPool` serve different ownership models:
data/README.md CHANGED
@@ -42,8 +42,8 @@ RBS signatures are included under `sig/` for downstream type checking.
42
42
 
43
43
  ## Examples And Benchmarks
44
44
 
45
- - [`redis_poc`](./redis_poc) contains local Redis scripts that exercise
46
- `Ratomic::Map`, `Ratomic::Counter`, and `Ratomic::LocalPool` under Thread and
45
+ - [`smoke_tests`](./smoke_tests) contains local Redis and PostgreSQL scripts that
46
+ exercise `Ratomic::LocalPool` with real stateful clients under Thread and
47
47
  Ractor workloads.
48
48
  - [`pgoutput-parser`](https://github.com/kanutocd/pgoutput-parser#relation-metadata-tracking)
49
49
  uses `Ratomic::Map` for relation metadata tracking in a real CDC pipeline
@@ -313,11 +313,12 @@ leave nested internal state unusable, producing errors such as
313
313
  `LocalPool` avoids that class of bug by not moving live resources at all. Work
314
314
  moves between Ractors. Live resources stay local.
315
315
 
316
- #### Redis smoke-test snapshot
316
+ #### Redis and PostgreSQL smoke-test snapshots
317
317
 
318
- The Redis POC includes two scripts under `redis_poc/`.
318
+ The smoke tests live under [`smoke_tests/`](./smoke_tests/) and exercise `LocalPool` with real
319
+ Redis clients and PostgreSQL connections.
319
320
 
320
- `basic_redis.rb` exercises repeated Redis operations from both Threads and
321
+ `redis/basic_redis.rb` exercises repeated Redis operations from both Threads and
321
322
  Ractors:
322
323
 
323
324
  ```text
@@ -328,7 +329,7 @@ Ractor
328
329
  [{"one" => 42419}, {"two" => 42186}, {"three" => 42400}, {"four" => 42206}, {"five" => 42568}]
329
330
  ```
330
331
 
331
- `queue_redis.rb` exercises a producer/consumer Redis queue workload:
332
+ `redis/queue_redis.rb` exercises a producer/consumer Redis queue workload:
332
333
 
333
334
  ```text
334
335
  [:start, Ractor, 2026-06-10 01:17:57.584727984 +0800]
@@ -338,15 +339,24 @@ Ractor
338
339
  [:end, 2026-06-10 01:18:02.226310862 +0800]
339
340
  ```
340
341
 
341
- These numbers are a smoke-test snapshot, not a formal benchmark claim. The
342
+ `postgres/basic_postgres.rb` exercises repeated PostgreSQL upserts from both
343
+ Threads and Ractors. `postgres/queue_postgres.rb` exercises a table-backed
344
+ producer/consumer workload using `FOR UPDATE SKIP LOCKED`.
345
+
346
+ These numbers are smoke-test snapshots, not formal benchmark claims. The
342
347
  important interpretation is:
343
348
 
344
349
  - no `Ractor::MovedError`
345
350
  - no `Ractor::IsolationError`
346
351
  - no process crash
347
352
  - all produced queue items were consumed
348
- - Redis queues drained to zero
349
- - live Redis clients remained owned by the Ractor that created them
353
+ - Redis queues and PostgreSQL table queues drained to zero
354
+ - live Redis clients and PostgreSQL connections remained owned by the Ractor
355
+ that created them
356
+
357
+ Redis proves the network-client shape. PostgreSQL proves the database-connection
358
+ shape. Together they demonstrate that `LocalPool` is not Redis-specific; it is a
359
+ resource-locality primitive for live stateful clients.
350
360
 
351
361
  #### Inception pool
352
362
 
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Ratomic
4
4
  # Current gem version string.
5
- VERSION = "0.4.0"
5
+ VERSION = "0.4.1"
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ratomic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: x86_64-darwin
6
6
  authors:
7
7
  - Mike Perham