RJ / playdar-core

Playdar - a content resolver for music
http://www.playdar.org/
MIT License
192 stars 17 forks source link

Switch JSONP API to long polling #18

Closed jwheare closed 15 years ago

jwheare commented 15 years ago

I'm not sure there's a benefit to get_results returning quickly and needing to be polled. It's not providing any ETA feedback at any point, just how many results have come in so far, which is a bit meaningless.

It'd make much more sense from the client side to just have the request take as long as it needs to solve a query, or a specific timeout. The client could specify its own max timeout too.

RJ commented 15 years ago

this is done and supported in the new playdar.js

jwheare commented 15 years ago

As mentioned in channel there is now a major downside to this. Browsers limit the number of simultaneous connections per domain. In Firefox it's 6. This makes long responding single polls take much longer in aggregate than lots of very quick repeat polls. Might be worth revisiting this :/