← ClaudeAtlas

opcua-session-managerlisted

Keep OPC UA sessions alive across PHP requests via a ReactPHP daemon and local IPC (Unix-domain socket on Linux/macOS, TCP loopback on Windows — auto-selected). ManagedClient is a drop-in OpcUaClientInterface replacement for php-opcua/opcua-client's Client — same API surface, persistent sessions, ~150ms handshake overhead paid once instead of every request. Use this skill whenever the user wants to eliminate per-request OPC UA connection cost, run OPC UA from PHP-FPM / Laravel / Symfony web requests, keep subscriptions / monitored items alive between requests, or operate a long-running OPC UA daemon process.
php-opcua/ai-skills · ★ 0 · Web & Frontend · score 68
Install: claude install-skill php-opcua/ai-skills
# php-opcua/opcua-session-manager — v4.4.0 skill A ReactPHP daemon that holds OPC UA sessions in memory across short-lived PHP requests. `ManagedClient` is a drop-in `OpcUaClientInterface` replacement that talks to the daemon via local IPC — the application code is **identical** to direct `Client` usage, but the OPC UA handshake (50–200 ms) is paid once at daemon startup, not per request. ## When to use this skill Activate when the user is solving one of these problems: - **OPC UA from web requests** (Laravel/Symfony/FPM): every request triggers Connect → CreateSession → ActivateSession (~150 ms). The daemon caches the session. - **Keeping subscriptions alive** across requests so notifications aren't lost between page loads. - **Auto-publish loop** running outside the request lifecycle, dispatching PSR-14 events to the framework's listener bus. - **Long-lived OPC UA gateway** consuming from PLCs and forwarding to HTTP / Kafka / MQTT. - **Cross-platform IPC** — they want it to work on Windows too (auto-falls-back to TCP loopback). Do NOT activate for: direct connections from CLI scripts that run once (`bin/opcua-cli read ...`) — those don't benefit from the daemon. Use `opcua-client` directly. ## The 60-second mental model ``` PHP request (short-lived) SessionManagerDaemon (long-lived) ───────────────────────── ───────────────────────────────── new ManagedClient($endpoint) SessionManagerDaemon::run()