Architecture

General diagram

This is the general diagram of the Brain4it architechure:

brain4it general architechture
  • The Brain4it server is a software that can run on a wide varity of devices like computers, smartphones, raspberry robots, etc. It implements the logic that make these devices behave smartly. That logic is programmed in BPL (Brain4it Programming Language), a simple but powerfull language specially designed to develop expert systems and other AI applications. It runs on top of a Java VM and has access to:
    • External services like messaging systems, sensor/actuator platforms, web services, etc.
    • Hardware resources of the device like GPIO (General Purpose Input Ouput) pins, sensors, serial ports, camera, audio, screen, etc.
    • Other Brain4it servers, with which it can cooperate.
  • The Brain4it manager is the program that allows the user to interact with the server. It has tools to program the server logic and control its operation through the HTTP REST API. There are 3 manager apps available: for desktop computers, android devices and web browsers.
  • 3rd. party applications can also comunicate with the server through the same HTTP REST API to read or write information or invoke a module function.

The server

The server is the "brain" of the device. It is organized in modules, where each module implements a specific task and do not shares data with others.

server components

Internally, the server has 3 components:

  • The RestService implements a simple HTTP REST interface to read and write module data, invoke functions and manage the server modules. See the HTTP REST API documentation for more information.
  • The ModuleManager performs all the module management operations: list, create, load, save, destroy, start and stop modules. Some of these operations are exposed through the REST API while others can be invoked through the functions of the Module library. The ModuleManager also manages the libraries that are loaded at server startup. Each library contains a set of built-in functions that allow you to perform different tasks.
  • The Store is responsible of saving the module snapshots in persistent storage. The default implementation, saves these snapshots in the underlying filesystem.

Currently exists 5 versions of the Brain4it server:

  • Standalone server: it is a lightweight server implementation intented for devices with few resources.
  • Server for web containers (J2EE): it is a server implementation designed to run in a J2EE web container like Tomcat or Jetty.
  • Raspberry server: based on the standalone server, it incorporates functions to access the Raspberry Pi hardware (GPIO pins, serial ports, etc...).
  • Android server: also based on the standalone server, it offers functions to access the Android device hardware and software resources (sensors, GPS, text to speech, etc...)
  • Swing server: it is a standalone server with a screen attached to it where you can draw graphic primitives, text and images. This server is tyically used as a smart information point.

The manager

The manager is an application that allows the user to program and control the Brain4it server remotelly through its HTTP REST API.

The are currently 3 versions available of the manager application:

All these managers offer the following tools:

In addition to these tools, the Desktop version also incorporates the Dashboard designer, a visual tool to create control panels in few minutes.

Top