[Click] event notification in click

Eddie Kohler kohler at cs.ucla.edu
Tue Jan 30 14:44:23 EST 2007


Hi Vladimir,

Click has a couple ways to implement notification systems.  Probably the 
best, if you can make it work, would be the handler system.  Elements 
can easily communicate with EACH OTHER using handlers; this would 
mitigate your performance concerns somewhat.  I'd take a look at the 
Script element for an example of what can be done.  We've used Script 
elements to implement some not-insignificant control flows.

On your particular questions: There is no reason to avoid making a Click 
controller, but I would try to use existing mechanisms like handlers so 
that you could experiment with controllers outside of Click when 
required.  There are some event notification schemes in Click; aside 
from the Notifier system and handlers, take a look at AggregateNotifier, 
which is used by elements like AggregateIPFlows to inform other elements 
of when TCP/UDP flows are created and/or destroyed, and the IPMapper 
system, used by RoundRobinIPMapper in our NAT design.  I would NOT 
recommend using Packets for control notification.  Instead, use handlers 
or purpose-built interfaces like IPMapper/Notifier/AggregateNotifier. 
It is cleaner to leave packets as packets.

Eddie


Vladimir Bychkovsky wrote:
> Hi,
> 
> I would like to use Click to do automatic WiFi measurements (on
> embedded computers in cars). Click already has a lot of separate
> modules handling individual stages of the experiments ( 802.11 beacon
> collection, association, etc ).
> 
> My current plan is to implement a controller (as a separate element)
> to drive the experiment. However, such controller would need to
> receive notification messages from other elements. For example, it
> would need to be notified when authentication response is received.
> 
> Ideally, I would like to use an existing notification system. I think
> some publish/subscribe scheme would work very well in my case.
> 
> The only alternative that I could think of is using ClickChatter to
> notify an external controller process and using element handlers for
> control. However, I am afraid of this being too slow. One of the goals
> of this measurement system is to have low overhead. That is why I
> thinking about implementing the controller inside Click.
> 
> So, my questions are:
> 1) Are there any reasons why I should avoid creating a controller as
> an element in click? (I.e. is this a bad idea?)
> 2) Are there any event notification schemes for click out there?
> ( I only found was a NotifierQueue element, but that not exactly what
> I was looking for, since it is designed for data packets... )
> 3) Is it a bad style to use specially formatted Packets for control
> notification?
> 
> I am new to Click, so, any pointers/suggestions/correction are welcome.
> 
> Thanks in advance,
> Vlad.
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click


More information about the click mailing list