IoT service - JavaScript or Java

This example comes from the wireless mesh space. Customers can purchase devices to install in their homes that they can control from anywhere. When the example service is deployed to Akka Serverless, you can interact with devices, assign them to different rooms in the house, and turn them on or off. You can even connect to a physical LIFX bulb and use the service to switch it on or off.

Available in Java and JavaScript, the example demonstrates Event Sourced Entities and shows how a service can publish events to external systems, such as Google Cloud Pub/Sub new tab.

Prerequisites for building and deploying

Before starting the example, make sure that you have the following:

  • An Akka Serverless account

  • The akkasls CLI

  • For the Java example:

    • Java 8 or higher

    • Maven 3.x or higher

  • For the JavaScript example:

    • The Node JavaScript Package Manager (npm)

    • Node.js 14 or higher

  • The Docker CLI

  • Optional, a service account new tab that can connect to Google Cloud Pub/Sub and/or a LIFX bulb for demonstration purposes. If you don’t have Google Pub/Sub, you can still exercise the example, but some features won’t work.

Next, learn how the example was created.