docs: update architecture documentation and manifests
Refine technical documentation to reflect current architecture, component structure, and routing conventions for the vcon console.
This commit is contained in:
1 parent
bb938c33c0
commit
367dd819f8
64 files changed
+910
-2661
No files matched your search
@@ -18,6 +18,7 @@ interface BufferGlobalState {
|
||||
|
||||
type BufferGlobals = typeof globalThis & {
|
||||
__dataStackBufferState?: BufferGlobalState;
|
||||
__dataStackBufferShutdownRegistered?: boolean;
|
||||
};
|
||||
|
||||
const globals = globalThis as BufferGlobals;
|
||||
@@ -66,6 +67,19 @@ export class DataBufferEngine {
|
||||
void this.flush();
|
||||
}, state.batchFlushIntervalMs);
|
||||
}
|
||||
|
||||
if (
|
||||
typeof process !== 'undefined' &&
|
||||
typeof process.on === 'function' &&
|
||||
!globals.__dataStackBufferShutdownRegistered
|
||||
) {
|
||||
globals.__dataStackBufferShutdownRegistered = true;
|
||||
const flushOnExit = () => {
|
||||
void this.flush().catch(() => undefined);
|
||||
};
|
||||
process.on('SIGTERM', flushOnExit);
|
||||
process.on('SIGINT', flushOnExit);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,12 +1,9 @@
|
||||
# Data Management Manifest
|
||||
# Data Buffer Engine Manifest
|
||||
|
||||
## Purpose
|
||||
In-memory and Redis buffer engine for high-throughput batching of collected events.
|
||||
In-memory event batching engine (`core/data/buffer.ts`) that queues incoming events and flushes them in batches to partitioned CSV files on disk.
|
||||
|
||||
## Key Logic
|
||||
- Buffers events in memory to prevent per-event disk I/O.
|
||||
- Flushes batch to CSV Storage on threshold (500 items) or interval (2000ms).
|
||||
- Delivers live events to UI subscribers for real-time monitoring.
|
||||
|
||||
## Dependencies
|
||||
- `core/Storage/csvStorage`
|
||||
## Key Responsibilities
|
||||
- Queues validated events in memory to avoid per-event disk I/O overhead.
|
||||
- Automatically flushes queued batches to `CSVStorageManager.appendBatch()` when the queue reaches `batchFlushThreshold` (`500` events) or when the periodic flush timer (`batchFlushIntervalMs`, default `2000ms`) fires.
|
||||
- Supports dynamic timer rescheduling via `setFlushInterval(intervalMs)` when updated in `/vcon/settings`.
|
||||
Reference in new issue
Block a user