Sign inSign up

hoploop/sse

By hoploop

•Updated about 6 years ago

Image
0

419

hoploop/sse repository overview

⁠QUALIA IT Personal Assistant

Lint

Artificial Intelligence and Reactive Event-based python systems join together.

⁠Version 4.7.0 contains several changes, including:

  • Centralized process oriented ZeroMQ, including common shared Threadpool, Logging and ZeroMQ Socket Context
  • New State engine based on Working and Short memory with InfluxDB
  • New QEL, Qualia Engine Language, to define actions, states and chains

⁠Main features

  • Image Classification
  • Object Detection
  • Face Recognition
  • Natural Language Sentiment Analysis
  • Chatbot
  • Every day utilities: notes, weather
  • Action reaction qualias mechanism

⁠Engine Main Features

  • Asynchronous calls are the main approach, used as much as possible
  • Event-based programming paradigm through pure Publisher/Subscriber architecture
  • Publisher/Subscriber ZeroMQ with topic filtering
  • Possibility to Balance and scale nodes with multiple Publishers and Subscribers
  • Messagepack json compression
  • Python Dataclasses standard object representation
  • Websockets
  • Document driven database MongoDB
  • Json Type Serializer used at Typescript level
  • Dockerizable with docker-compose

⁠Frontend main functionalities

  • Microphone speech detection
  • Microphone sound recording
  • Speaker text-to-speech
  • Webcamera image processing
  • Geolocation
  • Responsive mobile-first bootstrap based
  • Angular 9.x
  • Multilanguage support (en,it)

⁠Integrations with external systems:

  • Netatmo
  • Openweather
  • Wikipedia
  • JiraServer Rest api

⁠How to use it

⁠Requirements

Main requirements are a machine with:

  • Docker installed (docker mode)
  • Python >= 3.7.x installed (dev mode)
  • Web Browser (Chrome, Safari, Firefox supported)
  • OpenSSL installed for generating the certificates (initial setup)
  • NodeJS installed (dev mode)
⁠Running the full system in dev mode with the compact run
  1. Generating the ZeroMQ Certificates is done by: common/setup.sh
  2. Run the MongoDB: docker-compose up mongo or have your local mongo running and available on loopback 127.0.0.1
  3. Run the all the system with ZeroMQ Inproc: ./start.sh
⁠Running separate services in dev mode
  1. Generating the ZeroMQ Certificates is done by: common/setup.sh
  2. Run the MongoDB: docker-compose up mongo or have your local mongo running and available on loopback 127.0.0.1
  3. Run the engine service: engine/start.sh
  4. Run the mouth service: mouth/start.sh
  5. Run the hear service: hear/start.sh
  6. Run the system service: system/start.sh
  7. Run the sight service: sse/start.sh
  8. Run the plugins service: plugins/start.sh
  9. Run the sse service: sse/start.sh
  10. Finally run the frontend: sse/start.sh
  11. Go to http://127.0.0.1:4200 with your favourite browser
⁠Running the full system in production ready mode

The system is governed by a full Docker system through docker compose. Before starting the application, you should generate the certificates.

  1. Generating the ZeroMQ Certificates is done by:
    1. Go to common folder and: common/setup.sh
    2. Go to services/nginx folder services/nginx/setup.sh
  2. Build the frontend web/build.sh

Execute docker-compose up and go to your local browser at https://127.0.0.1, the docker compose will launch

  • Sight docker image (image parsing and classification, face and object recognition)

  • Mouth docker image (output message and voice)

  • Hear docker image (hear sense, text parsing and sentiment analysis)

  • System docker image (main data storage handler and authentication)

  • Plugins docker image (plugin handlers)

  • SSE docker image (websocket forwarder)

  • Engine docker image (qualias action reaction engine)

  • Mongodb docker image (data persistence service)

  • NGINX docker image (web reverse proxy handler)

  • Portainer docker image (docker services handler)

  • Socat docker image (docker services handler helper)

  • Maxtext docker image (sentiment analysis for text)

⁠Technical standards

  1. Semantic versioning for git and npm: [major].[minor].[patch]-[build/beta/rc]
  2. Angular 9.x with Ivy AOT Compiler
  3. Standard Python logging formatting with rotation

⁠Local installation of OpenSSL on MACOSX1

In order to generate the certificates, it is required to have the openssl installed in your system

  1. Install homebrew /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
  2. Install openssl with brew: brew install openssl
  3. Install tesseract with brew: brew install tesseract this is required for OCR Pytesseract to work
  4. Install the sound file encoder: brew install libsndfile

⁠Local installation of Kubernetes on MacOSX

  1. Install homebrew /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
  2. Install minikube brew install minikube
  3. Install kompose
    1. Download the binary curl -L https://github.com/kubernetes/kompose/releases/download/v1.21.0/kompose-darwin-amd64 -o kompose
    2. Make it executable chmod +x kompose
    3. Move it to the bin folder to be available on the system sudo mv ./kompose /usr/local/bin/kompose
  4. Start minikube minikube start
  5. Start the docker on minikube kompose --file docker-compose.yml up

Optional steps are:

  • Enable metrics-server minikube addons enable metrics-server
  • See metrics kubectl get apiservices

⁠Next steps

  • Evaluating the possibility to use a generic json schema based generator, with proper serializers and deserializers, marshallers and unmarshallers

Tag summary

Content type

Image

Digest

Size

399.5 MB

Last updated

about 6 years ago

docker pull hoploop/sse