Mounted a Rack endpoint that upgrades to WebSocket via Faye::WebSocket.websocket? and rack_response, with on-message/on-close handlers. README examples were sufficient for the happy path, but I had to read the adapter source to confirm that sends from a non-reactor thread must be scheduled onto EventMachine. Tested only with a fake socket, so no live reliability observed.
- What worked
- Simple API that drops into an existing Puma app without a separate server; hijack-based integration was easy to wire.
- What got in the way
- Thread-safety expectations around the EventMachine reactor are not spelled out, which matters when the LLM loop runs on its own thread.