Edge Concept in IoT Messaging Framework
1. Definition
An Edge represents a logical or physical boundary in an IoT system where devices connect and data processing occurs. Edges provide organizational structure, processing capabilities, and contextual grouping for connected things.
2. Edge Code Pattern
Edge codes follow a standardized pattern to ensure consistency across implementations:
{type}-{region}-{number}
Components: - type: 2-4 character code representing the edge type - region: 2-4 character geographic or logical region identifier - number: 3-4 digit sequential identifier
Examples:
- prd-eu-001: Production environment in Europe
- ret-na-002: Retail location in North America
- bld-ap-003: Building in Asia Pacific
- veh-sa-001: Vehicle in South America
3. Standard Edge Types
| Type Code | Description | Example Use Cases |
|---|---|---|
| prd | Production environment | Factory floor, assembly line, processing plant |
| ret | Retail environment | Store, mall, distribution center |
| fld | Field deployment | Agricultural site, utility installation, remote station |
| bld | Building | Office, residential, educational facility |
| veh | Vehicle | Truck, train, ship, aircraft |
| mbl | Mobile deployment | Temporary installation, event setup |
| srv | Service infrastructure | Data center, server room, network hub |
Organizations can register custom edge types while maintaining the pattern.
4. Edge in Message Context
The edge is represented in message context:
"context": {
"thing_code": "sens-temp-001",
"thing_type": "sensor",
"edge": {
"code": "prd-eu-001",
"type": "production"
},
"location": {
"code": "room-101",
"path": "floor-1/north-wing/room-101",
"type": "office"
}
}
5. Edge-Location Relationship
Edges contain locations in a hierarchical relationship:
- An edge represents the overall deployment boundary
- Locations represent specific areas within an edge
- Location paths provide hierarchical context
- Things are associated with both an edge and a specific location
6. Topic Structure with Edges
Edge codes are incorporated into the topic structure for message routing:
{org_id}.{edge_code}.{thing_type}.{thing_code}.{message_type}
Example:
acme.prd-eu-001.sensor.sens-temp-001.event
7. Extension Mechanism
The edge concept can be extended through:
- Custom Edge Types: Register organization-specific edge types
- Edge Metadata: Store additional edge information in a registry
- Edge Properties: Add domain-specific properties to edge definitions
8. Edge Registry Example
{
"id": "018e7507-c547-7f43-9485-71c71b3b0447",
"code": "prd-eu-001",
"type": "production",
"description": "Manufacturing plant in Eastern Europe",
"metadata": {
"deployment_date": "2025-01-15",
"connection_type": "fiber",
"processing_capacity": "high"
},
"locations": [
{
"code": "floor-1",
"path": "floor-1",
"type": "production-floor"
},
{
"code": "room-101",
"path": "floor-1/north-wing/room-101",
"type": "office"
}
]
}
9. Best Practices
- Use consistent edge codes across your organization
- Create a central edge registry for discovery
- Define clear hierarchies for locations within edges
- Include edge information in message context when relevant
- Consider edge boundaries when designing security zones