Skip to content

Comment on Templar: A proxy to improve HTTP API interactions

Comments

Based on the first sentence of the description, I was expecting a proxy that added callback support to arbitrary APIs. I hit "https://my-templar-proxy/?real_url=$x&real_param_a=10&callba..., it hits the real API and waits for the response, then hits my callback with it.

I feel like that might be more useful than what appears to be just a special-purpose varnish/squid

Author here! That's certainly an interesting feature that could be added. I have on the future list to support sending responses back via AMQP. Your callback scheme isn't much different than that.

Congrats on the announcement. Templar looks like a great project.

Re AMQP, I want to mention that our Zurl project does something similar, but with ZeroMQ. It leads to some interesting possibilities: http://blog.fanout.io/2014/02/18/fun-with-zurl-the-http-webs...

Zurl is not an HTTP proxy though, but a ZeroMQ gateway. Templar with async responses would be much more generally useful to HTTP developers.

I agree, async responses are a great tool. It's a question of figuring out a good way of delivering them back to the client. Another option is a long poll endpoint within Templar that it can deliver a stream of responses on. AMQP is an easy option because it keeps Templar simple.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.