IoT with MQTT pub-sub & Akka Actor Systems
Switch branches/tags
Nothing to show
Clone or download
Latest commit 8634e53 Mar 4, 2018
Permalink
Failed to load latest commit information.
.sbtserver Initial commit Apr 30, 2016
libexec Initial commit Apr 30, 2016
project Initial commit Apr 30, 2016
src Refactoring Mar 4, 2018
.gitignore Initial commit Apr 30, 2016
LICENSE Initial commit Apr 30, 2016
README.md Minor fix Mar 4, 2018
build.sbt Paho-akka libraryDependencies Jun 3, 2016

README.md

IoT & Akka Actor Systems


This is a Scala-based application to primarily illustrate how to build a scalable distributed worker system using Akka actors to service requests from a MQTT-based IoT (Internet of Things) system. A good portion of the Akka clustering setup is derived from Lightbend's Akka distributed workers template. For a quick walk-through of the application, please visit Genuine Blog.

UPDATE: An expanded version of this application with individual actors representing each of the IoT devices (each maintaining its own internal state and setting) is available in a separate repo.

To run the application within a single JVM on a web browser, simply proceed as follows:
  1. Git-clone the repo to a local disk
  2. Run 'bin/activator ui' from within the project root (Activator's UI will be fired off in a web browser)
  3. Click 'compile', then 'run' from within the Activator's UI
  4. Observe console output displayed on the web browser
To run the application on separate JVMs, please proceed as follows:

First, git-clone the repo to a local disk. Next, open up separate command line terminals and launch the different components on separate JVMs:

Launch the master cluster seed node with persistence journal:

$ {project-root}/bin/activator "runMain worker.Main 2551"

Launch additional master cluster seed node:

$ {project-root}/bin/activator "runMain worker.Main 2552"

Launch the IoTAgent-DeviceRequest node:

$ {project-root}/bin/activator "runMain worker.Main 3001"

Launch the Worker node:

$ {project-root}/bin/activator "runMain worker.Main 0"

Launch additional Worker node:

$ {project-root}/bin/activator "runMain worker.Main 0"