Skip to content

Comment on Show HN: Golongpoll – Go HTTP longpolling libraryparent

Comments

Websockets can be RESTful too. I've seen the following:

  GET /orders - fetch all orders
  GET /orders Upgrade: websocket - streaming view of all new orders
The problem with this type of RESTful integration though is the connection limit imposed by browsers. Of course, long poll has the identical problem. You can't long poll more than a couple endpoints.

True, you can use URI paths with WebSockets which at least makes the streams resource-oriented. CBIX does it: https://www.cbix.ca/api-websocket

I think calling this RESTful is a bit of a stretch though, at least in any conventional sense of what that means to people.

AboutSource Built by g1lg1l

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