- Standardize Python SDK (`datastack`) documentation with a new multi-file suite. - Update `datastack-sdk` to serve as a backward-compatible shim for the canonical `datastack` package. - Update project manifest and memory map to reflect current SDK structure and v2.2.0 features.
2.3 KiB
2.3 KiB
Data Simulator (/vcon/simulator)
The DataStack Data Simulator (/vcon/simulator) enables operators and developers to validate ingestion pipelines, test rate limits, and inspect buffer flushes directly from the browser without setting up external producer scripts.
1. Overview & Capabilities
The Simulator allows you to:
- Test ingestion using either HTTP REST (
POST /api/events) or Socket.IO WebSocket (sync_data). - Select any active client from your registered client list, or simulate unauthenticated/custom payloads.
- Dispatch single events or high-volume bursts (from 10 to 500 events).
- Select from realistic schema presets or construct custom JSON objects.
- Observe response status, payload transmission size, and round-trip latency in real time.
2. Telemetry Presets
The simulator includes four industry-standard telemetry presets:
1. IoT Temperature Sensor
{
"sensorId": "temp-north-01",
"temperature": 23.4,
"humidity": 45.2,
"battery": 98,
"unit": "celsius"
}
2. E-Commerce Order Checkout
{
"orderId": "ord_9872134",
"customerId": "cust_11029",
"currency": "USD",
"totalAmount": 149.50,
"itemCount": 3,
"paymentMethod": "credit_card"
}
3. Server System Resource Metrics
{
"host": "prod-api-worker-03",
"cpuUsagePercent": 34.2,
"memoryUsedMb": 1024,
"memoryTotalMb": 4096,
"loadAverage": [0.45, 0.62, 0.58]
}
4. User Audit Trail & Security Event
{
"actorId": "usr_9912",
"action": "client_token_rotated",
"ipAddress": "192.168.1.100",
"userAgent": "Mozilla/5.0",
"success": true
}
3. Simulator Workflows
Testing Single Event Ingestion
- Select your target Client from the dropdown.
- Select Single Event mode.
- Choose a preset or customize the JSON editor.
- Click Send Event.
- The output console displays the assigned
eventId, server response code (200 OK), and processing time.
Testing High-Throughput Batch Flushing
- Select Batch Dispatch mode.
- Set the burst count (e.g.,
500events). - Click Start Batch.
- Observe the batch progress bar.
- Navigate to
/vcon/dashboardto verify that the buffer threshold flush automatically triggered, writing the batch to the client's daily CSV partition file on disk.