Pushman is an open source web socket event manager. It allows you to push events over HTTP to your own Pushman server which will push event information down to a client via a Web Socket.
You can bind server side events to client notifications.
Demo on the Pushman Website.
- Localization Support
- Feature: Ban IP (long term)
I'm really sorry I pushed test writing back to V3, it is a top priority but I need to refactor loads of code I wrote hastily to ensure PHPSpec can work. Watch for code refactors marked "preperation for testing" in the future
- Write tests for PHPLib and Pushman :) Integrate with travis-ci
- Integrate with StyleCI
- Build Pushman Lite as an independant Package to include in sites.
- Way better documentation for building Pushman.
- Push console logs out on PushmanInternal Channel. // later
- <script> tags in Payloads are excuted. // fixed but needs more
Documentation for usage can be found on the Pushman website.
Documentation for building your own Pushman instance is found below.
Pushman works fantastically on Laravel's Forge! You still need to install prerequisites though.
Pushman requires ZeroMQ which is a custom binary (Windows and Linux), along with it's PHP extension.
You can follow zmq's installation instructions, but you should know building it for a Forge server is easy.
When installing on Windows, you can just install the .exe from their website.
For Debian based systems, there is an apt package: apt-get install libzmq3-dev
You can always build the PHP extension yourself:
git clone git:https://github.com/mkoppanen/php-zmq.git
$ cd php-zmq
phpize && ./configure
$ sudo make
$ sudo make install
When building the extension for Windows, you can just download an existing .dll file from their website and place it in the php /ext directory. You will also need to add the extension=zmq.dll
to your php.ini file.
Pushman requires two ports to function, an INTERNAL
and a PUBLIC
port, the public port handles websocket connections and the other handles incoming API requests.
By default both of these ports are configurable in the .env
file in the root directory or by setting an environment variable. You only need to setup a firewall rule for the PUBLIC
port, but do ensure both ports are free to bind to.
.env file:
PUSHMAN_PORT=8080
PUSHMAN_INTERNAL=5555
On forge, you can just build a new site, and give the it the Github repo to install itself. Duffleman/pushman
on the master branch is what you need to enter.
On a regular server, git clone the directory and run composer install --no-dev
to install the requirements.
Pushman requires a database, so for both Forge and a regular server, enter your Database editor of choice, or sqlite, and build a database and enter the details in the .env
file in the root web directory.
Once the database configuration is set, you can run php artisan migrate
followed by php artisan key:generate
to publish the database layout. Or on Forge, just redeploy the site.
You MUST set an App Key.
Pushman itself can then be run by using php artisan pushman:run
. I highly recommend setting up a supervisord task for this or in Forge, go into your server tab and enter the full path to artisan and Forge will auto monitor the task for you.
php /home/forge/pushman.dfl.mn/artisan pushman:run
If you discover a security vulnerability within Pushman, please send an e-mail to George Miller at [email protected]. All security vulnerabilities will be promptly addressed.
Pushman is open-sourced software licensed under the MIT license