Welcome to the code samples repository for my 'Drinking a river of IoT data with Akka.NET' talk.
You can find all slides for my talk in the slides folder.
The sources in this repository holds 2 command line applications:
- AkkaDotNet.SensorData.ActorSystemHost: An application with a sample ActorSystem that processes Meter readings and generates alerts when certain thresholds are exceeded.
- AkkaDotNet.SensorData.MessageGenerator: An application that generates fake data, as if it came from real life sensors, and sends it to the 'ActorSystemHost' via Akka.Remote.
- Clone this repo
- Create 2 SQL databases. I used 'AkkaPersistence' and 'SensorData' on the localDB instance
- Run the SQL script found in scripts/CreateSensorDataDB.sql on the DB you plan to use for sensor data and alert configurations.
- Adjust Connectionstrings in:
- src/AkkaDotNet.SensorData.ActorSystemHost/appsettings.json (SensorData)
- src/AkkaDotNet.SensorData.ActorSystemHost/akka.conf (AkkaPersistence, 2x)
- Set both Console applications as Startup projects
- Run the code
- Type 'start' in the message generator
- Place some breakpoints, see what happens.
Since the message generator starts from a random number, you will need to clear both database if you restart it, or you will end up with bogus data.