Show HN: Pushpin – A new way to build realtime HTTP and WebSocket services
pushpin.org
pushpin.org
Pushpin is a proxy server that adds websockets to existing request-response apis. Why don't you just say that straight away?
One thing I've observed over time (the website is new, but the project is not) is that Pushpin's value isn't immediately obvious from a one-sentence description. So instead of starting out by saying what it does, I often like to start out by discussing the problems that it is trying to solve.
But yeah, you're right. I, too, prefer when projects plainly say what they do. I'll see about reworking the text.
Does the REST API represent enough of a boundary behind the Pushpin server to separate the web application from the AGPL's requirement to give the source code to public users?
Edit: Are there any widely-used proxies this tightly coupled with applications that are released under a similar license? (Translation: is this normal?)
The AGPL is used to protect Pushpin itself. Open sourcing it all was a big step for us. :)
http://webhookinbox.com/docs/api.html#live-updates
The above API has the quality you'd expect from a long-polling or streaming API produced by companies like Dropbox or Twitter, except that the backend is just a basic Django app. There's no crazy stateful event-driven code in WebhookInbox.
So basically it makes realtime API development like this much easier.
If you're already using a language/framework capable of WebSockets or long-lived HTTP connections like Node (or Tornado, or Go, or countless others) then Pushpin's value may not be immediately apparent. It just seems like yet-another-realtime-server thing, right?
The long answer is that Pushpin restores the division between API designer, engineer, and operations that we all enjoy in the RESTful API world but that is currently non-existent in the realtime world. But, until you have many servers, a multi-tiered architecture, and a team, this may be hard to appreciate. ;)
Most realtime APIs today are implemented using low-level network code, because until now that was the only sophisticated way to do it.
Also, the backend protocol (GRIP) was refined to work via HTTP headers instead of JSON instructions in the response body. This change helps simplify backend code and makes it more readable. The response body mechanism is still supported though, since it's more extensible and may be needed in rare cases (such as status code 304 with Apache).
For my use case, each client needs a separate channel which is short lived (they are generating a report which is unique and takes some time). Would pushpin have any problems with such a setup?
I would love to see an example ZeroMQ-based Ruby "web server" that can be used a backend for Pushpin to avoid the HTTP stack on the application layer.
I'm not much of a Ruby developer, but I just committed a Python example using the REQ/REP interface. It should be readable enough so you can get an idea of what's involved: https://github.com/fanout/pushpin/blob/master/tools/zhttpreq...
To activate the realtime stuff, you send the same Grip-* headers as you would with normal HTTP.
A word of caution: while this path is more optimized, it is super bare bones. As soon as you start doing anything advanced, you may find yourself wishing you were using a real web framework (I know, because this happened to me once already! haha).
The plan was to create a Rack-compatible injection point that uses ZMQ instead of HTTP which could be used with any of the standard Ruby frameworks, rather than getting too bare-bones.
I'm not sure whether there are any real wins here though.
Although my real use case is to take queries from Pushpin and put them directly into a persistent queue for processing by workers before them pushing the responses directly back at Pushpin so that we can do a zero-downtime deploy, even if the workers are down for up to 55 seconds (with long-polling).
Is Fanout.io just a (admittedly very affordable) hosted version of Pushpin?
Use Faye for simple JSON messaging to applications. Use Pushpin for developing APIs.