Rebuild: coordinator (planner, NNTP pool, spool, prefetcher, leases, rule sets), node API and the edge:node worker
- groups:add / ranges:plan / nodes:create / coordinator:run commands - the node API: lease, the range's chunks as one framed stream from the spool, batches, heartbeat, finish, release (node guard, token per node) - edge:node: needs COORDINATOR_URL and NODE_TOKEN only (placeholders for the rest), posts a batch every 10 chunks, gives its range back on SIGTERM - releases are gathered per batch: 1.04 chunk rows per release at 10 chunks per batch (1.35 when built per XOVER chunk) - partitions are checked per batch instead of remembered Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
20910647fa
commit
d5f168d8d2
36 files changed
+1193
-14
No files matched your search
@@ -42,4 +42,15 @@ export default await Env.create(new URL('../', import.meta.url), {
|
||||
NNTP_USER: Env.schema.string.optional(),
|
||||
NNTP_PASSWORD: Env.schema.string.optional(),
|
||||
NNTP_SECURE: Env.schema.boolean.optional(),
|
||||
NNTP_CONNECTIONS: Env.schema.number.optional(),
|
||||
NNTP_TIMEOUT_MS: Env.schema.number.optional(),
|
||||
|
||||
// Coordinator
|
||||
RANGE_ARTICLES: Env.schema.number.optional(),
|
||||
CHUNK_ARTICLES: Env.schema.number.optional(),
|
||||
LEASE_TTL_SECONDS: Env.schema.number.optional(),
|
||||
SPOOL_DIR: Env.schema.string.optional(),
|
||||
SPOOL_AHEAD_PER_LEASE: Env.schema.number.optional(),
|
||||
SPOOL_MIN_AHEAD: Env.schema.number.optional(),
|
||||
SPOOL_MAX_GB: Env.schema.number.optional(),
|
||||
})
|
||||
@@ -33,5 +33,19 @@ router
|
||||
.prefix('account')
|
||||
.as('profile')
|
||||
.use(middleware.auth())
|
||||
|
||||
// Edge workers (REBUILD.md, parts 1–2).
|
||||
router
|
||||
.group(() => {
|
||||
router.post('lease', [controllers.Node, 'lease'])
|
||||
router.get('ranges/:id/stream', [controllers.Node, 'stream'])
|
||||
router.post('ranges/:id/batches', [controllers.Node, 'batch'])
|
||||
router.post('ranges/:id/heartbeat', [controllers.Node, 'heartbeat'])
|
||||
router.post('ranges/:id/finish', [controllers.Node, 'finish'])
|
||||
router.post('ranges/:id/release', [controllers.Node, 'release'])
|
||||
})
|
||||
.prefix('node')
|
||||
.as('node')
|
||||
.use(middleware.auth({ guards: ['node'] }))
|
||||
})
|
||||
.prefix('/api/v1')
|
||||
Reference in new issue
Block a user