PHPackages                             sockudo/sockudo-php-server - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. sockudo/sockudo-php-server

ActiveLibrary[HTTP &amp; Networking](/categories/http)

sockudo/sockudo-php-server
==========================

Library for interacting with the Sockudo REST API

v2.0.0(today)650048[3 issues](https://github.com/sockudo/sockudo/issues)[1 PRs](https://github.com/sockudo/sockudo/pulls)MITHTMLPHP ^7.3|^8.0CI failing

Since Jun 20Pushed today8 watchersCompare

[ Source](https://github.com/sockudo/sockudo)[ Packagist](https://packagist.org/packages/sockudo/sockudo-php-server)[ Fund](https://www.buymeacoffee.com/radooku)[ GitHub Sponsors](https://github.com/countradooku)[ RSS](/packages/sockudo-sockudo-php-server/feed)WikiDiscussions master Synced today

READMEChangelog (10)Dependencies (6)Versions (6)Used By (0)

 [![Sockudo Logo](images/logo.svg)](images/logo.svg)

Sockudo
=======

[](#sockudo)

 A self-hosted realtime platform: Pusher-compatible at the edge, Sockudo-native where you need recovery, history, mutable messages, push, AI Transport, and first-party SDKs.

 [![Build status](https://camo.githubusercontent.com/23fb69fdbf5ed3b426d780a3ce93d5d8fc39b4642b45ed238bf290f9ce6b6da5/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f736f636b75646f2f736f636b75646f2f63692e796d6c3f6272616e63683d6d61696e)](https://github.com/sockudo/sockudo/actions) [![License](https://camo.githubusercontent.com/9a63d7b35809d7ef28e927d57571609030a0907e1b2608c7bca7ee35df157742/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f736f636b75646f2f736f636b75646f)](LICENSE) [![GitHub stars](https://camo.githubusercontent.com/5b70923f5948aeb1c5a8551de60177708b9314e7a0ecb830c0da51a42f48caba/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f736f636b75646f2f736f636b75646f3f7374796c653d736f6369616c)](https://github.com/sockudo/sockudo)

What Sockudo Is
---------------

[](#what-sockudo-is)

Sockudo is a high-performance Rust realtime server for WebSocket and HTTP publish workloads. It keeps strict Protocol V1 compatibility with the Pusher protocol, then adds Protocol V2 features for teams that need stronger delivery semantics and product-level control.

This repository is now the Sockudo monorepo. It contains the server, Rust workspace crates, dashboard, deployment assets, docs, official realtime client SDKs, HTTP server SDKs, and the TypeScript AI Transport SDK.

Highlights
----------

[](#highlights)

- Pusher-compatible WebSocket and HTTP APIs for Protocol V1 clients.
- Protocol V2 with `sockudo:` events, serials, message IDs, recovery, rewind, tags, deltas, and mutable message events.
- Horizontal fanout through Redis, Redis Cluster, NATS, RabbitMQ, Google Pub/Sub, Kafka, Pulsar, and Apache Iggy.
- Durable history, hot replay buffers, two-tier recovery, `until_attach` history reads, and degraded/reset-required continuity state.
- Versioned mutable messages with create, update, delete, append, summary, latest-visible reads, and version history.
- Presence membership plus retained presence-history transitions and snapshots.
- Message annotations for reactions, receipts, moderation, summary projection, and raw annotation streams.
- Push notification pipeline for FCM, APNs, Web Push, HMS, and WNS.
- Prometheus metrics, webhook delivery, rate limiting, app managers, TLS, Docker Compose, and Helm.
- Optional AI Transport built on the same versioned-message, history, recovery, push, and presence primitives instead of a parallel streaming path.

Monorepo Layout
---------------

[](#monorepo-layout)

```
crates/              Rust server crates and libraries
benches/ai/          Permanent Criterion benchmarks for AI hot paths
client-sdks/         Realtime client SDKs and AI Transport SDK
server-sdks/         HTTP/server SDKs for backend publishers
dashboard/           Operator API and Vue UI
docs/                Documentation site content
config/              Local configuration examples
ops/                 Migrations and operational assets
charts/              Helm chart
tests/               Conformance, dashboard, load, and binary fixtures
tools/               Probes, chaos tooling, and helper utilities

```

The SDK directories preserve their original repository names so package metadata, release scripts, and issue references remain recognizable.

Protocols
---------

[](#protocols)

CapabilityProtocol V1Protocol V2Event prefixes`pusher:` / `pusher_internal:``sockudo:` / `sockudo_internal:`Pusher compatibilityStrict compatibility targetSockudo-native`serial` and `message_id`Stripped from deliveryNative on relevant framesRecovery and rewindNot availableHot replay plus durable historyMutable messagesNot available`sockudo:message.*`AnnotationsNot availableNativeTag filtering and deltasNot availableNativeAI TransportNot availableOptional feature and runtime configUse Protocol V1 when you need drop-in Pusher behavior. Use Protocol V2 when clients and server SDKs can rely on Sockudo-native recovery, history, mutation, annotation, filtering, and AI Transport semantics. Protocol defaults vary by SDK; check each package README before assuming V2 is enabled.

Quick Start
-----------

[](#quick-start)

### Docker Compose

[](#docker-compose)

```
git clone https://github.com/sockudo/sockudo.git
cd sockudo
make up
```

Default local services:

ServiceURLSockudo server`http://localhost:6001`Prometheus metrics`http://localhost:9601/metrics`Dashboard UI`http://localhost:5174`Dashboard API`http://localhost:3460`### From Source

[](#from-source)

```
rustup toolchain install stable
git clone https://github.com/sockudo/sockudo.git
cd sockudo

cargo run -p sockudo
```

Build with a production-oriented feature set:

```
cargo build -p sockudo --release --features "v2,redis,postgres,push"
```

Build everything the server can expose:

```
cargo build -p sockudo --release --features full
```

### Kubernetes

[](#kubernetes)

```
helm install sockudo ./charts/sockudo
```

Example production shape with Redis, ingress, autoscaling, and monitoring:

```
helm install sockudo ./charts/sockudo \
  --set config.adapterDriver=redis \
  --set redis.host=redis-master \
  --set redis.existingSecret=my-redis-secret \
  --set defaultApp.existingSecret=my-default-app-secret \
  --set autoscaling.enabled=true \
  --set pdb.enabled=true \
  --set ingress.enabled=true \
  --set serviceMonitor.enabled=true
```

When `defaultApp.existingSecret` is set, the Secret must contain `default-app-secret` and can also include `default-app-id` and `default-app-key`.

Client SDKs
-----------

[](#client-sdks)

Realtime clients live under [client-sdks/](client-sdks/).

SDK CI and publishing are managed from root workflows. See the [2026 SDK publishing runbook](docs/sdk-publishing-2026.md) before releasing packages or changing registry setup. Registry-native packages publish through protected workflows where supported. SwiftPM packages are published from this monorepo through the root `Package.swift`.

RuntimePackageJavaScript / TypeScript`@sockudo/client`AI Transport TypeScript`@sockudo/ai-transport`Swift / Apple platforms`SockudoSwift` from `https://github.com/sockudo/sockudo`Kotlin / JVM / Android`io.sockudo:sockudo-kotlin`Flutter / Dart`sockudo_flutter`.NET`Sockudo.Client`Python`sockudo-python`JavaScript example:

```
import Sockudo from "@sockudo/client";

const sockudo = new Sockudo("app-key", {
  wsHost: "127.0.0.1",
  wsPort: 6001,
  wssPort: 6001,
  forceTLS: false,
  enabledTransports: ["ws"],
  protocolVersion: 2,
});

const channel = sockudo.subscribe("public-updates");
channel.bind("price-updated", (payload) => {
  console.log(payload);
});
```

AI Transport example:

```
import { TransportProvider, useView } from "@sockudo/ai-transport/react";
```

See [`client-sdks/sockudo-ai-transport-js/README.md`](client-sdks/sockudo-ai-transport-js/README.md)for React, Vue, Svelte, Vercel AI SDK, and direct provider helpers.

Server SDKs
-----------

[](#server-sdks)

HTTP/server SDKs live under [server-sdks/](server-sdks/). They publish events, sign private and presence channel auth, authenticate users, validate webhooks, query state, and expose Sockudo-native APIs such as idempotent publishing, history, mutable messages, annotations, and push where implemented.

SDK CI and publishing are managed from root workflows. See the [2026 SDK publishing runbook](docs/sdk-publishing-2026.md) before releasing packages or changing registry setup. Registry-native packages publish through protected workflows where supported. Go modules and SwiftPM publish from this monorepo with package-manager-native tags and manifests.

LanguagePackageNode.js`sockudo`Python`sockudo-http-python`PHP`sockudo/sockudo-php-server`Ruby`sockudo`Go`github.com/sockudo/sockudo/server-sdks/sockudo-http-go/v2`Rust`sockudo-http`Java`io.sockudo:sockudo-http-java`.NET`SockudoServer`Swift`Sockudo` from `https://github.com/sockudo/sockudo`Node.js example:

```
import { Sockudo } from "sockudo";

const sockudo = new Sockudo({
  appId: "app-id",
  key: "app-key",
  secret: "app-secret",
  host: "127.0.0.1",
  port: 6001,
  useTLS: false,
});

await sockudo.trigger("orders", "order.created", { id: "ord_123" });
```

Python example:

```
from sockudo_http import Config, Sockudo

sockudo = Sockudo(
    Config(
        app_id="app-id",
        key="app-key",
        secret="app-secret",
        host="127.0.0.1",
        port=6001,
    )
)

sockudo.trigger("orders", "order.created", {"id": "ord_123"})
```

Server Workspace
----------------

[](#server-workspace)

The Rust workspace is split by responsibility:

CrateResponsibility`sockudo-protocol`Protocol message types, V1/V2 prefixes, extras, wire payloads`sockudo-filter`Tag filtering expressions and matching`sockudo-core`Shared traits, config, auth, errors, history, version store, annotations`sockudo-app`App-manager backends`sockudo-cache`Cache backends`sockudo-queue`Queue backends`sockudo-rate-limiter`Rate limiting and middleware`sockudo-metrics`Prometheus metrics`sockudo-webhook`Webhook delivery`sockudo-delta`Delta compression`sockudo-push`Push domain, storage, queues, providers, feedback, scheduler`sockudo-ai-transport`AI Transport validation, rollup, and conformance helpers`sockudo-adapter`Connections, presence, fanout, replay, recovery`sockudo-server`Binary, HTTP/WS routes, bootstrap, durable stores, push APIThe Rust SDK at `server-sdks/sockudo-http-rust` is intentionally excluded from the root Cargo workspace so it can keep its own package and release lifecycle.

Feature Flags
-------------

[](#feature-flags)

Common server features:

FeaturePurpose`local`In-memory development defaults`v2`Protocol V2 bundle: deltas, tag filtering, recovery`delta`Delta compression`tag-filtering`Server-side tag filtering`recovery`Serial and message-id recovery`ai-transport`AI Transport validation and rollup surfaces`push`Push notification runtime and HTTP APIs`redis`, `redis-cluster`Redis-backed adapter/cache/queue/rate limit paths`nats`, `pulsar`, `rabbitmq`, `google-pubsub`, `kafka`, `iggy`Horizontal adapter and queue integrations`mysql`, `postgres`, `dynamodb`, `surrealdb`, `scylladb`App, history, version-store, and push storage backends`sqs`, `sns`, `lambda`AWS queue, notification, and webhook integrations`full`All production integrations wired by the serverExamples:

```
cargo build
cargo build --no-default-features
cargo build --features "redis,postgres"
cargo build --features "v2,ai-transport,redis,postgres,push"
cargo build --release --features full
```

Configuration
-------------

[](#configuration)

Sockudo prefers TOML and falls back to JSON. The default local config is [`config/config.toml`](config/config.toml).

Minimal local shape:

```
port = 6001
host = "0.0.0.0"
debug = false

[app_manager]
driver = "memory"

[app_manager.array]
[[app_manager.array.apps]]
id = "app-id"
key = "app-key"
secret = "app-secret"
enabled = true

[adapter]
driver = "local"

[cache]
driver = "memory"

[queue]
driver = "memory"
```

Major runtime sections:

SectionPurpose`[app_manager]`App credentials, policies, origin rules, namespaces`[adapter]`Realtime fanout driver`[cache]`Shared cache for auth, recovery, and cross-node state`[queue]`Background queue driver`[history]`Durable channel history`[versioned_messages]`Mutable message storage and versioning`[presence_history]`Retained join/leave transitions`[annotations]`Annotation publish, delete, summaries, raw streams`[push]`Push providers, quotas, retries, feedback, scheduler`[ai_transport]`AI Transport validation and channel scopingReference docs:

- [Configuration](docs/content/docs/reference/configuration.mdx)
- [Environment variables](docs/content/docs/reference/environment-variables.mdx)
- [HTTP endpoints](docs/content/docs/reference/http-endpoints.mdx)

AI Transport
------------

[](#ai-transport)

AI Transport is default-off and Protocol V2-only. Enable it with both Cargo and runtime config:

```
cargo build -p sockudo --features "v2,ai-transport,redis,postgres,push"
```

```
[versioned_messages]
enabled = true

[history]
enabled = true

[ai_transport]
enabled = true

[[ai_transport.channels]]
prefix = "ai:"
```

Operational rule: append rollup only changes WebSocket egress. Persistence, version storage, history, recovery, push, and webhooks still see every original mutation.

Useful docs:

- [AI Transport overview](docs/content/docs/server/ai-transport-overview.mdx)
- [AI Transport conventions](docs/content/docs/server/ai-transport-conventions.mdx)
- [Token streaming rollup](docs/content/docs/server/token-streaming-rollup.mdx)
- [Production checklist](docs/content/docs/server/ai-transport-production-checklist.mdx)

Development
-----------

[](#development)

Server checks:

```
cargo fmt --all
cargo test --workspace
cargo clippy --workspace --all-targets -- -D warnings
```

Focused server checks:

```
cargo test -p sockudo-core
cargo test -p sockudo-adapter
cargo test -p sockudo-ai-transport
cargo test -p sockudo-push
```

AI Transport checks:

```
scripts/ai-transport-bench-guard.sh
AIT_CONFORMANCE_OFFLINE=1 scripts/ai-conformance-node.sh
```

Docs checks:

```
cd docs
npm run types:check
npm run build
```

SDK checks are covered by `SDK CI` and are also package-local when iterating. Start from the [2026 SDK publishing runbook](docs/sdk-publishing-2026.md), then use the native package manager: `bun`, `pnpm`, `npm`, `pytest`, `cargo`, `go test`, `gradle`, `swift test`, `dotnet test`, `composer`, or `bundle`.

Deployment Profiles
-------------------

[](#deployment-profiles)

ProfileAdapterCacheQueueApp storeTypical useLocal development`local``memory``memory``memory`Fast single-node iterationSmall production`redis``redis``redis``postgres` or `mysql`Simple shared stateHigh traffic`redis-cluster``redis-cluster`external queueSQL or DynamoDBLarger fanout and retentionAI Transporthorizontal adaptershared cacheshared queueshared history and version storeStreaming recovery and rollupFor horizontal adapters, do not assume memory history, memory version stores, or process-local cache are safe. AI Transport startup intentionally rejects invalid horizontal/shared-state combinations.

Documentation
-------------

[](#documentation)

- [Docs site source](docs/)
- [Getting started](docs/content/docs/getting-started/overview.mdx)
- [Realtime clients](docs/content/docs/clients/index.mdx)
- [Server SDKs](docs/content/docs/server-sdks/index.mdx)
- [Server configuration](docs/content/docs/server/configuration.mdx)
- [Scaling](docs/content/docs/server/scaling.mdx)
- [Security](docs/content/docs/server/security.mdx)
- [Observability](docs/content/docs/server/observability.mdx)

Sponsors
--------

[](#sponsors)

 [ ![SWAG](https://camo.githubusercontent.com/b44d53bc2a4a149438e16a98eee798ba2dde489b6d131e9f56550088d60575fb/68747470733a2f2f737761672e6c6976652f7374617469632f696d672f66617669636f6e2e32393931343436622e706e67) ](https://swag.live/) [ ![LiveCaller](https://camo.githubusercontent.com/01581fb2d3d405b3c69b24b5b7b7a41731d4683b4befa97c4aa280d36c332874/68747470733a2f2f63646e2e70726f642e776562736974652d66696c65732e636f6d2f3639313539323037646262373031353361303236303535312f3639313539323037646262373031353361303236303563635f6c6f676f2e737667) ](https://livecaller.io/)

Contributing
------------

[](#contributing)

1. Fork the repository.
2. Create a focused branch.
3. Make the smallest coherent change.
4. Run the relevant checks.
5. Open a pull request with the behavior change, verification, and any follow-up risk.

For coding-agent work, read [AGENTS.md](AGENTS.md). For a compact technical map of the repo, read [CLAUDE.md](CLAUDE.md).

License
-------

[](#license)

Sockudo is licensed under the [MIT License](LICENSE). Individual SDK packages may also carry their own package metadata and notices; check the SDK directory before publishing.

Support
-------

[](#support)

- [GitHub Issues](https://github.com/sockudo/sockudo/issues)
- [GitHub Discussions](https://github.com/sockudo/sockudo/discussions)
- [Documentation](https://sockudo.io)
- [Discord](https://discord.gg/ySfNxfh2gZ)
- [X / Twitter](https://x.com/sockudorealtime)
- [Email](mailto:office@sockudo.io)

###  Health Score

49

—

FairBetter than 94% of packages

Maintenance100

Actively maintained with recent releases

Popularity23

Limited adoption so far

Community27

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 75.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

0d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/238977771?v=4)[Sockudo](/maintainers/sockudo)[@sockudo](https://github.com/sockudo)

---

Top Contributors

[![countradooku](https://avatars.githubusercontent.com/u/52667211?v=4)](https://github.com/countradooku "countradooku (661 commits)")[![lilfaf](https://avatars.githubusercontent.com/u/1571812?v=4)](https://github.com/lilfaf "lilfaf (51 commits)")[![jaroslawroszyk](https://avatars.githubusercontent.com/u/48736575?v=4)](https://github.com/jaroslawroszyk "jaroslawroszyk (46 commits)")[![MarcEspiard](https://avatars.githubusercontent.com/u/32894646?v=4)](https://github.com/MarcEspiard "MarcEspiard (34 commits)")[![rdiaconu-spec](https://avatars.githubusercontent.com/u/236830642?v=4)](https://github.com/rdiaconu-spec "rdiaconu-spec (20 commits)")[![itsbalamurali](https://avatars.githubusercontent.com/u/1926303?v=4)](https://github.com/itsbalamurali "itsbalamurali (16 commits)")[![faytekin](https://avatars.githubusercontent.com/u/4013224?v=4)](https://github.com/faytekin "faytekin (9 commits)")[![0ctan33](https://avatars.githubusercontent.com/u/76810766?v=4)](https://github.com/0ctan33 "0ctan33 (8 commits)")[![Copilot](https://avatars.githubusercontent.com/in/1143301?v=4)](https://github.com/Copilot "Copilot (8 commits)")[![PTFOPlayer](https://avatars.githubusercontent.com/u/35374730?v=4)](https://github.com/PTFOPlayer "PTFOPlayer (7 commits)")[![ChrisZieba](https://avatars.githubusercontent.com/u/2230570?v=4)](https://github.com/ChrisZieba "ChrisZieba (5 commits)")[![MustafaTaj](https://avatars.githubusercontent.com/u/19856492?v=4)](https://github.com/MustafaTaj "MustafaTaj (5 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (4 commits)")[![teovillanueva](https://avatars.githubusercontent.com/u/41754896?v=4)](https://github.com/teovillanueva "teovillanueva (1 commits)")[![Hazmi35](https://avatars.githubusercontent.com/u/32807631?v=4)](https://github.com/Hazmi35 "Hazmi35 (1 commits)")[![vajeen](https://avatars.githubusercontent.com/u/29272725?v=4)](https://github.com/vajeen "vajeen (1 commits)")[![exodusanto](https://avatars.githubusercontent.com/u/13484843?v=4)](https://github.com/exodusanto "exodusanto (1 commits)")[![dennismenken](https://avatars.githubusercontent.com/u/7050584?v=4)](https://github.com/dennismenken "dennismenken (1 commits)")[![realmrv](https://avatars.githubusercontent.com/u/25880235?v=4)](https://github.com/realmrv "realmrv (1 commits)")

---

Tags

abblybroadcastingpusherrealtimerustrust-langwebsocketwebsocketswsrestpusheventsreal-timepublishmessagingrealtimetriggerphp-sockudo-serversockudo

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/sockudo-sockudo-php-server/health.svg)

```
[![Health](https://phpackages.com/badges/sockudo-sockudo-php-server/health.svg)](https://phpackages.com/packages/sockudo-sockudo-php-server)
```

###  Alternatives

[pusher/pusher-php-server

Library for interacting with the Pusher REST API

1.5k102.4M333](/packages/pusher-pusher-php-server)[pusher/pusher-http-laravel

\[DEPRECATED\] A Pusher bridge for Laravel

401509.5k4](/packages/pusher-pusher-http-laravel)[tempest/framework

The PHP framework that gets out of your way.

2.2k31.1k12](/packages/tempest-framework)[api-platform/metadata

API Resource-oriented metadata attributes and factories

244.5M182](/packages/api-platform-metadata)[zfr/zfr-pusher

PHP library for interacting with the Pusher REST API

2112.7k1](/packages/zfr-zfr-pusher)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
