A New Rule - Basic Requirements Will Get You at Most A 9, If You Want 10, Do An Additional

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

Below you can find the tasks for the 1st laboratory work, that is due on March 18th.

Step 1 - Either design your own Actor Model system in your language of choice, note that
libraries that do that already, like Akka or Vertx or whatever, are forbidden, on the other
hand, libraries that provide you with lightweight threading are fine; or, you can learn Elixir
and do the lab in it. Just as last semester, choose a language and do both labs in it.

Step 2 - You have to `docker pull alexburlacu/rtp-server` and launch it, don't forget to
forward the port 4000. The running server will send a stream of SSE with JSON messages
containing readings from 10 sensors (light, wind speed, humidity, atmospheric pressure and
temperature, and the timestamp when the event was sent). Your task is to create a system
that will convert these readings into a weather forecast that will be updated every 5
seconds. The rule on how to compute the forecast can be found on `/help` route of the
running server.
The basic requirements are:
- Process events as soon as they come
- Have a group of workers computing the weather forecast and a supervisor
- Dynamically change the number of actors (up and down) depending on the load
- In case of a special `panic` message, kill the worker actor and then restart it
- Have the results (weather forecast and average values for the metrics) pretty-printed to
the console
- The code must be published on Github, otherwise, the lab will not be accepted + please do
put it into a container, so I or anyone else can run it locally without much hassle
- Remember the single responsibility principle, in this case - one actor/group of actors per
task -> use a different actor for collecting data, creating the forecast, aggregating results,
pretty-printing  to console, anything else

Additional/Optional tasks:
- Make it possible to select the update interval, for example, 1 second, 1 minute, 2 minutes,
5 minutes, and so on
- Create a Web UI with a graph of how the metrics change every quantum of time and with
the updated weather forecast
- Using existing weather data, try to normalize the results of the system, for example, given
the date and the location
- Have an additional actor responsible for writing the data into a database/log storage
- Use your imagination and come up with something nice

As of the last semester, in case you miss the deadline, do an additional task in order not to
lose a point from your lab's grade.
A new rule - basic requirements will get you at most a 9, if you want 10, do an additional
task. Let the hunger games begin.

You might also like