%% fig-alt: "Interest propagation in Directed Diffusion showing sink broadcasting interest that floods through network, nodes caching and rebroadcasting to establish gradients"
%%{init: {'theme': 'base', 'themeVariables': {'primaryColor': '#2C3E50', 'primaryTextColor': '#fff', 'primaryBorderColor': '#16A085', 'lineColor': '#16A085', 'secondaryColor': '#E67E22', 'tertiaryColor': '#ECF0F1', 'fontSize': '16px'}}}%%
sequenceDiagram
participant S as Sink
participant N1 as Node 1
participant N2 as Node 2
participant N3 as Node 3
participant SRC as Source
Note over S: Interest: "temperature > 30°C<br/>interval=20ms, duration=10s"
S->>N1: Interest broadcast
S->>N2: Interest broadcast
N1->>N2: Forward interest
N1->>N3: Forward interest
N2->>N3: Forward interest
N2->>SRC: Forward interest
N3->>SRC: Forward interest
Note over N1,SRC: All nodes cache interest<br/>Create gradients toward sink
Note over SRC: Source matches interest!<br/>(has temperature > 30°C)
438 WSN Routing: Directed Diffusion
438.1 Learning Objectives
By the end of this chapter, you will be able to:
- Explain Directed Diffusion Phases: Describe interest propagation, gradient establishment, and data delivery mechanisms
- Implement Data-Centric Routing: Design systems that route based on content attributes rather than node addresses
- Analyze Gradient Reinforcement: Understand how sinks optimize paths through positive and negative reinforcement
438.2 Prerequisites
Before diving into this chapter, you should be familiar with:
- WSN Routing Fundamentals: Understanding the classification and challenges of WSN routing
- Wireless Sensor Networks: Knowledge of WSN architecture and communication patterns
438.3 Introduction
Directed Diffusion is a foundational data-centric routing protocol that revolutionized how we think about routing in sensor networks. Rather than routing to specific node addresses, Directed Diffusion routes data based on its content, using a publish-subscribe paradigm where sinks express “interests” in data and sources respond with matching data.
Traditional internet routing: “Send this email to bob@192.168.1.50” - Router looks up address in routing table - Forwards packet toward destination address - Doesn’t care what’s inside the packet
Directed Diffusion (data-centric): “I want all temperature readings above 30°C from the northwest field” - Network floods this “interest” to all sensors - Sensors matching the interest send data back - Multiple paths form automatically - Network doesn’t need to know sensor addresses!
Key phases:
- Interest propagation: Sink broadcasts “I want X” everywhere
- Gradient setup: Each node records direction toward interested sink
- Data delivery: Matching sensors send data along gradients
- Reinforcement: Sink strengthens good paths, weakens bad ones
438.4 Directed Diffusion Protocol
Directed Diffusion uses three main phases: interest propagation, gradient establishment, and data delivery with reinforcement.
438.4.1 Interest Propagation
![Cambridge lecture slide showing directed diffusion interest propagation where sink floods interest query containing type=four-legged-animal, interval=20ms, duration=10s, rect=[-100,100,200,400], with nodes forwarding and caching interests to establish data collection paths](../images/cambridge-slide-110-interest-propagation.png)
Source: University of Cambridge, Mobile and Sensor Systems Course (Prof. Cecilia Mascolo)
The sink initiates data collection by flooding an interest message through the network.
Interest Structure:
Interest = {
type: "temperature",
interval: "20ms", // Desired data rate
duration: "10 seconds", // How long to report
rect: [-100, 100, 200, 400] // Geographic region
}
Interest Propagation Rules: 1. Sink broadcasts interest to all neighbors 2. Each node caches the interest 3. Nodes rebroadcast to their neighbors 4. Creates reverse path gradients toward sink
438.4.2 Gradient Establishment
As interests propagate, each node establishes gradients - directional records pointing toward the sink.
Gradient Properties: - Direction: Which neighbor sent the interest - Data rate: Requested sampling interval - Expiration: When interest times out
Multiple Gradients: - A node may have multiple gradients to same sink (via different neighbors) - Different paths can have different data rates - Enables multipath routing
%% fig-alt: "Gradient establishment diagram showing how node maintains gradients for different neighbors with data rates and expiration times pointing toward sink"
%%{init: {'theme': 'base', 'themeVariables': {'primaryColor': '#2C3E50', 'primaryTextColor': '#fff', 'primaryBorderColor': '#16A085', 'lineColor': '#16A085', 'secondaryColor': '#E67E22', 'tertiaryColor': '#ECF0F1', 'fontSize': '16px'}}}%%
graph TD
subgraph "Node A's Gradient Table"
SINK["Sink (Interest source)"]
GRAD1["Gradient 1:<br/>via Neighbor B<br/>Rate: 1 event/20ms<br/>Expires: 10s"]
GRAD2["Gradient 2:<br/>via Neighbor C<br/>Rate: 1 event/20ms<br/>Expires: 10s"]
DATA["Incoming Data<br/>from sources"]
end
DATA -->|"Forward via<br/>any gradient"| GRAD1
DATA -->|"Alternative<br/>path"| GRAD2
GRAD1 -->|"Path 1"| SINK
GRAD2 -->|"Path 2"| SINK
style SINK fill:#E67E22,stroke:#2C3E50,stroke-width:3px,color:#fff
style GRAD1 fill:#16A085,stroke:#2C3E50,stroke-width:2px,color:#fff
style GRAD2 fill:#3498DB,stroke:#2C3E50,stroke-width:2px,color:#fff
style DATA fill:#2C3E50,stroke:#16A085,stroke-width:2px,color:#fff
438.4.3 Data Delivery
When a source has data matching an interest, it sends data along established gradients.
Data Delivery Process: 1. Source generates matching data 2. Sends data along all gradients (initially) 3. Data propagates hop-by-hop toward sink 4. Each intermediate node forwards based on its gradients
Two-Phase Data Delivery: 1. Exploratory phase: Low-rate data along all gradients to discover paths 2. Reinforced phase: High-rate data along best path(s) after sink reinforces
438.4.4 Gradient Reinforcement

Source: University of Cambridge, Mobile and Sensor Systems Course
The sink can reinforce preferred paths by sending reinforcement messages.
Positive Reinforcement: - “Send me data faster via this path” - Increases gradient data rate - Used for good-quality, low-latency paths
Negative Reinforcement: - “Slow down or stop on this path” - Decreases gradient data rate - Used for poor or redundant paths
%% fig-alt: "Gradient reinforcement process showing sink receiving data via multiple paths, evaluating quality, and reinforcing the best path while letting others expire"
%%{init: {'theme': 'base', 'themeVariables': {'primaryColor': '#2C3E50', 'primaryTextColor': '#fff', 'primaryBorderColor': '#16A085', 'lineColor': '#16A085', 'secondaryColor': '#E67E22', 'tertiaryColor': '#ECF0F1', 'fontSize': '16px'}}}%%
sequenceDiagram
participant SRC as Source
participant P1 as Path 1 (fast)
participant P2 as Path 2 (slow)
participant SINK as Sink
Note over SRC,SINK: Phase 1: Exploratory data (low rate)
SRC->>P1: Data (rate: 1/20ms)
SRC->>P2: Data (rate: 1/20ms)
P1->>SINK: Data arrives (latency: 50ms)
P2->>SINK: Data arrives (latency: 200ms)
Note over SINK: Evaluate paths:<br/>Path 1 better (lower latency)
SINK->>P1: REINFORCE (rate: 1/5ms)
Note over SRC,SINK: Phase 2: Reinforced data (high rate)
SRC->>P1: Data (rate: 1/5ms)
Note over P2: Gradient expires<br/>(not reinforced)
438.4.5 Protocol Benefits
1. Robustness: - Multiple paths exist naturally - Path failure leads to use of alternative gradient - No explicit route repair needed
2. Data Aggregation: - Intermediate nodes can aggregate data - Reduces redundant transmissions - Enabled by data-centric naming
3. Energy Efficiency: - Reinforcement focuses traffic on good paths - Weak paths expire naturally - In-network processing reduces transmissions
4. Adaptivity: - New interests can be issued anytime - Network adapts to changing conditions - No global topology knowledge needed
438.5 Summary
Directed Diffusion introduced key concepts that influenced many subsequent WSN routing protocols:
Key Takeaways:
- Data-Centric Routing: Route based on content attributes, not node addresses
- Interest Propagation: Sinks broadcast queries that establish reverse-path gradients
- Gradient-Based Forwarding: Data follows gradients back toward interested sinks
- Two-Phase Pull: Exploratory phase tests paths, reinforcement phase optimizes
- Adaptive Path Selection: Empirical path quality determines routing, not theoretical metrics
438.6 What’s Next?
The next chapter explores Data Aggregation techniques that work with data-centric routing to reduce transmissions and save energy.
Continue to Data Aggregation →
- WSN Routing Fundamentals - Overview of WSN routing challenges and classification
- WSN Routing: Data Aggregation - In-network data processing techniques
- WSN Routing: Link Quality - RSSI, WMEWMA, and MIN-T metrics
- WSN Routing: Trickle Algorithm - Network reprogramming protocol
- WSN Routing: Labs and Games - Hands-on practice and interactive simulations