crudjt 1.0.0.pre.beta.0 → 1.0.0.pre.beta.1

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: 3b39e1babc7abf1c23c786365127925435747b9819cad1b8911f2f98629a97e5
4
- data.tar.gz: 2c092c94d52ac011696d889aa31415c9eb82118ad26d5ac688c46b1686e9e1ea
3
+ metadata.gz: 53225a9b4b8f73fdd347e17b8ee1c63a146629fc3168d4da0ff1f1025ae31e48
4
+ data.tar.gz: 12c993a56ccd2de647a5a2ea5de40e44da1788261ca387b44426dc0dec5001c7
5
5
  SHA512:
6
- metadata.gz: ee52b8fdec0f35f41b0353e11775e6e97504af1a4ac828f7c88310ac88b35f5f89bfd9e2d86773b63b14cc5317e4d2a8ce46b0ee872f135a0ef254a4df9daa5e
7
- data.tar.gz: 584c45b5df3b5920c2e40177dd336524196c66047b9e0416e216d66f1d19dbe3c4f5f9467ed951f4ada0fa6d31fd4699e691dd5475a5931957a194e472775061
6
+ metadata.gz: 8c9af5f6503ae801cceb6f957d56ca0be7a73d894e8c9c70f07c71ffb9523df4194778cecaa78e99b68277d0118d01d47374e22a76c4db4c5b8997881bb255c0
7
+ data.tar.gz: 8e277f2b24da368ab4867c07642b45b578d5ce9e402b8c77c63ff5373ef6cbdf02189aea2fef91dce73b58e9e7fc40a2769532de66f7bf06d13ef89a947d9272
@@ -33,7 +33,7 @@ jobs:
33
33
  bundle exec rake build
34
34
 
35
35
  - name: Install gem
36
- run: gem install pkg/crudjt-1.0.0-beta.0.gem --force
36
+ run: gem install pkg/crudjt-1.0.0.pre.beta.0.gem --force
37
37
 
38
38
  - name: Run autotest
39
39
  env:
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- crudjt (1.0.0.pre.beta.0)
4
+ crudjt (1.0.0.pre.beta.1)
5
5
  ffi (~> 1.17)
6
6
  grpc (~> 1.78.0)
7
7
  lru_redux (~> 1.1)
data/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  <p align="center">
2
2
  <picture>
3
- <source media="(prefers-color-scheme: dark)" srcset="logos/crudjt_logo_white_on_dark.svg">
4
- <source media="(prefers-color-scheme: light)" srcset="logos/crudjt_logo_dark_on_white.svg">
5
- <img alt="Shows a dark logo" src="logos/crudjt_logo_dark.png">
3
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/crudjt/crudjt/refs/heads/master/logos/crudjt_logo_white_on_dark.svg">
4
+ <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/crudjt/crudjt/refs/heads/master/logos/crudjt_logo_dark_on_white.svg">
5
+ <img alt="Shows a dark logo" src="https://raw.githubusercontent.com/crudjt/crudjt/refs/heads/master/logos/crudjt_logo_dark.png">
6
6
  </picture>
7
7
  </br>
8
8
  Ruby SDK for the fast, file-backed, scalable JSON token engine
@@ -10,7 +10,7 @@
10
10
 
11
11
  <p align="center">
12
12
  <a href="https://www.patreon.com/crudjt">
13
- <img src="logos/buy_me_a_coffee_orange.svg" alt="Buy Me a Coffee"/>
13
+ <img src="https://raw.githubusercontent.com/crudjt/crudjt/refs/heads/master/logos/buy_me_a_coffee_orange.svg" alt="Buy Me a Coffee"/>
14
14
  </a>
15
15
  </p>
16
16
 
@@ -25,11 +25,11 @@ Optimized for vertical scaling on a single server
25
25
 
26
26
  With Bundler:
27
27
  ```sh
28
- bundle add crudjt
28
+ bundle add crudjt --pre
29
29
  ```
30
30
  Or via RubyGems:
31
31
  ```sh
32
- gem install crudjt
32
+ gem install crudjt --pre
33
33
  ```
34
34
 
35
35
  ## How to use
@@ -46,6 +46,8 @@ Only **one process** can do this for a **single token storage**
46
46
  The master process manages sessions and coordination
47
47
  All functions can also be used directly from it
48
48
 
49
+ For containerized deployments, see: [Start CRUDJT master in Docker](#start-crudjt-master-in-docker)
50
+
49
51
  ### Generate a new secret key (terminal)
50
52
 
51
53
  ```sh
@@ -66,8 +68,34 @@ CRUDJT::Config.start_master(
66
68
 
67
69
  *Important: Use the same `secret_key` across all sessions. If the key changes, previously stored tokens cannot be decrypted and will return `nil` or `false`*
68
70
 
69
- ## Start CRUDJT master in Docker
70
- > `docker-compose.yml` will be published after 1.0.0-beta Docker image builds
71
+ ### Start CRUDJT master in Docker
72
+ Create a `docker-compose.yml` file:
73
+
74
+ ```yml
75
+ services:
76
+ crudjt-server:
77
+ image: crudjt/crudjt-server:beta
78
+ restart: unless-stopped
79
+
80
+ ports:
81
+ - "${CRUDJT_CLIENT_PORT:-50051}:50051"
82
+
83
+ volumes:
84
+ - "${STORE_JT:-./store_jt}:/app/store_jt"
85
+ - "${CRUDJT_SECRETS:-./crudjt_secrets}:/app/secrets"
86
+
87
+ environment:
88
+ CRUDJT_DOCKER_HOST: 0.0.0.0
89
+ CRUDJT_DOCKER_PORT: 50051
90
+ ```
91
+ Start the server:
92
+ ```bash
93
+ docker-compose up -d
94
+ ```
95
+ *Ensure the secrets directory contains your secret key file at `./crudjt_secrets/secret_key.txt`*
96
+
97
+ For configuration details and image versions, see the
98
+ [CRUDJT Server on Docker Hub](https://hub.docker.com/r/crudjt/crudjt-server)
71
99
 
72
100
  ## Connect to an existing CRUDJT master
73
101
 
@@ -158,12 +186,29 @@ result = CRUDJT.delete('HBmKFXoXgJ46mCqer1WXyQ')
158
186
  ```
159
187
 
160
188
  # Performance
161
- > Metrics will be published after 1.0.0-beta GitHub Actions builds
189
+ **40 000** requests up to **256 bytes** median over 10 runs
190
+ macOS 15.7.4, ARM64 (Apple M1)
191
+ Ruby 3.4.4
192
+ In-process benchmark; Redis accessed via localhost TCP
193
+
194
+ | Function | CRUDJT (Ruby) | JWT (Ruby) | redis-session-store (Ruby, Rails 8.0.2.1) |
195
+ |----------|-------|------|------|
196
+ | C | `0.279 second` <picture> <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/crudjt/crudjt/refs/heads/master/logos/crudjt_favicon_160x160_white_on_dark.svg" width=16 height=16> <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/crudjt/crudjt/refs/heads/master/logos/crudjt_favicon_160x160_dark_on_white.svg" width=16 height=16> <img alt="Shows a favicon black on white color" src="https://raw.githubusercontent.com/crudjt/crudjt/refs/heads/master/logos/crudjt_favicon_white_on_dark.png" width=16 height=16> </picture> | 0.644 second | 2.909 seconds |
197
+ | R | `0.134 second` <picture> <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/crudjt/crudjt/refs/heads/master/logos/crudjt_favicon_160x160_white_on_dark.svg" width=16 height=16> <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/crudjt/crudjt/refs/heads/master/logos/crudjt_favicon_160x160_dark_on_white.svg" width=16 height=16> <img alt="Shows a favicon black on white color" src="https://raw.githubusercontent.com/crudjt/crudjt/refs/heads/master/logos/crudjt_favicon_white_on_dark.png" width=16 height=16> </picture> | 0.972 second | 4.436 seconds |
198
+ | U | `0.410 second` <picture> <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/crudjt/crudjt/refs/heads/master/logos/crudjt_favicon_160x160_white_on_dark.svg" width=16 height=16> <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/crudjt/crudjt/refs/heads/master/logos/crudjt_favicon_160x160_dark_on_white.svg" width=16 height=16> <img alt="Shows a favicon black on white color" src="https://raw.githubusercontent.com/crudjt/crudjt/refs/heads/master/logos/crudjt_favicon_white_on_dark.png" width=16 height=16> </picture> | X | 2.124 seconds |
199
+ | D | `0.172 second` <picture> <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/crudjt/crudjt/refs/heads/master/logos/crudjt_favicon_160x160_white_on_dark.svg" width=16 height=16> <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/crudjt/crudjt/refs/heads/master/logos/crudjt_favicon_160x160_dark_on_white.svg" width=16 height=16> <img alt="Shows a favicon black on white color" src="https://raw.githubusercontent.com/crudjt/crudjt/refs/heads/master/logos/crudjt_favicon_white_on_dark.png" width=16 height=16> </picture> | X | 3.984 seconds |
200
+
201
+ [Full benchmark results](https://github.com/crudjt/benchmarks)
162
202
 
163
203
  # Storage (File-backed)
164
204
 
165
205
  ## Disk footprint
166
- > Metrics will be published after 1.0.0-beta GitHub Actions builds
206
+ **40 000** tokens of **256 bytes** each median over 10 creates
207
+ darwin23, APFS
208
+
209
+ `48 MB`
210
+
211
+ [Full disk footprint results](https://github.com/crudjt/disk_footprint)
167
212
 
168
213
  ## Path Lookup Order
169
214
  Stored tokens are placed in the **file system** according to the following order
@@ -194,9 +239,9 @@ The library has the following limits and requirements
194
239
  # Contact & Support
195
240
  <p align="center">
196
241
  <picture>
197
- <source media="(prefers-color-scheme: dark)" srcset="logos/crudjt_favicon_160x160_white_on_dark.svg" width=160 height=160>
198
- <source media="(prefers-color-scheme: light)" srcset="logos/crudjt_favicon_160x160_dark_on_white.svg" width=160 height=160>
199
- <img alt="Shows a dark favicon in light color mode and a white one in dark color mode" src="logos/crudjt_favicon_160x160_white.png" width=160 height=160>
242
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/crudjt/crudjt/refs/heads/master/logos/crudjt_favicon_160x160_white_on_dark.svg" width=160 height=160>
243
+ <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/crudjt/crudjt/refs/heads/master/logos/crudjt_favicon_160x160_dark_on_white.svg" width=160 height=160>
244
+ <img alt="Shows a dark favicon in light color mode and a white one in dark color mode" src="https://raw.githubusercontent.com/crudjt/crudjt/refs/heads/master/logos/crudjt_favicon_160x160_white.png" width=160 height=160>
200
245
  </picture>
201
246
  </p>
202
247
 
@@ -1,3 +1,3 @@
1
1
  module CRUDJT
2
- VERSION = "1.0.0-beta.0"
2
+ VERSION = "1.0.0-beta.1"
3
3
  end
data/lib/crudjt.rb CHANGED
@@ -26,7 +26,7 @@ def load_store_jt_library
26
26
  arch = case RbConfig::CONFIG['host_cpu']
27
27
  when /x86_64|x64/
28
28
  'x86_64'
29
- when /arm|arm64/
29
+ when /arm|arm64|aarch64/
30
30
  'arm64'
31
31
  else
32
32
  raise "Unsupported architecture: #{RbConfig::CONFIG['host_cpu']}"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: crudjt
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.pre.beta.0
4
+ version: 1.0.0.pre.beta.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vlad Akymov (v_akymov)