W3C home > Mailing lists > Public > public-device-apis-log@w3.org > March 2017

Re: [sensors] Batching API for sensor readings

From: Mikhail Pozdnyakov via GitHub <sysbot+gh@w3.org>
Date: Mon, 20 Mar 2017 20:47:29 +0000
To: public-device-apis-log@w3.org
Message-ID: <issue_comment.created-287892653-1490042848-sysbot+gh@w3.org>
Recently I studied the possible ways how to implement reliable delivery of sensor readings received at the rate higher than the current frame rate
(https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/35QSwrRazKY ).

>From what I learned, the only feasible way is to collect readings and make batches on platform side (in the same context where these readings were obtained) and then send the fulfilled batches to JS side consequently and making sure nothing is missed. This approach implies a **significant** latency.

On the other hand the existing Sensor API is designed to fetch the most recent data with minimal latency, so it looks quite problematic to integrate both approaches in the same API.

This means that batching API should be split from the existing Sensor API (`onchange` + getters) as these two will be implemented differently: we need either to extend the `Sensor` interface with new methods or maybe it is better to have a separate `SensorWatcher` interface.

-- 
GitHub Notification of comment by pozdnyakov
Please view or discuss this issue at https://github.com/w3c/sensors/issues/171#issuecomment-287892653 using your GitHub account
Received on Monday, 20 March 2017 20:47:35 UTC

This archive was generated by hypermail 2.3.1 : Monday, 23 October 2017 12:18:52 UTC