Commit 51c5aa1
authored
Data flow graph public preview (#136)
# Azure IoT Operations Data Flow Graphs: WASM Development (Public
Preview)
## Overview
This PR introduces **Azure IoT Operations Data Flow Graphs** - a
powerful new capability for real-time data processing using WebAssembly
(WASM) modules. This public preview enables developers to build custom
data processing pipelines using Rust and Python, with support for
complex workflows including branching, filtering, aggregation, and
machine learning inference.
## 🚀 Key Features
### **Multi-Language WASM Development**
- **Rust SDK**: Full-featured SDK with procedural macros, logging,
metrics, and state store APIs
- **Python Support**: componentize-py integration with generated
bindings
- **Docker Builders**: Streamlined containerized build environments for
both languages
- **Local Development**: Complete toolchain support for native
development workflows
### **Rich Operator Types**
- **Map**: Transform data (unit conversion, format changes)
- **Filter**: Conditional data filtering based on predicates
- **Branch**: Route data to different paths based on conditions
- **Accumulate**: Time-windowed aggregation and statistics
- **Delay**: Control timing and batch processing
- **Source/Sink**: Integration with external systems
### **Production-Ready Architecture**
- **Timely Dataflow**: Built on Microsoft Research's proven
computational model
- **Event-Time Semantics**: Process data based on when events occurred
- **Hybrid Logical Clock**: Ensures causal ordering and progress
guarantees
- **Fault Tolerance**: Built-in support for handling failures and
ensuring data consistency
## 📁 What's Included
### **Sample Applications**
- graph-simple.yaml - Basic temperature conversion pipeline
- `graph-complex.yaml` - Multi-sensor processing with ML inference
- **10+ Rust Examples**: Temperature, humidity, image processing, data
enrichment
- **Python Examples**: Map, filter, branch operators with complete
implementations
### **Development Tools**
- **Docker Builders**:
- `ghcr.io/azure-samples/explore-iot-operations/rust-wasm-builder`
- `ghcr.io/azure-samples/explore-iot-operations/python-wasm-builder`
- **GitHub Actions**: Automated builder image publishing
- **WIT Schema**: Complete WebAssembly Interface Type definitions
### **Sample Data & Assets**
- Temperature and humidity sensor payloads
- Sample images for computer vision workflows
- Pre-trained ONNX models (MobileNet, SqueezeNet)
## 🔧 Technical Highlights
### **Rust Development**
```rust
#[map_operator(init = "temperature_converter_init")]
fn temperature_converter(input: DataModel) -> DataModel {
// Transform Fahrenheit to Celsius with full type safety
}
```
### **Python Development**
```python
class Map(exports.Map):
def process(self, message: types.DataModel) -> types.DataModel:
# Process data with generated type bindings
```
### **Graph Configuration**
```yaml
operations:
- operationType: "map"
name: "temperature/map"
module: "temperature:1.0.0"
```
## 🛠️ Build & Deploy
**Docker Builds (Recommended)**:
```bash
# Rust
docker run --rm -v "$(pwd):/workspace" ghcr.io/azure-samples/explore-iot-operations/rust-wasm-builder --app-name my-module
# Python
docker run --rm -v "$(pwd):/workspace" ghcr.io/azure-samples/explore-iot-operations/python-wasm-builder --app-name my_module --app-type map
```
**Local Development**: Full support for native Rust/Python toolchains
with registry configuration
## 📊 Impact
- **81 files changed, 10,835 insertions**: Comprehensive feature
implementation
- **Production-ready**: Based on proven academic research and production
systems
- **Developer-friendly**: Multiple language support with excellent
tooling
- **Scalable**: Distributed processing with automatic coordination
## 🔗 Integration
This feature integrates with:
- **Azure IoT Operations**: Native deployment and management
- **Azure Container Registry**: WASM module and graph storage
- **Kubernetes**: Arc-enabled cluster deployment
- **ORAS**: OCI artifact distribution
## 📚 Documentation
- Comprehensive README with quick start guide
- Complete Rust and Python development guides
- Docker builder documentation
- Sample workflows and deployment instructions
## ✅ Testing
- All Docker builders tested and validated
- GitHub Actions workflows for automated publishing
- Sample modules verified with both build methods
- End-to-end validation completed1 parent 19a3793 commit 51c5aa1
File tree
81 files changed
+10835
-0
lines changed- .github/workflows
- docker/wasm-rust-build
- samples/wasm
- data-and-images
- data
- images
- python
- examples
- branch
- filter
- map
- schema
- rust
- examples
- collection
- src
- enrichment
- src
- format
- src
- humidity
- src
- snapshot
- src
- fixture
- labels
- models
- temperature
- src
- window
- src
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
81 files changed
+10835
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
0 commit comments