Skip to content

senapatisantosh/AkkaDotnetTutorial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Akka.NET IoT Tutorial

A comprehensive learning repository demonstrating Akka.NET patterns for IoT device management at scale (10 to 1000 devices).

What You'll Learn

Pattern Description File
Actor Hierarchy Manager → Group → Device supervision tree Actors/
Mailbox FIFO message queue, priority mailbox, bounded mailbox akka.hocon
Routing RoundRobin, ConsistentHash, Broadcast pools Routing/
Event Sourcing Akka.Persistence with SQL journal + snapshots Persistence/
Streams Backpressure-aware telemetry pipelines Streams/
Pub/Sub Kafka (persistent) + Redis (real-time) integration PubSub/
Cluster Sharding Distribute device actors across nodes Coordination/
Cluster Singleton Fleet-wide monitoring coordinator Coordination/

Prerequisites

  • .NET 8 SDK
  • (Optional) Docker for Kafka and Redis

Quick Start

# Clone and build
git clone <this-repo>
cd AkkaDotnetTutorial
dotnet build

# Run the demo
dotnet run --project src/AkkaDotnetTutorial.Host

# Run tests
dotnet test

Project Structure

src/AkkaDotnetTutorial.Core/     ← All Akka.NET patterns (actors, routing, streams, etc.)
src/AkkaDotnetTutorial.Host/     ← Console app that wires everything together
tests/AkkaDotnetTutorial.Tests/  ← Unit tests with Akka.TestKit
docs/                            ← Detailed docs with Mermaid sequence diagrams

Documentation

Start with the Architecture Overview, then explore each pattern:

  1. Actor Hierarchy — supervision, registration, scatter-gather queries
  2. Routing Patterns — load distribution strategies
  3. Persistence & Event Sourcing — SQL journal, snapshots, recovery
  4. Pub/Sub with Kafka & Redis — cross-service messaging
  5. Akka Streams — backpressure pipelines for telemetry
  6. Cluster Sharding & Singleton — scaling across nodes
  7. Mailbox Deep Dive — message ordering, priority, types

Key Design Principles

  • Device agnostic — works with any IoT protocol (MQTT, CoAP, HTTP, BLE)
  • One actor per device — natural isolation, no shared mutable state
  • Graceful degradation — Kafka/Redis unavailable? System continues locally
  • Scale from laptop to cluster — same code, different configuration

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages