@spine-event-engine/delivery-server 2.0.0-snapshot.2
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.
- package/LICENSE +201 -0
- package/README.md +97 -0
- package/REFERENCE.md +69 -0
- package/dist/admin/admin-service.d.ts +47 -0
- package/dist/admin/admin-service.d.ts.map +1 -0
- package/dist/admin/admin-service.js +188 -0
- package/dist/admin/admin-service.js.map +1 -0
- package/dist/bin/spine-delivery-server.d.ts +3 -0
- package/dist/bin/spine-delivery-server.d.ts.map +1 -0
- package/dist/bin/spine-delivery-server.js +54 -0
- package/dist/bin/spine-delivery-server.js.map +1 -0
- package/dist/core/in-memory-delivery-core.d.ts +56 -0
- package/dist/core/in-memory-delivery-core.d.ts.map +1 -0
- package/dist/core/in-memory-delivery-core.js +44 -0
- package/dist/core/in-memory-delivery-core.js.map +1 -0
- package/dist/core/in-memory-delivery-state.d.ts +86 -0
- package/dist/core/in-memory-delivery-state.d.ts.map +1 -0
- package/dist/core/in-memory-delivery-state.js +214 -0
- package/dist/core/in-memory-delivery-state.js.map +1 -0
- package/dist/core/inbox-service.d.ts +20 -0
- package/dist/core/inbox-service.d.ts.map +1 -0
- package/dist/core/inbox-service.js +212 -0
- package/dist/core/inbox-service.js.map +1 -0
- package/dist/core/limits.d.ts +64 -0
- package/dist/core/limits.d.ts.map +1 -0
- package/dist/core/limits.js +73 -0
- package/dist/core/limits.js.map +1 -0
- package/dist/core/mutation-admission.d.ts +18 -0
- package/dist/core/mutation-admission.d.ts.map +1 -0
- package/dist/core/mutation-admission.js +78 -0
- package/dist/core/mutation-admission.js.map +1 -0
- package/dist/core/shard-service.d.ts +22 -0
- package/dist/core/shard-service.d.ts.map +1 -0
- package/dist/core/shard-service.js +189 -0
- package/dist/core/shard-service.js.map +1 -0
- package/dist/core/wire-values.d.ts +22 -0
- package/dist/core/wire-values.d.ts.map +1 -0
- package/dist/core/wire-values.js +66 -0
- package/dist/core/wire-values.js.map +1 -0
- package/dist/health/health-service.d.ts +9 -0
- package/dist/health/health-service.d.ts.map +1 -0
- package/dist/health/health-service.js +47 -0
- package/dist/health/health-service.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +16 -0
- package/dist/index.js.map +1 -0
- package/dist/server/assembly.d.ts +41 -0
- package/dist/server/assembly.d.ts.map +1 -0
- package/dist/server/assembly.js +49 -0
- package/dist/server/assembly.js.map +1 -0
- package/dist/server/config.d.ts +57 -0
- package/dist/server/config.d.ts.map +1 -0
- package/dist/server/config.js +52 -0
- package/dist/server/config.js.map +1 -0
- package/dist/server/delivery-server-log.d.ts +11 -0
- package/dist/server/delivery-server-log.d.ts.map +1 -0
- package/dist/server/delivery-server-log.js +44 -0
- package/dist/server/delivery-server-log.js.map +1 -0
- package/dist/server/delivery-server.d.ts +103 -0
- package/dist/server/delivery-server.d.ts.map +1 -0
- package/dist/server/delivery-server.js +201 -0
- package/dist/server/delivery-server.js.map +1 -0
- package/dist/server/shutdown.d.ts +36 -0
- package/dist/server/shutdown.d.ts.map +1 -0
- package/dist/server/shutdown.js +25 -0
- package/dist/server/shutdown.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +38 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# In-memory Spine Delivery server
|
|
2
|
+
|
|
3
|
+
This package provides the in-memory Delivery server. Use it to develop and test
|
|
4
|
+
the local delivery path, or as the deliberately ephemeral delivery component in
|
|
5
|
+
the supported examples. Its Inbox rows, leases, and delivered facts disappear
|
|
6
|
+
when the process stops.
|
|
7
|
+
|
|
8
|
+
The [reference](REFERENCE.md) records finite limits, shutdown order, and the
|
|
9
|
+
complete protocol contract, including API detail for coding agents.
|
|
10
|
+
|
|
11
|
+
## 💡 Why use it?
|
|
12
|
+
|
|
13
|
+
- ✅ Coordinates inbox work and shard ownership between trusted Node processes.
|
|
14
|
+
- ✅ Starts as a standalone command or embeds in another Node server.
|
|
15
|
+
- ✅ Bounds retained messages, retained bytes, and tracked shards.
|
|
16
|
+
- ✅ Provides administration and gRPC health endpoints for local operations.
|
|
17
|
+
|
|
18
|
+
## 🚀 Run a local server
|
|
19
|
+
|
|
20
|
+
Construct a server, start it, and close it during application shutdown. Port
|
|
21
|
+
zero asks the operating system for a free local port.
|
|
22
|
+
|
|
23
|
+
```ts
|
|
24
|
+
// docs-snippet-path: packages/delivery-server/src/server/delivery-server.ts
|
|
25
|
+
import { DeliveryServer } from "@spine-event-engine/delivery-server";
|
|
26
|
+
|
|
27
|
+
const server = new DeliveryServer({ host: "127.0.0.1", port: 0 });
|
|
28
|
+
await server.start();
|
|
29
|
+
const url = server.baseUrl;
|
|
30
|
+
await server.close();
|
|
31
|
+
void url;
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
The `spine-delivery-server` executable runs the same server. It reads
|
|
35
|
+
configuration once at startup from explicit options, then environment variables,
|
|
36
|
+
then defaults.
|
|
37
|
+
|
|
38
|
+
| Setting | Environment variable | Default |
|
|
39
|
+
| ----------------- | -------------------------- | ----------- |
|
|
40
|
+
| Listener host | `HOST` | `127.0.0.1` |
|
|
41
|
+
| Listener port | `PORT` | `8484` |
|
|
42
|
+
| Inbound size | `MAX_INBOUND_MESSAGE_SIZE` | 4 MiB |
|
|
43
|
+
| Pickup timeout | `SHARD_PROCESSING_TIMEOUT` | disabled |
|
|
44
|
+
| Retained messages | `MAX_RETAINED_MESSAGES` | 10,000 |
|
|
45
|
+
| Retained bytes | `MAX_RETAINED_BYTES` | 32 MiB |
|
|
46
|
+
| Tracked shards | `MAX_TRACKED_SHARDS` | 1,000 |
|
|
47
|
+
|
|
48
|
+
## 🧩 Embed the handlers
|
|
49
|
+
|
|
50
|
+
Use `InMemoryDelivery.create()` when an application provides the Connect router and
|
|
51
|
+
listener itself. `DeliveryCore.inbox` and `.shards` are the public Connect
|
|
52
|
+
handler implementations; register both before creating the transport. The
|
|
53
|
+
application still manages the network listener and its lifecycle.
|
|
54
|
+
|
|
55
|
+
An embedded consumer must declare and install direct dependencies on
|
|
56
|
+
`@spine-event-engine/delivery-server`, `@connectrpc/connect`, and
|
|
57
|
+
`@spine-event-engine/proto`. The service descriptors in this example are
|
|
58
|
+
exported from `@spine-event-engine/proto/delivery-server`; do not rely on the
|
|
59
|
+
delivery server's transitive dependencies.
|
|
60
|
+
|
|
61
|
+
```ts
|
|
62
|
+
// docs-snippet-path: packages/delivery-server/src/core/in-memory-delivery-core.ts
|
|
63
|
+
import { createRouterTransport } from "@connectrpc/connect";
|
|
64
|
+
import { InMemoryDelivery } from "@spine-event-engine/delivery-server";
|
|
65
|
+
import { InboxService, ShardService } from "@spine-event-engine/proto/delivery-server";
|
|
66
|
+
|
|
67
|
+
const delivery = InMemoryDelivery.create({
|
|
68
|
+
processingTimeoutMs: 30_000,
|
|
69
|
+
maxRetainedMessages: 10_000,
|
|
70
|
+
maxRetainedBytes: 32 * 1024 * 1024,
|
|
71
|
+
maxTrackedShards: 1_000,
|
|
72
|
+
});
|
|
73
|
+
const transport = createRouterTransport((router) => {
|
|
74
|
+
router.service(InboxService, delivery.inbox);
|
|
75
|
+
router.service(ShardService, delivery.shards);
|
|
76
|
+
});
|
|
77
|
+
void transport;
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
The standalone listener exposes Inbox, Shard, Admin, and gRPC health services.
|
|
81
|
+
It binds only to the loopback address by default. An explicit non-loopback host
|
|
82
|
+
is a caller-selected trusted-network deployment and should not be exposed
|
|
83
|
+
directly to the public Internet.
|
|
84
|
+
|
|
85
|
+
## ⚠️ In-memory means temporary
|
|
86
|
+
|
|
87
|
+
State disappears when the process stops. The server has no durable mode, TLS,
|
|
88
|
+
authentication, authorization, configuration reload, health watch stream, or
|
|
89
|
+
administration UI. A pending row is not an attempt-history or quarantine
|
|
90
|
+
record. Its default loopback listener is for development; a wider listener
|
|
91
|
+
belongs only on an application-managed trusted network.
|
|
92
|
+
|
|
93
|
+
## 🔗 Learn more
|
|
94
|
+
|
|
95
|
+
- [Delivery client](../delivery-client/README.md)
|
|
96
|
+
- [Server](../server/README.md)
|
|
97
|
+
- [Detailed delivery reference](REFERENCE.md)
|
package/REFERENCE.md
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# @spine-event-engine/delivery-server reference
|
|
2
|
+
|
|
3
|
+
This reference describes the public in-memory Delivery server API. Read the
|
|
4
|
+
[package guide](README.md) first for the shortest local setup.
|
|
5
|
+
|
|
6
|
+
## Public entry points
|
|
7
|
+
|
|
8
|
+
`InMemoryDelivery.create(options)` returns `DeliveryCore` with Connect handler
|
|
9
|
+
implementations `inbox` and `shards`. It does not open a listener or install
|
|
10
|
+
Admin/health handlers. The caller registers these handlers and provides the
|
|
11
|
+
network lifecycle.
|
|
12
|
+
|
|
13
|
+
`DeliveryServer` is the standalone lifecycle owner. Its constructor validates
|
|
14
|
+
and resolves configuration exactly once. `start()` is idempotent and concurrent
|
|
15
|
+
calls share one promise. `baseUrl` is available only after successful startup.
|
|
16
|
+
`close()` is idempotent, terminal, and shares one promise; it stops service,
|
|
17
|
+
rejects unadmitted work, completes Admin streams, and closes listener sessions.
|
|
18
|
+
Neither a failed start nor a closed instance can be restarted.
|
|
19
|
+
|
|
20
|
+
The CLI `spine-delivery-server` starts that same server and closes it once on
|
|
21
|
+
`SIGINT` or `SIGTERM`. Embedded callers handle signals and call `close()`.
|
|
22
|
+
|
|
23
|
+
## Configuration and limits
|
|
24
|
+
|
|
25
|
+
Explicit `DeliveryServerOptions` override the associated environment variables,
|
|
26
|
+
which override defaults. Invalid values throw before a listener is created:
|
|
27
|
+
|
|
28
|
+
- `host` / `HOST`: non-blank text; default `127.0.0.1`;
|
|
29
|
+
- `port` / `PORT`: integer 0–65535; default 8484;
|
|
30
|
+
- `maxInboundMessageBytes` / `MAX_INBOUND_MESSAGE_SIZE`: integer 1–2147483647;
|
|
31
|
+
default 4194304;
|
|
32
|
+
- `processingTimeoutSeconds` / `SHARD_PROCESSING_TIMEOUT`: integer
|
|
33
|
+
0–2147483647; default 0, which disables automatic takeover;
|
|
34
|
+
- retained message/byte limits: integer 1–2147483647; defaults 10000 and
|
|
35
|
+
33554432;
|
|
36
|
+
- tracked shards: integer 1–1000; default 1000.
|
|
37
|
+
|
|
38
|
+
The core accepts pages of 1–1000 messages, mutation batches of 1–100 messages,
|
|
39
|
+
payloads no larger than 1 MiB, and request/response bodies no larger than 4
|
|
40
|
+
MiB. Capacity is finite: an operation that would exceed retained messages,
|
|
41
|
+
bytes, or shards fails atomically with `RESOURCE_EXHAUSTED`; it is not partially
|
|
42
|
+
accepted or silently shortened.
|
|
43
|
+
|
|
44
|
+
## Delivery semantics
|
|
45
|
+
|
|
46
|
+
Mutations pass a FIFO admission boundary with 100 waiting slots. Aborting before
|
|
47
|
+
admission commits nothing. Admission is the linearization point: once admitted,
|
|
48
|
+
the synchronous mutation can commit even if the caller aborts or loses its
|
|
49
|
+
response.
|
|
50
|
+
|
|
51
|
+
Inbox pages are strict after the supplied timestamp and ordered by full wire
|
|
52
|
+
timestamp, version, and UUID. Automatic pickup takeover requires elapsed time
|
|
53
|
+
strictly greater than `processingTimeoutMs`; manual expiration accepts elapsed
|
|
54
|
+
time greater than or equal to the supplied interval. Release is not
|
|
55
|
+
pickup-time-conditional, but the supplied worker must match the current owner;
|
|
56
|
+
a stale worker cannot release a newer worker's session. This in-memory server
|
|
57
|
+
stores neither attempt history nor a quarantine state.
|
|
58
|
+
|
|
59
|
+
Admin observation acknowledges first and then streams updates through a bounded
|
|
60
|
+
queue. Health `Check` reports registered names while the listener serves;
|
|
61
|
+
unknown names are `NOT_SERVING`. Health `Watch` is not implemented.
|
|
62
|
+
|
|
63
|
+
## Security and topology limits
|
|
64
|
+
|
|
65
|
+
All state is process-local and lost at restart. The server provides no durable
|
|
66
|
+
recovery, cluster coordination, Redis/Hazelcast mode, TLS, authentication,
|
|
67
|
+
authorization, public-Internet hardening, CLI flags, or configuration reload.
|
|
68
|
+
An application may choose a non-loopback bind or a proxy, but those deployment
|
|
69
|
+
controls remain its responsibility.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { type ServiceImpl } from "@connectrpc/connect";
|
|
2
|
+
import { AdminService } from "@spine-event-engine/proto/delivery-server";
|
|
3
|
+
import type { ShardIndex } from "@spine-event-engine/proto/delivery";
|
|
4
|
+
import type { InMemoryDeliveryState } from "../core/in-memory-delivery-state.js";
|
|
5
|
+
/**
|
|
6
|
+
* Represents administrative observation publishing resources.
|
|
7
|
+
*/
|
|
8
|
+
export interface AdminPublisherHandle {
|
|
9
|
+
/**
|
|
10
|
+
* Serves administrative delivery RPCs.
|
|
11
|
+
*/
|
|
12
|
+
readonly service: ServiceImpl<typeof AdminService>;
|
|
13
|
+
/**
|
|
14
|
+
* Reports active update subscribers.
|
|
15
|
+
*/
|
|
16
|
+
readonly subscriberCount: number;
|
|
17
|
+
/**
|
|
18
|
+
* Publishes a shard observation update.
|
|
19
|
+
*
|
|
20
|
+
* @param shard Identifies the changed shard.
|
|
21
|
+
*/
|
|
22
|
+
publish(shard: ShardIndex): void;
|
|
23
|
+
/**
|
|
24
|
+
* Records an Inbox message-count transition.
|
|
25
|
+
*
|
|
26
|
+
* @param shard Identifies the changed shard.
|
|
27
|
+
* @param delta Supplies the inserted or removed count.
|
|
28
|
+
*/
|
|
29
|
+
recordMessageTransition(shard: ShardIndex, delta: 1 | -1): void;
|
|
30
|
+
/**
|
|
31
|
+
* Closes all active administrative subscriptions.
|
|
32
|
+
*/
|
|
33
|
+
close(): void;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Publishes administrative shard observations.
|
|
37
|
+
*/
|
|
38
|
+
export declare const AdminPublisher: Readonly<{
|
|
39
|
+
/**
|
|
40
|
+
* Creates an administrative publisher.
|
|
41
|
+
*
|
|
42
|
+
* @param state Supplies shared delivery state.
|
|
43
|
+
* @returns Provides the publisher handle.
|
|
44
|
+
*/
|
|
45
|
+
create: (state: InMemoryDeliveryState) => AdminPublisherHandle;
|
|
46
|
+
}>;
|
|
47
|
+
//# sourceMappingURL=admin-service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin-service.d.ts","sourceRoot":"","sources":["../../src/admin/admin-service.ts"],"names":[],"mappings":"AAeA,OAAO,EAAsB,KAAK,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAC3E,OAAO,EACL,YAAY,EAOb,MAAM,2CAA2C,CAAC;AACnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAErE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAIjF;;GAEG;AACH,MAAM,WAAW,oBAAoB;IAGnC;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC,OAAO,YAAY,CAAC,CAAC;IAEnD;;OAEG;IACH,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IAEjC;;;;OAIG;IACH,OAAO,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,CAAC;IAEjC;;;;;OAKG;IACH,uBAAuB,CAAC,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC;IAEhE;;OAEG;IACH,KAAK,IAAI,IAAI,CAAC;CACf;AAED;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC;IAGpC;;;;;OAKG;IACH,MAAM,EAAE,CAAC,KAAK,EAAE,qBAAqB,KAAK,oBAAoB,CAAC;CAChE,CAkEC,CAAC"}
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2026, CodeMatters. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
|
|
5
|
+
* in compliance with the License. You may obtain a copy of the License at
|
|
6
|
+
*
|
|
7
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
*
|
|
9
|
+
* Unless required by applicable law or agreed to in writing, software distributed under the License
|
|
10
|
+
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
|
|
11
|
+
* or implied. See the License for the specific language governing permissions and limitations under
|
|
12
|
+
* the License.
|
|
13
|
+
*/
|
|
14
|
+
import { create } from "@bufbuild/protobuf";
|
|
15
|
+
import { Code, ConnectError } from "@connectrpc/connect";
|
|
16
|
+
import { AdminService, ShardInfoListSchema, ShardInfoSchema, ShardInfoUpdateSchema, ShardStatus, SubscriptionResponseSchema, } from "@spine-event-engine/proto/delivery-server";
|
|
17
|
+
import { MAX_DELIVERY_RESPONSE_SHARDS } from "../core/limits.js";
|
|
18
|
+
import { DeliveryShards } from "../core/wire-values.js";
|
|
19
|
+
/**
|
|
20
|
+
* Publishes administrative shard observations.
|
|
21
|
+
*/
|
|
22
|
+
export const AdminPublisher = Object.freeze({
|
|
23
|
+
create: (state) => {
|
|
24
|
+
const subscribers = new Set();
|
|
25
|
+
const messageCounts = new Map();
|
|
26
|
+
const update = (shard) => create(SubscriptionResponseSchema, {
|
|
27
|
+
value: {
|
|
28
|
+
case: "update",
|
|
29
|
+
value: create(ShardInfoUpdateSchema, AdminSnapshots.observation(state, messageCounts, shard)),
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
return {
|
|
33
|
+
get subscriberCount() {
|
|
34
|
+
return subscribers.size;
|
|
35
|
+
},
|
|
36
|
+
service: {
|
|
37
|
+
getShardInfo: () => AdminSnapshots.snapshot(state, messageCounts),
|
|
38
|
+
async *subscribeToShardUpdates(_request, context) {
|
|
39
|
+
const subscriber = new Subscriber(() => {
|
|
40
|
+
subscribers.delete(subscriber);
|
|
41
|
+
});
|
|
42
|
+
const onAbort = () => {
|
|
43
|
+
subscriber.cancel();
|
|
44
|
+
};
|
|
45
|
+
context.signal.addEventListener("abort", onAbort, { once: true });
|
|
46
|
+
try {
|
|
47
|
+
yield create(SubscriptionResponseSchema, { value: { case: "created", value: true } });
|
|
48
|
+
if (context.signal.aborted)
|
|
49
|
+
return;
|
|
50
|
+
subscribers.add(subscriber);
|
|
51
|
+
for (;;) {
|
|
52
|
+
const next = await subscriber.next();
|
|
53
|
+
if (next === undefined)
|
|
54
|
+
return;
|
|
55
|
+
yield next;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
finally {
|
|
59
|
+
context.signal.removeEventListener("abort", onAbort);
|
|
60
|
+
subscribers.delete(subscriber);
|
|
61
|
+
subscriber.close();
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
publish(shard) {
|
|
66
|
+
const frame = update(shard);
|
|
67
|
+
for (const subscriber of subscribers)
|
|
68
|
+
subscriber.push(frame);
|
|
69
|
+
},
|
|
70
|
+
recordMessageTransition(shard, delta) {
|
|
71
|
+
const key = DeliveryShards.key(shard);
|
|
72
|
+
const current = messageCounts.get(key);
|
|
73
|
+
const count = (current?.count ?? 0) + delta;
|
|
74
|
+
if (count < 0)
|
|
75
|
+
throw new TypeError("Delivery shard message count is invalid.");
|
|
76
|
+
if (count === 0)
|
|
77
|
+
messageCounts.delete(key);
|
|
78
|
+
else if (current === undefined)
|
|
79
|
+
messageCounts.set(key, { shard: DeliveryShards.copy(shard), count });
|
|
80
|
+
else
|
|
81
|
+
current.count = count;
|
|
82
|
+
const frame = update(shard);
|
|
83
|
+
for (const subscriber of subscribers)
|
|
84
|
+
subscriber.push(frame);
|
|
85
|
+
},
|
|
86
|
+
close() {
|
|
87
|
+
for (const subscriber of subscribers)
|
|
88
|
+
subscriber.close();
|
|
89
|
+
subscribers.clear();
|
|
90
|
+
},
|
|
91
|
+
};
|
|
92
|
+
},
|
|
93
|
+
});
|
|
94
|
+
/**
|
|
95
|
+
* Produces administrative shard observation snapshots.
|
|
96
|
+
*/
|
|
97
|
+
const AdminSnapshots = Object.freeze({
|
|
98
|
+
snapshot: (state, messageCounts) => create(ShardInfoListSchema, {
|
|
99
|
+
shards: [...AdminSnapshots.shards(state, messageCounts)]
|
|
100
|
+
.slice(0, MAX_DELIVERY_RESPONSE_SHARDS)
|
|
101
|
+
.map((shard) => create(ShardInfoSchema, AdminSnapshots.observation(state, messageCounts, shard))),
|
|
102
|
+
}),
|
|
103
|
+
observation: (state, messageCounts, shard) => {
|
|
104
|
+
const key = DeliveryShards.key(shard);
|
|
105
|
+
const record = state.shards.get(key);
|
|
106
|
+
const messages = messageCounts.get(key)?.count ?? 0;
|
|
107
|
+
return {
|
|
108
|
+
index: shard,
|
|
109
|
+
status: record?.worker === undefined ? ShardStatus.NOT_PICKED : ShardStatus.PICKED,
|
|
110
|
+
...(record?.whenLastPicked === undefined
|
|
111
|
+
? {}
|
|
112
|
+
: {
|
|
113
|
+
lastPicked: AdminSnapshots.timestamp(record.whenLastPicked),
|
|
114
|
+
whenLastPicked: AdminSnapshots.timestamp(record.whenLastPicked),
|
|
115
|
+
}),
|
|
116
|
+
messages,
|
|
117
|
+
newStatus: record?.worker === undefined ? ShardStatus.NOT_PICKED : ShardStatus.PICKED,
|
|
118
|
+
newMessagesCount: messages,
|
|
119
|
+
};
|
|
120
|
+
},
|
|
121
|
+
shards: function* (state, messageCounts) {
|
|
122
|
+
const all = new Map();
|
|
123
|
+
for (const [key, record] of state.shards)
|
|
124
|
+
all.set(key, record.shard);
|
|
125
|
+
for (const [key, record] of messageCounts)
|
|
126
|
+
all.set(key, record.shard);
|
|
127
|
+
yield* [...all.values()].sort((left, right) => left.ofTotal - right.ofTotal || left.index - right.index);
|
|
128
|
+
},
|
|
129
|
+
timestamp: (milliseconds) => {
|
|
130
|
+
const seconds = Math.floor(milliseconds / 1_000);
|
|
131
|
+
return { seconds: BigInt(seconds), nanos: (milliseconds - seconds * 1_000) * 1_000_000 };
|
|
132
|
+
},
|
|
133
|
+
});
|
|
134
|
+
class Subscriber {
|
|
135
|
+
#frames = [];
|
|
136
|
+
#waiter;
|
|
137
|
+
#error;
|
|
138
|
+
#closed = false;
|
|
139
|
+
#onClose;
|
|
140
|
+
constructor(onClose) {
|
|
141
|
+
this.#onClose = onClose;
|
|
142
|
+
}
|
|
143
|
+
push(frame) {
|
|
144
|
+
if (this.#closed)
|
|
145
|
+
return;
|
|
146
|
+
if (this.#waiter !== undefined) {
|
|
147
|
+
const waiter = this.#waiter;
|
|
148
|
+
this.#waiter = undefined;
|
|
149
|
+
waiter.resolve(frame);
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
if (this.#frames.length === 100) {
|
|
153
|
+
this.#terminate(new ConnectError("Delivery shard update buffer is full.", Code.ResourceExhausted));
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
this.#frames.push(frame);
|
|
157
|
+
}
|
|
158
|
+
next() {
|
|
159
|
+
if (this.#error !== undefined)
|
|
160
|
+
return Promise.reject(this.#error);
|
|
161
|
+
const frame = this.#frames.shift();
|
|
162
|
+
if (frame !== undefined)
|
|
163
|
+
return Promise.resolve(frame);
|
|
164
|
+
return new Promise((resolve, reject) => {
|
|
165
|
+
this.#waiter = { resolve, reject };
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
close() {
|
|
169
|
+
this.#terminate(undefined);
|
|
170
|
+
}
|
|
171
|
+
cancel() {
|
|
172
|
+
this.#terminate(new ConnectError("Delivery shard update subscription canceled.", Code.Canceled));
|
|
173
|
+
}
|
|
174
|
+
#terminate(error) {
|
|
175
|
+
if (this.#closed)
|
|
176
|
+
return;
|
|
177
|
+
this.#closed = true;
|
|
178
|
+
this.#frames = [];
|
|
179
|
+
this.#error = error;
|
|
180
|
+
if (error === undefined)
|
|
181
|
+
this.#waiter?.resolve(undefined);
|
|
182
|
+
else
|
|
183
|
+
this.#waiter?.reject(error);
|
|
184
|
+
this.#waiter = undefined;
|
|
185
|
+
this.#onClose();
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
//# sourceMappingURL=admin-service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin-service.js","sourceRoot":"","sources":["../../src/admin/admin-service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,YAAY,EAAoB,MAAM,qBAAqB,CAAC;AAC3E,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,eAAe,EACf,qBAAqB,EACrB,WAAW,EACX,0BAA0B,GAE3B,MAAM,2CAA2C,CAAC;AAInD,OAAO,EAAE,4BAA4B,EAAE,MAAM,mBAAmB,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAuCxD;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAUtB,MAAM,CAAC,MAAM,CAAC;IACjB,MAAM,EAAE,CAAC,KAA4B,EAAwB,EAAE;QAC7D,MAAM,WAAW,GAAG,IAAI,GAAG,EAAc,CAAC;QAC1C,MAAM,aAAa,GAAG,IAAI,GAAG,EAAyD,CAAC;QACvF,MAAM,MAAM,GAAG,CAAC,KAAiB,EAAwB,EAAE,CACzD,MAAM,CAAC,0BAA0B,EAAE;YACjC,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,MAAM,CACX,qBAAqB,EACrB,cAAc,CAAC,WAAW,CAAC,KAAK,EAAE,aAAa,EAAE,KAAK,CAAC,CACxD;aACF;SACF,CAAC,CAAC;QACL,OAAO;YACL,IAAI,eAAe;gBACjB,OAAO,WAAW,CAAC,IA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