Doodle3D / Doodle3D-API

Doodle3D API for communication with the Doodle3D WiFi-Box
1 stars 0 forks source link

Add throttle mechanism? #10

Open casperlamboo opened 9 years ago

casperlamboo commented 9 years ago

To prevent crashing of the small webserver on the WiFi-Box it might be interesting to look into a throttle mechanism for all rest calls. This could queue requests that come in to quickly after a prev request. Finding a way to give priority to some calls would also be important, to prioritize print calls for example.

peteruithoven commented 9 years ago

http://stackoverflow.com/questions/23072815/throttle-javascript-function-calls-but-with-queuing-dont-discard-calls

http://jsfiddle.net/dandv/47cbj/

There seem to be several relevant packages on NPM: https://www.npmjs.com/search?q=Rate+Limit+