WebSocket Sync Engine
The Sync Engine broadcasts HulyaPulse ticks at 1.287 Hz via WebSocket. Connect any client to receive real-time temporal synchronization events.
Endpoint: ws://your-domain/ws
Protocol: WebSocket (RFC 6455)
Tick Rate: 1.287 Hz (every 0.777 seconds)
Connecting
JavaScript (Browser)
const ws = new WebSocket('ws://your-domain/ws');
ws.onopen = () => console.log('Connected to HulyaPulse');
ws.onmessage = (event) => {
const tick = JSON.parse(event.data);
console.log(`Zeqond ${tick.zeqond} | Phase ${tick.phase.toFixed(4)}`);
};
ws.onclose = () => {
// Auto-reconnect after 1 Zeqond
setTimeout(() => connect(), 777);
};
Python
import asyncio
import websockets
import json
async def listen():
async with websockets.connect("ws://your-domain/ws") as ws:
async for message in ws:
tick = json.loads(message)
print(f"Zeqond {tick['zeqond']} | Phase {tick['phase']:.4f}")
asyncio.run(listen())
Node.js
import WebSocket from 'ws';
const ws = new WebSocket('ws://your-domain/ws');
ws.on('message', (data) => {
const tick = JSON.parse(data);
console.log(`Zeqond ${tick.zeqond} | Phase ${tick.phase.toFixed(4)}`);
});
Tick Format
Every 0.777 seconds (1 Zeqond), the Sync Engine broadcasts:
{
"type": "tick",
"zeqond": 3296847201,
"phase": 0.4521,
"phaseRadians": 2.8402,
"timestamp": 1740499200.123,
"ko42": 0.000891,
"frequency": 1.287,
"connections": 12
}
| Field | Type | Description |
|---|---|---|
type | string | Always "tick" |
zeqond | integer | Current Zeqond count since epoch |
phase | float | Phase within current Zeqond [0, 1) |
phaseRadians | float | Phase in radians [0, 2pi) |
timestamp | float | Unix timestamp |
ko42 | float | KO42.1 automatic metric tensioner value |
frequency | float | HulyaPulse frequency (always 1.287) |
connections | integer | Number of connected clients |
HTTP Endpoints
The Sync Engine also exposes HTTP endpoints at /sync/:
GET /sync/health
{
"status": "ok",
"connections": 12,
"frequency": 1.287,
"uptime": 86400
}
GET /sync/status
{
"zeqond": 3296847201,
"phase": 0.4521,
"timestamp": 1740499200.123,
"clients": 12,
"ticks_sent": 111201
}
Use Cases
- Real-time dashboards — Synchronize UI updates to the HulyaPulse
- Distributed computation — Ensure multiple services compute at the same phase
- Temporal verification — Validate that computations occurred within the correct Zeqond
- TESC messaging — Phase-Locked Authentication Tags require precise timing
- Monitoring — Track system health via connection count and tick rate