comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: high frequency time stamping (Was: Simple Components 4.12 with MQTT implementation released)
Date: Wed, 20 Apr 2016 10:48:05 +0200
Date: 2016-04-20T10:48:05+02:00	[thread overview]
Message-ID: <nf7fot$1pu1$1@gioia.aioe.org> (raw)
In-Reply-To: nf7cfa$mv8$1@dont-email.me

On 20/04/2016 09:55, Georg Bauhaus wrote:
> On 19.04.16 15:35, Dmitry A. Kazakov wrote:
>> On 19/04/2016 14:59, G.B. wrote:
>>> On 19.04.16 14:43, Dmitry A. Kazakov wrote:
>>>> It is a value and a time stamp, because data are oversampled. There is
>>>> no way a conventional OS could respond to each change at this rate.
>>>
>>> Is it possible to have a volatile variable T representing
>>> some point in time and a CAS discipline so that
>>>
>>> 1. there is one task that updates T at regular intervals and
>>>
>>> 2. another task that reads T for stamping items more frequently
>>>     than the first would write updates?
>>
>> It is an interesting question. Do you mean CAS = content-addressable
>> storage?
>
> Coincidence! While I'd expect the time storing variable to be located
> in some kind of privileged location, I had meant CAS to refer to some
> thread-safe update mechanism. I now notice that maybe mutex via volatile
> storage might already be in place.

The method I am using is of a lock-free blackboard. There is single 
producer that writes onto it without locking. Consumers scan the 
blackboard without locking starting from the last read position = 
sequence number. They detect losses through the sequence number going 
out of the bounds.

>   All of this would be based on the assumption that reading the time via
> system is much more costly than just reading a volatile variable,
> while perhaps adding a sequence number for ordering the stamped items
> within one time frame. Also separates problems and solutions, as you
> indicated. Nothing new, I guess.

When a bunch of oversampled values are read, their time stamps are 
reconstructed, if the hardware is unable to stamp the values. Then the 
values and stamps are written into the blackboard. So the consumers 
never need not to care of the way the data came there in first place.

>   (For a case at hand, the measuring devices will be collecting only
> about 10-200 signals/second, yet mustn't have their batteries emptied.)

Another user case is when the mobile network traffic must paid for. The 
producer usually filters out updates which are within the tolerance band 
in order to reduce the traffic. Everything is running in the push mode, 
of course.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de


  reply	other threads:[~2016-04-20  8:48 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-12 18:48 Simple Components 4.12 with MQTT implementation released Dmitry A. Kazakov
2016-04-14  8:54 ` slos
2016-04-14 10:07   ` Dmitry A. Kazakov
2016-04-14 13:01     ` slos
2016-04-14 16:19       ` Björn Lundin
2016-04-14 16:49         ` Dmitry A. Kazakov
2016-04-14 20:57           ` Björn Lundin
2016-04-14 21:29           ` slos
2016-04-14 21:20         ` slos
2016-04-15 11:29           ` Björn Lundin
2016-04-15 12:13             ` slos
2016-04-14 16:47       ` Dmitry A. Kazakov
2016-04-14 21:03         ` Björn Lundin
2016-04-14 21:30           ` slos
2016-04-15  8:01             ` Dmitry A. Kazakov
2016-04-15 10:06               ` slos
2016-04-15 11:12                 ` Björn Lundin
2016-04-15 15:05                 ` Dmitry A. Kazakov
2016-04-15 15:17                   ` slos
2016-04-15 15:34                     ` Dmitry A. Kazakov
2016-04-15 16:00                       ` slos
2016-04-15 16:39                         ` Dmitry A. Kazakov
2016-04-15 22:39                           ` slos
2016-04-15 15:47                   ` slos
2016-04-15 16:30                     ` Dmitry A. Kazakov
2016-04-15 22:18                       ` slos
2016-04-16  8:12                         ` Dmitry A. Kazakov
2016-04-16 17:48                           ` slos
2016-04-18 16:33                             ` Dmitry A. Kazakov
2016-04-19 11:51                       ` hanslad
2016-04-19 12:43                         ` Dmitry A. Kazakov
2016-04-19 12:59                           ` high frequency time stamping (Was: Simple Components 4.12 with MQTT implementation released) G.B.
2016-04-19 13:35                             ` Dmitry A. Kazakov
2016-04-20  7:55                               ` Georg Bauhaus
2016-04-20  8:48                                 ` Dmitry A. Kazakov [this message]
2016-04-19 13:43                           ` Simple Components 4.12 with MQTT implementation released hanslad
2016-04-19 16:39                             ` Dmitry A. Kazakov
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox