12.07.2015 Views

The ns Manual (formerly ns Notes and Documentation)1 - NM Lab at ...

The ns Manual (formerly ns Notes and Documentation)1 - NM Lab at ...

The ns Manual (formerly ns Notes and Documentation)1 - NM Lab at ...

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 20Directed Diffusion<strong>The</strong> directed diffusion module in <strong>ns</strong> has been ported from SCADDS group’s implement<strong>at</strong>ion of directed diffusion <strong>at</strong> USC/ISI.<strong>The</strong>re is an older version of diffusion in <strong>ns</strong> th<strong>at</strong> was implemented several years back <strong>and</strong> has become rel<strong>at</strong>ively old <strong>and</strong>outd<strong>at</strong>ed. This older version can be found under directory diffusion. And the newer version of diffusion resides under~<strong>ns</strong>//diffusion3. This chapter talks about the newer diffusion model in <strong>ns</strong>. <strong>The</strong> module <strong>and</strong> methods described here canbe found under ~<strong>ns</strong>/tcl/lib/<strong>ns</strong>-diffusion.tcl, <strong>ns</strong>-lib.tcl <strong>and</strong> all relevant C++ code can be found under ~<strong>ns</strong>/diffusion3. Visit theSCADDS group webpage <strong>at</strong> http://www.isi.edu/scadds for details about their implement<strong>at</strong>ion.20.1 Wh<strong>at</strong> is Directed Diffusion?Directed Diffusion is a method of d<strong>at</strong>a dissemin<strong>at</strong>ion especially suitable in distributed se<strong>ns</strong>ing scenarios. It differs from IPmethod of communic<strong>at</strong>ion. For IP “nodes are identified by their end-points, <strong>and</strong> inter-node communic<strong>at</strong>ion is layered onan end-to-end delivery service provided within the network”. Directed diffusion, on the other h<strong>and</strong> is d<strong>at</strong>a-centric. D<strong>at</strong>agener<strong>at</strong>ed by se<strong>ns</strong>or nodes are identified by their <strong>at</strong>tribute-value pair. Sinks or nodes th<strong>at</strong> request d<strong>at</strong>a send out “interest”s intothe network. D<strong>at</strong>a gener<strong>at</strong>ed by “source” nodes th<strong>at</strong> m<strong>at</strong>ch these interests, “flow” towards the sinks. Intermedi<strong>at</strong>e nodes arecapable of caching <strong>and</strong> tra<strong>ns</strong>forming d<strong>at</strong>a. For details on directed diffusion, see “Directed Diffusion: A Scalable <strong>and</strong> RobustCommunic<strong>at</strong>ion Paradigm for Se<strong>ns</strong>or Networks”, authored by Chalermek Intanagonwiw<strong>at</strong>, Ramesh Govindan <strong>and</strong> DeborahEstrin th<strong>at</strong> appeared in MobiCOM, August 2000, Boston, Massachusetts. This <strong>and</strong> other diffusion rel<strong>at</strong>ed papers can beviewed <strong>at</strong> http://www.isi.edu/scadds/public<strong>at</strong>io<strong>ns</strong>.html under public<strong>at</strong>io<strong>ns</strong> section.20.2 <strong>The</strong> diffusion model in <strong>ns</strong><strong>The</strong> directed diffusion model co<strong>ns</strong>ists of a core diffusion layer, a diffusion library provides an applic<strong>at</strong>ion programminginterface for overlying diffusion applic<strong>at</strong>io<strong>ns</strong> <strong>and</strong> finally the applic<strong>at</strong>ion layer which includes both diffusion applic<strong>at</strong>io<strong>ns</strong> <strong>and</strong>filters. <strong>The</strong> core diffusion layer is used to receive/send out packets from/into the network. <strong>The</strong> library provides a interfacefor the overlying applic<strong>at</strong>ion classes for publishing/subscribing etc. <strong>The</strong>se APIs have been described in details in a documentcalled Network Routing API 8.0 <strong>and</strong> can be found <strong>at</strong> http://www.isi.edu/scadds/public<strong>at</strong>io<strong>ns</strong>.html underAPIs section. In the following paragraphs we are going to describe how the diffusion model looks like in <strong>ns</strong>.First we start with a brief description of the diffusion3 directory structure. If the reader wishes to examine the C++ coderel<strong>at</strong>ed to NS Diffusion th<strong>at</strong> underpi<strong>ns</strong> the OTcl script comm<strong>and</strong>s, it may be found in ~<strong>ns</strong>/<strong>ns</strong>/diffustion3.ăHere is a summaryby subdirectory:194

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!