Skip to content

Trabalho de Sistemas Baseados em Eventos - Implementação de um sistema de monitoramento de vacinas da covid-19 utilizando Kafka

Notifications You must be signed in to change notification settings

mikaellafs/ufes-vaccine-monitoring

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EventSystems

Challenging project of the Rules and Events Based System discipline

Dependencies

Kafka

English Version

  1. From the command line:
Java -version (to check the Java version)
  • If it's Java8, ok!
  • Otherwise, it is necessary to install...
  1. 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
  1. 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
  1. Open a new terminal
  • Try:
    kafka-topics.sh
    
  • If a list of options appears, installation is ok!
  1. Create the directories “/your_path/data”, “/your_path/data/zookeeper” and “/your_path/data/kafka”

  2. Edit Zookeeper and Kafka configs, using text editor

  • zookeeper.properties: dataDir=/your_path /data/zookeeper
  • server.properties: log.dirs=/your_path/data/kafka
  1. Start Zookeeper in a terminal window:
zookeeper-server-start.sh config/zookeeper.properties
  1. Start Kafka in another window:
kafka-server-start.sh config/server.properties

Portuguese Version

  1. Na linha de comando:
Java -version (para verificar a versão de Java)
  • Se for Java8, ok!
  • Caso contrário, é necessário instalar...
  1. 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
  1. 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
  1. Abra um novo terminal
  • Tente:
kafka-topics.sh
  • Se aparecer uma lista de opções, instalação está ok!
  1. Criar os diretórios “/seu_caminho/data” , “/seu_caminho/data/zookeeper” e “/seu_caminho/data/kafka”

  2. Editar Zookeeper e Kafka configs, usando editor de texto

  • zookeeper.properties: dataDir=/seu_caminho /data/zookeeper
  • server.properties: log.dirs=/seu_caminho/data/kafka
  1. Start Zookeeper em uma janela de terminal:
zookeeper-server-start.sh config/zookeeper.properties
  1. Start Kafka em outra janela:
kafka-server-start.sh config/server.properties

Application

back-end

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.

front-end

go to App/front-end and run

npm install

Run application

kafka

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

Application

back-end

go to App/backend and run

npm start

front-end

go to App/front-end and run

npm start

A review over Application page

image

Troca Key button change the sendgrid key to send emails and SendEmail active and disable the shipping of emails.

image

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)



image

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.

2022-05-30 22-56-19

Kafka Infos

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

About

Trabalho de Sistemas Baseados em Eventos - Implementação de um sistema de monitoramento de vacinas da covid-19 utilizando Kafka

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 57.4%
  • JavaScript 26.1%
  • TypeScript 9.3%
  • CSS 3.5%
  • Python 1.6%
  • HTML 0.9%
  • Other 1.2%