Pipey
A lightweight HTTP → WebSocket event delivery service written in Rust.
Pipey lets applications publish realtime events over HTTP and instantly deliver them to connected WebSocket clients.
Built with Actix Web, WebSockets, Redis, and Arifa.
Pipey is under active development.
Features
- HTTP → WebSocket event delivery
- User-targeted messaging
- Redis-backed routing
- Automatic heartbeat
- Automatic client cleanup
- Low latency
- Async-first
- Lightweight
- Production-ready architecture
Architecture
HTTP POST
│
▼
Pipey Server
│
Redis + Arifa
│
▼
WebSocket Client
API
Open a Pipe
Connect a WebSocket for a specific user.
GET /api/v1/ws/pipey?user_id=<uuid>
Example
ws://localhost:8080/api/v1/ws/pipey?user_id=550e8400-e29b-41d4-a716-446655440000
Publish an Event
POST /api/v1/pipey/publish
Content-Type: application/json
Request Body
Success Response
200 OK
Recipient Offline
If the recipient has no active WebSocket connection, Pipey will not publish the event.
404 Not Found
Server Error
If Redis or the event router is unavailable.
500 Internal Server Error
JavaScript Example
const socket = ;
socket ;
Publish an event
How It Works
- A client opens a WebSocket connection to Pipey.
- Pipey subscribes the client to its private user channel.
- Your backend sends an HTTP request to
/api/v1/pipey/publish. - Pipey checks whether the recipient is online.
- If the user is online, the event is routed through Redis and delivered instantly.
- If the user is offline, Pipey returns a
404 Recipient is offlineresponse and nothing is published.
Tech Stack
- Rust
- Actix Web
- Actix WebSocket
- Redis
- Arifa