Re: [streams] Real time source and skipping (#383)

Ok, lets back up a second and just examine one case.

> Another use case of a real-time push source and skipping intermediate values but the latest, would be a "stream of cursor positions". If I wasn't able to listen to positions for a bit, I don't care where it was during that time, I only care where it is now, but I also don't want to wait to know that until the cursor moves again. Makes sense?

This "real-time push source" presumably uses controller.enqueue() to add sensor readings at a pre-determined sample rate.  Are you saying you want this thing to ignore backpressure (available in controller.desiredSize) and just queue things up?  But then also don't want those values you just queued up?

It seems to me this source should respect back pressure and let the consumer determine the rate of sampling.

Similarly, if you have a push source for video you can throw away frames at the controller if the stream pipeline is applying back pressure.

Or can you provide some pseudo code describing what you want?  It feels like there are some conflicting requirements for ignoring back pressure at some stages, but requiring precise rates at others.

---
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/issues/383#issuecomment-126441711

Received on Thursday, 30 July 2015 19:08:06 UTC