[Tinyos-devel] Request for comments: TEP-118

Omprakash Gnawali gnawali at usc.edu
Tue Feb 5 09:55:15 PST 2008


On Feb 5, 2008 9:00 AM, Philip Levis <pal at cs.stanford.edu> wrote:
>
> On Feb 4, 2008, at 11:53 PM, Omprakash Gnawali wrote:
>
> >>> If multiple components can subscribe to updates for the same key,
> >>> how
> >>> will signaling the updates work?
> >>>
> >>
> >> As per nesC wiring rules, it would be a simple fan-out. There's no
> >> return value, so a combine function isn't needed.
> >>
> >
> > Should we then disallow (in the writeup) set or change from within
> > changed. Or maybe that is an obvious bad habit.
>
> Disallow might be too strong: strongly discourage makes more sense,
> explaining why. The worst case is you have 2+ components fighting for
> what the value should be. It would go like this:
>
> A changes value.
> update signaled
>    A handles event
>    B handles event, changes value
> update signaled
>    A handles event, sees it's different, changes value
>    B handles event, sees it's different, changes value
> update signaled
>    A handles event, sees it's different, changes value
>    B handles event, sees it's different, changes value
>
> etc., ad infinitum.
>

And here is one scenario that seems like a problem, but in my opinion
it is not a problem: In the first update, if A changes the value, by
the time B handles the update, the value has already changed but
losing updates like that is fine.

- om_p


More information about the Tinyos-devel mailing list