
Show HN: Pushpin, a reverse proxy for real-time web services - jkarneges
https://github.com/fanout/pushpin
======
jkarneges
Many upvotes and github stars, but not many comments here yet. Guess I did a
thorough job on the readme? :)

As an example of how powerful Pushpin's transparency is, we were able to build
a Bayeux server with it. Bayeux is the open pubsub standard supported by
projects such as Faye [1].

For our Bayeux server, we made a backend that uses Pushpin's ZeroMQ interface
to set up stateless long-polling and manage stateful WebSockets (eventually I
want to figure out how to use Pushpin's _stateless_ WebSockets ability here,
but the Bayeux protocol makes this difficult). Session information is stored
in Redis. Pushpin's JSONP configuration is tweaked to work exactly like
Bayeux's, which is generally needed for the initial handshake. When a message
needs to be published to all subscribers of a channel, it is produced once by
the backend and Pushpin handles the one-to-many delivery. Long-polling
responses use Pushpin's JSON Patch ability, so that they can contain the
request-specific ack information without published payloads needing to be
client-specific. Thus, we were able to make Pushpin speak Bayeux without it
having any direct knowledge of that protocol.

Most developers will not need to build such a gnarly service like this, as
modern realtime APIs tend to be a lot simpler than the classic Bayeux
protocol. But I think it's a cool example of what's possible.

[1] [http://faye.jcoglan.com/](http://faye.jcoglan.com/)

------
fiatjaf
This is interesting, but why did you make it? Who is using it? Why isn't it a
paid service?

~~~
jkarneges
I created Pushpin because it addressed a problem that I had myself at a
previous employer. Namely that I needed to build a realtime API and there were
essentially no dev tools available to help with that.

We (Fanout) have a paid service too:
[https://fanout.io/cloud/](https://fanout.io/cloud/)

At this time, users are mostly other startups, for example LaunchDarkly
(controlled feature rollouts) and Appbase (ElasticSearch-compatible BaaS). We
have some promising discussions going on with larger companies as well.

