Phoenix-based websocket push implementation
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Add GitHub templates Nov 28, 2018
config Test the Push ItemServer Nov 13, 2018
examples Add Benchee for testing functions in the example repo Dec 2, 2018
guides Recompile PushEx when the router loader’s AST changes Dec 2, 2018
lib Do not need grouped presences Dec 5, 2018
priv/gettext Init (phx 1.4rc3) Oct 30, 2018
test Utilize Tracker directly to not have to override Presence handle_diff Dec 5, 2018
.formatter.exs DRY up the code a bit Nov 1, 2018
.gitignore Ignore tool-versions since it doesn’t really matter for this purpose Nov 21, 2018
.travis.yml Only master branch Nov 28, 2018
CHANGELOG.md
CODE_OF_CONDUCT.md Add changelog, CoC, license Nov 28, 2018
CONTRIBUTING.md Add Contributing Nov 28, 2018
LICENSE Add changelog, CoC, license Nov 28, 2018
README.md Better pacing Dec 3, 2018
mix.exs 1.0.0-rc6 Dec 2, 2018
mix.lock Update to phoenix 1.4.0 Nov 10, 2018

README.md

PushEx

Hex.pm Hex.pm Hex.pm Build Status

PushEx is an implementation of Phoenix websockets/channels which handles best practices of running websockets for you, but allows your business logic to be specified through simple behaviour modules.

PushEx is currently in release candidate of 1.0.0. The library is fully functional, but I am waiting until we are using this in production before releasing 1.0.0.

Key Links

Features

  • Push socket/channel implementation
  • Push API implementation
  • Customizable hook points to allow authentication and instrumentation
  • Designed for performance with a large number of connections and messages
  • JS client built on top of Phoenix.js

Compared to Phoenix

PushEx is built on top of Phoenix Channel and Presence. If you look at the source code, it is actually a very thin layer on top of this core functionality; most of the code is around ensuring a scalable system which is set up for success without knowing how Phoenix works.

PushEx is better compared to a pre-built microservice that is ready to go. By implementing a few application specific functions, you can bring a fully baked push WebSocket server to your application. You will also benefit from community upgrades regarding functionality and performance; this is true both for Phoenix changes and PushEx changes. You do not need to know how Phoenix works in order to built a scalable system.

Get Started

The best way to get started is by following the Standalone Installation Guide.

It is possible to integrate PushEx with an existing Phoenix application, although this is not recommended for applications which are deployed often. The installation guide for this case is slated for the future. Please open an issue if you'd like it for your use case.

The PushEx docs contain many guides such as authentication, deployment, instrumentation, PushEx.js, PubSub, API usage. Please see this guide for up to date information. You can also access these guides in the repo folder guides.

Current Version

Add the following to your mix.exs deps in order to get the latest version of PushEx:

  {:push_ex, "~> 1.0.0-rc6"},

Examples

Examples are located in the examples directory. The test_frontend_socket example is the most complete and simple example.

Company Sponsor

A big thanks to SalesLoft for helping with the development and open-sourcing of PushEx. Their support of my professional and personal time into this project (it was formed in an Innovation Week) is the type of thing that makes them Atlanta's best place to work.