[net2-wg] Proposal for dissemination structure and interfaces
Philip Levis
pal at cs.stanford.edu
Sun Dec 18 01:47:07 PST 2005
On Dec 17, 2005, at 6:03 PM, Kyle Jamieson wrote:
> This looks like a very well thought-out design. I have a few small
> questions as follows.
>
>> interface DisseminationValue <t> {
>> command const t* get();
>> event void changed();
>> }
>
> How about simplifying this down to
>
> interface DisseminationValue <t> {
> event void changed(const t*);
> }
The one issue here is that it requires the component above to store
the pointer in its frame. So let's say there's some configuration
parameter. Every component that wants to be able to access the
configuration parameter needs to store a pointer to it, which wastes
RAM.
> This is a nit-pick, but why not two configs, say DisseminatorC
> and DisseminationC, which each provide interface DisseminationUpdate
> and interface DisseminationValue, respectively? I guess the
> motivation behind this is clarity for users. Or, is there perhaps a
> situation where an app might use both DisseminationValue and
> DisseminationUpdate? (I can't think of one..)
This is an interesting point. There is a little trickiness in
managing the keyspace, but I think it could be possible. I don't have
a good reason why the two should be coupled, except it might be less
bug-prone in terms of keys. But it could also be less clear. I'm on
the fence.
> Question: is the reason for this ease of implementation? Or is there
> something in the interface that precludes large objects? (I can't see
> anything).
>
More so than ease of implementation, I think the goal is simplicity
of implementation. There are existing dissemination systems for many
different data object sizes, and they could all be put into a single
dissemination stack, but that would involve a lot of code. That is,
the reasoning isn't that implementing larger objects would be hard,
it might just waste code space and require more RAM. nesC's dead code
elimination would have trouble at this granularity, as it's only
based on call graphs and is flow/context insensitive.
> Just to clarify, you're saying that a dissemination version number is
> an (app version number, AM addr) pair?
I'm not sure what you mean by app version number.
Phil
-------
"We shall not cease from exploration
And the end of all our exploring
Will be to arrive where we started
And know the place for the first time."
- T. S. Eliot, 'Little Gidding'
More information about the net2-wg
mailing list