No description, website, or topics provided.
Scala JavaScript HTML CSS
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Reactive Solar Farm Monitor


Reactive Solar Farm Monitor is a sample application which is implemented on Typesafe Reactive Platform.

What is Reactive Systems?

Reactive Systems satisfy all of the following requirements:

  • Keep the system response quick and provide high usability
  • Uptime close to 100% as possible
  • Scale-out and Scale-in are easy when workload fluctuates

Please refer to The Reactive Manifesto for details.

What is Typesafe Reactive Platform?

Typesafe Reactive Platform is a Platform for Building Message-Driven, Elastic, Resilient and Responsive Applications Leveraging the Java Virtual Machine.

To help developers build Reactive applications on the JVM, Typesafe has brought together the Play Framework, a runtime called Akka, and the Scala language under a unified platform.

Please refer to Typesafe Reactive Platform for details.

What is Reactive Solar Farm Monitor?

This sample application is a failure detection system of solar panels in the "Solar Farm" (photovoltaic power plant).

It is assumed that Solar farm has tens of thousands of solar panels, and each panel has the measuring device which successively measures and send the amount of power generation. This application calculates the mean value of amounts of power generation of all solar panels, and compares the each amount of power generation with the mean value. If the value has fallen below the mean significantly, the application regards the solar panel as failure.


Also, the system has the following requirements.

  • I want to detect failures of solar panels with in 1 second after failure, to improve generation efficiency.
  • I want to achieve 100% uptime to no time lag after detect failures.
  • I can scale-out the system, if solar panels increase


This sample application uses Typesafe Reactive Platform, and adopts Message-driven architecture.




Get Started

Use Docker

Execute the following commands on the PC which has already been installed Docker.

docker run -d --name=broker                                    crowbary/apache-apollo
docker run -d --name=solar_farm_simulator --link=broker:broker crowbary/reactive-solar-farm-monitor-solar-farm-simulator
docker run -d --name=monitor -p 9000:9000                      crowbary/reactive-solar-farm-monitor
docker run -d --name=analyzer_seed  --link=broker:broker --link=monitor:primary_seed                                      crowbary/reactive-solar-farm-monitor-analyzer
docker run -d --name=analyzer_node1 --link=broker:broker --link=monitor:primary_seed --link=analyzer_seed:secondary_seed  crowbary/reactive-solar-farm-monitor-analyzer
docker run -d --name=analyzer_node2 --link=broker:broker --link=monitor:primary_seed --link=analyzer_seed:secondary_seed  crowbary/reactive-solar-farm-monitor-analyzer

Access to http://[DOCKER_HOST]:9000/ from Web browser

  • DOCKER_HOST: The IP address of a host on which you executed "docker run" commands.

You can add any number of Analyzer nodes. Execute the following command to add an Analyzer node.

docker run -d --link=broker:broker --link=monitor:primary_seed --link=analyzer_seed:secondary_seed  crowbary/reactive-solar-farm-monitor-analyzer

Use sbt

1. Before running

(1) Install sbt

Follow the instructions on Mac, Windows, or Linux to install

(2) Install Apache Apollo
  • Download the distribution archive from Apache Apollo's site
  • Extract the distribution archive to ${APOLLO_HOME}
  • Create Broker Instance on ${APOLLO_EXEC}
${APOLLO_HOME}\bin\apollo create mybroker
(3) Install Bower
  • Install Node.js
  • Install Git
    • If you use Windows, you need to available Git commands by checking "Use Git from the Windows Command Prompt" on "Adjusting your PATH environment"
  • Install Bower
npm install -g bower

2. Create a project and run

(1) Create a project
git clone
cd  reactive-solar-farm-monitor
bower install
(2) Run Broker
${APOLLO_EXEC}\mybroker\bin\apollo-broker run
(3) Run Simulator
sbt solarFarmSimulator/run
(4) Run Analyzer

Requires at least two nodes

sbt analyzer/runNode1
sbt analyzer/runNode2

If you need additional nodes can run to four

sbt analyzer/runNode3
sbt analyzer/runNode4
(5) Run Monitor
sbt run

3. Check the application

Access to http://localhost:9000/ from Web browser


Please send feedback to us.

TIS Inc.
System Development Technology R&D Office
Reactive Systems consulting team

TIS provides a consulting service about Typesafe Reactive Platform. Please refer to the our site(Japanese site) for details.


This application is released under the Apache License version2.0. The Apache License version2.0 official full text is published at this link.

  • All company names and product mentioned are trademarks or registered of the respective companies.
  • Icon made by Freepik from is licensed under CC BY 3.0

Copyright © 2015 TIS Inc.