PHPackages                             sciactive/nymph-pubsub - 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. sciactive/nymph-pubsub

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

sciactive/nymph-pubsub
======================

A library for publishing/subscribing to Nymph database changes.

3.0.2(6y ago)16072Apache-2.0PHP

Since Feb 18Pushed 3y ago3 watchersCompare

[ Source](https://github.com/sciactive/nymph-pubsub)[ Packagist](https://packagist.org/packages/sciactive/nymph-pubsub)[ Docs](http://nymph.io/)[ RSS](/packages/sciactive-nymph-pubsub/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (6)Versions (30)Used By (2)

Nymph PubSub Server - collaborative app data
============================================

[](#nymph-pubsub-server---collaborative-app-data)

[![Latest Stable Version](https://camo.githubusercontent.com/8f625c28a1800e2271f6cd7a91c1228878bd57ee7b6aa75544f18009d914f399/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7363696163746976652f6e796d70682d7075627375622e737667)](https://packagist.org/packages/sciactive/nymph-pubsub) [![Open Issues](https://camo.githubusercontent.com/55bf8041914337e956fce776f451c25b7ebd0cc23453bb07b6737534d94cfcbf/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f7363696163746976652f6e796d70682d7075627375622e737667)](https://github.com/sciactive/nymph-pubsub/issues) ![License](https://camo.githubusercontent.com/4909e75684facb93eeb29886aee92a841b7f097221334b4992881752a1653d55/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f7363696163746976652f6e796d70682d7075627375622e737667)

Powerful object data storage and querying for collaborative web apps.

Deprecation Notice
------------------

[](#deprecation-notice)

The PHP implementation of Nymph/Tilmeld has been deprecated. It will no longer have any new features added. Instead, a new version of Nymph running on Node.js, written entirely in TypeScript will replace the PHP implementation. You can find it over at the [Nymph.js repo](https://github.com/sciactive/nymphjs).

Installation
------------

[](#installation)

### Automatic Setup

[](#automatic-setup)

The fastest way to start building a Nymph app is with the [Nymph App Template](https://github.com/hperrin/nymph-template).

### Manual Installation

[](#manual-installation)

```
composer require sciactive/nymph-pubsub
```

This repository is the PHP publish/subscribe server. For more information, you can see the [main Nymph repository](https://github.com/sciactive/nymph).

Usage
-----

[](#usage)

```
// pubsub.php: Start with `php pubsub.php [-d]`

if (php_sapi_name() != "cli") {
  die("You can only run pubsub.php from the command line.");
}

// This is an example server that is configured with hostname
// "pubsubnetwork1entry" as an entry point to network1, which contains two
// endpoint servers, "pubsubnetwork1endpoint1" and "pubsubnetwork1endpoint2".

// Setting a default timezome is highly recommended.
date_default_timezone_set('America/Los_Angeles');

require 'vendor/autoload.php';

// Set up Nymph.
use Nymph\Nymph;
Nymph::configure([
  'MySQL' => [
    'host' => 'your_db_host',
    'database' => 'your_database',
    'user' => 'your_user',
    'password' => 'your_password'
  ]
]);

\Nymph\Nymph::connect();

// Allow this file to be called with "-d" to daemonize it.
if (in_array('-d', $argv)) {
  function shutdown() {
    posix_kill(posix_getpid(), SIGHUP);
  }

  // Switch over to daemon mode.
  if ($pid = pcntl_fork()) {
    return;
  }

  register_shutdown_function('shutdown');
} else {
  error_reporting(E_ALL);
}

// Set up Nymph PubSub.
$config = include(__DIR__.'/pubsub-config.php');
$config['port'] = 8080;
$config['relays'] = [
  'ws://pubsubnetwork1endpoint1:8080/',
  'ws://pubsubnetwork1endpoint2:8080/'
];
$server = new \Nymph\PubSub\Server($config);

// Run the server.
$server->run();
```

```
// pubsub-config.php

// This config file tells Nymph to publish entity updates to these network entry
// points. They will then relay the publish to their network.

return [
  'entries' => [
    'ws://pubsubnetwork1entry:8080/',
    'ws://pubsubnetwork2entry:8080/',
    'ws://pubsubnetwork3entry:8080/'
  ]
];
```

```
// somewhere in your Nymph rest endpoint.
$config = include('path/to/pubsub/pubsub-config.php');
\Nymph\PubSub\Server::configure($config);
```

For a thorough step by step guide to setting up Nymph on your own server, visit the [Setup Guide](https://github.com/sciactive/nymph/wiki/Setup-Guide).

API Docs
--------

[](#api-docs)

Check out the [API Docs in the wiki](https://github.com/sciactive/nymph/wiki/API-Docs).

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity74

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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

Every ~64 days

Recently: every ~14 days

Total

26

Last Release

2517d ago

Major Versions

1.6.0 → 2.2.02017-10-25

2.2.1 → 3.0.0-beta.12017-11-16

### Community

Maintainers

![](https://www.gravatar.com/avatar/133c9c4eff1268723fc1be664b5312a40527c6a94bfd40215bf4ff276832738f?d=identicon)[hperrin](/maintainers/hperrin)

---

Top Contributors

[![hperrin](https://avatars.githubusercontent.com/u/195918?v=4)](https://github.com/hperrin "hperrin (89 commits)")

---

Tags

nymphphppubsubserver-pushwebsocketwebsocketspublishsubscribepubsubweb-socketsnymph

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/sciactive-nymph-pubsub/health.svg)

```
[![Health](https://phpackages.com/badges/sciactive-nymph-pubsub/health.svg)](https://phpackages.com/packages/sciactive-nymph-pubsub)
```

###  Alternatives

[pusher/pusher-php-server

Library for interacting with the Pusher REST API

1.5k94.8M293](/packages/pusher-pusher-php-server)[php-mqtt/client

An MQTT client written in and for PHP.

4372.1M30](/packages/php-mqtt-client)[pusher/pusher-http-laravel

\[DEPRECATED\] A Pusher bridge for Laravel

400509.0k3](/packages/pusher-pusher-http-laravel)[nuwber/rabbitevents

The Nuwber RabbitEvents package

120515.8k3](/packages/nuwber-rabbitevents)[arthurkushman/php-wss

Web-socket server/client with URI parse and multi-process support

2151.1M2](/packages/arthurkushman-php-wss)[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)
