Show HN: Heartbeat – Transform REST Endpoints to Streaming APIs
heartbeat.appbase.io
heartbeat.appbase.io
Might want to fix the Heartbeat icon link by the way, it currently links to https://heartbeat.appbase.io/heartbeat.appbase.io
As I get it, it's basically a way to keep request rates low.
Rather than every client polling your server every minute (which can be quite heavy), only one (Heartbeat) does, and the rest just subscribe to Heartbeat streams.
Totally makes sense if you haven't planned a pubsub-based API but notice that your RESTful one is close to being hammered into a pulp - so you need something to give to your clients, fast. But I don't think it make much sense as a long-term solution.
In fact, we would like to enable:
1. A lambda function support to transform APIs (diffing to only append new data, adding meta data, removing unnecessary fields) before they get streamed.
2. Polling frequencies of up to 1s.
3. Custom domains for the resulting streaming endpoints.
https://github.com/nextorigin/sseries-of-tubes
Pretty fast for you guys to turn it into a service already. What are you using on the backend? Node makes it really easy.
Not to mention HTTP identifies the resource by path in the URI, and easily routes right through proxies. TCP is not nearly that accessible.
Another thing to know about APIs is that the endpoints tend to be resource-oriented, and resources are often abstractions. For example, when you interact with Twitter's streaming API, no doubt there are some pubsub mechanisms going on behind the scenes, but pubsub concepts such as publishers, subscribers, brokers, topics, messages, store-and-forward, etc are hidden away by the API. You just fetch a resource and get tweets.
My feeling is that the most successful protocols used in APIs are going to be those that expose very little about the inner workings or topology of the server and other client entities.
Specific protocols have their merits, but they can only really compete in the backend-to-backend space, and even there they have to compete against HTTP endpoints. In anything that can be construed as vaguely front-end, HTTP has a massive first mover advantage with the ecosystem it brings.
Also I wonder why there are not more websocket-based APIs. WS has the same widespread support and ready-made debug tools as HTTP and seemed to be designed exactly for push or non request/response use cases. So, out of couriosity, why would SSE be prepared over WS?
If any mods could delete this, I'd be grateful.
Also I wonder why there are not more websocket-based APIs. WS has the same widespread support and ready-made debug tools as HTTP and seemed to be designed exactly for push or non request/response use cases. So, out of couriosity, why would SSE be preferred over WS?
"Legacy proxy servers are known to, in certain cases, drop HTTP connections after a short timeout. To protect against such proxy servers, authors can include a comment line (one starting with a ':' character) every 15 seconds or so."
[1] http://streamdata.io/blog/push-sse-vs-websockets/
[2] https://html.spec.whatwg.org/multipage/comms.html#authoring-...
In any way though, thanks for the links. I haven't given them a deep read yet but will definitely do so soon.
Please, don't turn it into some kind of SAAS, that would ruin everything. I'd be willing to pay a license fee on a stand-alone app, not a monthly fee on a tool I'd use once every few months.
Trying to arrange a polling-in-sixty-seconds universal-protocol in a .. well.
A polling loop is 4-5? I guess that's everything minus the WEB Gui.
A latent benefit of Heartbeat (which we will start emphasizing soon) is an ability to filter the incoming stream of events by the JSON data properties, so one can build nice IFTTT style code using any REST based APIs as sources. We are leaning towards creating a monthly and a longer-term pricing plan, but if your use-case is casual, then it will always be free. We are able support the current load of requests with a single worker process.
1. Source API endpoint - Heartbeat fetches the data using the authentication supported by the source API (basic auth, security token in headers, URL query strings for example).
2. Heartbeat transformed endpoint - This is accessible over an HTTPS endpoint and is secured with a basic auth username:password key. As long as you use it within a secure environment (server code, or an internal network), there should be no problems. If you use it within a web app that's distributed to other users, they can see the key. However, this key is read-only and we will allow generating a new key from within the dashboard shortly.
Is that different from http://streamdata.io/ ?