Challenging project of the Rules and Events Based System discipline
- From the command line:
Java -version (to check the Java version)
- If it's Java8, ok!
- Otherwise, it is necessary to install...
- Kafka download, on google:
- Download the latest version (binaries)
- Unzip in some directory
- From the command line, go to the directory and try:
bin/kafka-topics.sh
- If a list of options appears, installation is ok!
- Otherwise check Java version
- Add Kafka to PATH (example)
- Open the “bashrc” file for editing
- Add at the end the line: export PATH=/your_path/Kafka_2XXXX/bin:$PATH
- Open a new terminal
- Try:
kafka-topics.sh
- If a list of options appears, installation is ok!
-
Create the directories “/your_path/data”, “/your_path/data/zookeeper” and “/your_path/data/kafka”
-
Edit Zookeeper and Kafka configs, using text editor
- zookeeper.properties: dataDir=/your_path /data/zookeeper
- server.properties: log.dirs=/your_path/data/kafka
- Start Zookeeper in a terminal window:
zookeeper-server-start.sh config/zookeeper.properties
- Start Kafka in another window:
kafka-server-start.sh config/server.properties
- Na linha de comando:
Java -version (para verificar a versão de Java)
- Se for Java8, ok!
- Caso contrário, é necessário instalar...
- Kafka download, no google:
- Faça download da última versão (binários)
- Descompactar em algum diretório
- Na linha de comando, vá para o diretório e tente:
bin/kafka-topics.sh
- Se aparecer uma lista de opções, instalação está ok!
- Caso contrário, verificar versão do Java
- Adicionar Kafka ao PATH (exemplo)
- Abrir o arquivo “bashrc” para edição
- Acrescentar ao final, a linha: export PATH=/seu_caminho/Kafka_2XXXX/bin:$PATH
- Abra um novo terminal
- Tente:
kafka-topics.sh
- Se aparecer uma lista de opções, instalação está ok!
-
Criar os diretórios “/seu_caminho/data” , “/seu_caminho/data/zookeeper” e “/seu_caminho/data/kafka”
-
Editar Zookeeper e Kafka configs, usando editor de texto
- zookeeper.properties: dataDir=/seu_caminho /data/zookeeper
- server.properties: log.dirs=/seu_caminho/data/kafka
- Start Zookeeper em uma janela de terminal:
zookeeper-server-start.sh config/zookeeper.properties
- Start Kafka em outra janela:
kafka-server-start.sh config/server.properties
go to App/backend and run
npm install
create a account on google and get a google maps key and change de value on .env, the same thing have to be done to sengrid api, in this case two accounts is necessary and two keys, besides also replace emails senders to the email that correspond to the keys sendgrid.
Obs: in back end helper to send email, use a template id, that you can get when you create your only template to each account sendgrid.
go to App/front-end and run
npm install
Start Zookeeper:
zookeeper-server-start.sh config/zookeeper.properties
Start Kafka:
kafka-server-start.sh config/server.properties
Compile:
on Vacinas/
make all
Execute:
make run
go to App/backend and run
npm start
go to App/front-end and run
npm start
Troca Key button change the sendgrid key to send emails and SendEmail active and disable the shipping of emails.
This view shows the current situation from vaccine batches on system (normal, warning, danger, game over)
- normal : the batch its ok (temperature is on intervall aceptable)
- warning : the batch its not totally ok (the temperature its growing and its next from limit)
- dange : the batch its really not ok (the temperature its above of limit, vaccine can be lost)
- game over: the batch is out date (the vaccine lost the validity after temperature stay above limit for mutch time)
The left graph show the history of temperature for each vaccine batches and the right graph show the maps and current position from batchs and managers.
Managers are the "managers" that manage the lots.
Topic info:
kafka-topics.sh --bootstrap-server=localhost:9092 --describe --topic vacina
Consumer info:
kafka-consumer-groups.sh --bootstrap-server localhost:9092 --group consumerGestor --describe
clear the stream application (can get problem with metadatas)
kafka-streams-application-reset.sh --application-id vaccine-monitoring