miguelfreitas / twister-html

twister HTML + Javascript User Interface
MIT License
229 stars 138 forks source link

Allow to configure RPC query interval #206

Open nitmir opened 9 years ago

nitmir commented 9 years ago

My instance of twister is on a remote server up 24/7 and I connect to it from a very slow connection. Actually, twister-html run a background RPC query before the last one return causing after a few minutes to completly sature my connection.

I would love to tell twister-html to only query in the backgourd every 10s or more, the best being to have an option to configure it.

miguelfreitas commented 9 years ago

Good idea! We may also integrate browser tab focus detection:

http://stackoverflow.com/questions/7389328/detect-if-browser-tab-has-focus

So query interval could have two values (with and without focus).

dryabov commented 9 years ago

What about merging subsequent requests into a single batch request (twister-core supports this way)?

Tschaul commented 9 years ago

As long as twisterd runs locally the polling is not much of a problem i think (don't know for mobile). If you are using a remote server, like nitmir, through twister-proxy the lame repeated polling could be done by the proxy on behalf of the client through a mechanism called long polling as i proposed in https://github.com/digital-dreamer/twister-proxy/issues/5

miguelfreitas commented 9 years ago

+1 for long polling. that's something i'd like to have implemented right from the start of twister (lame polling is simply stupid) but i had to get going so i didn't take any time to investigate.