(English/Japanese)
Reactive Solar Farm Monitor is a sample application which is implemented on Typesafe Reactive Platform.
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.
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.
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.
Execute the following commands on the PC which has already been installed Docker.
docker run -d --name=broker -p 61613:61613 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=analyzer -p 2551:2551 --link=broker:broker crowbary/reactive-solar-farm-monitor-analyzer
docker run -d --name=monitor -p 9000:9000 --link=analyzer:analyzer crowbary/reactive-solar-farm-monitor
Access to http://[DOCKER_HOST]:9000/ from Web browser
- DOCKER_HOST: The IP address of a host on which you executed "docker run" commands.
- Requirements: JDK6+
- Download the package from Typesafe Activator's site'
- Extract the package and add Activator to your PATH
- Download the distribution archive from Apache Apollo's site
- Extract the distribution archive to ${APOLLO_HOME}
- Create Broker Instance on ${APOLLO_EXEC}
cd ${APOLLO_EXEC}
${APOLLO_HOME}\bin\apollo create mybroker
- Refer to here
- 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
activator new reactive-solar-farm-monitor reactive-solar-farm-monitor
cd reactive-solar-farm-monitor
bower install
${APOLLO_EXEC}\mybroker\bin\apollo-broker run
activator solarFarmSimulator/run
activator analyzer/run
activator run
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 www.flaticon.com is licensed under CC BY 3.0
Copyright © 2015 TIS Inc.