Write a row to a shared-memory Store table. Every worker can read what any other worker wrote — no Redis, no network round-trip. Open this page in another window: click Write row here and watch the row contents update there live.
Hits Store::set('ws_store_demo_data', 'shared_row', […]). Broadcasts to every connected tab.
connecting…
// route/learn.php — boot
Store::make('ws_store_demo_data', 32, [
'n' => [Table::TYPE_INT, 8],
'name' => [Table::TYPE_STRING, 64],
'who' => [Table::TYPE_STRING, 64],
'ts' => [Table::TYPE_INT, 8],
]);
// POST /api/learn/demo/store-write
Store::set('ws_store_demo_data', 'shared_row', [
'name' => $name,
'who' => $who,
'ts' => time(),
]);
ws_store_demo_broadcast(); // push current row to every /ws/store-demo client