A3 architecture

De Assothink Wiki
Aller à la navigation Aller à la recherche

Intro

The A3 architecture is one of the possible Assothink architectures.

It is an extension / rewriting of the previous (less powerfull) versions of Alex and Assothink (2 names for the same project), developped from 2009.

It was developed from 2013 and it is still under development in 2015 ...

The A3 architecture divides the Assothink work in a trilogy of main working layers, plus 3 complementary side parts.

Part Technology Function

Engine

Layer

Linux, C

project name : engine

(main: engine.c)

Excitation propagation model

implemented

(goal: computation speed, sizing efficiency)

Transmission

Layer

Linux, Java

project name : alexLib

(main: central.java)

Transmission of information between engine layer

and presentation layer; engine launching

(goal: network efficiency)

Presentation

Layer

Linux, Java, JavaFX

project Name : alexFX

(main: alexFX.java)

User interface, working as a client to the central process.

Access to passive jelly.

Access to active jelly and engines.

(goal: user friendliness, visibility on data and process)

Resource

Builder

Linux, Java

project name : alexRB

(main: builder.java)

Construction of passive jelly database.

Organized in numerous steps.

(goal: data coherence, data availability)

Java

Utilities

Linux, java, javaFX

project names: mslib,

techLib, structureLib, drawFXLib

Generic tools for advanced java application development.

Usable not only with Assothink.

(goal: ease of development and deployment)

Bash

Scripts

Linux, bash

main bash scripts: a

terminal-based front-end utilities to launch,

monitor, test, debug... all other parts

(goal: convenience)

Engine layer (engine project) notes

This layer implements the Assothink Excitation Propagation Model (EPM), or Assothink active Jelly, or Assothink brain.

The program is a C program: engine.c.

Only concepts, links, signals (only the active jelly).

Load concept and links data from the transmission layer.

Runs autonomously, saving state .

A brain uses a brain slot: a host/port combination.

Many brains may run at the same time in a network, and even on a single machine.

Interaction

The engine layer interacts mainly with the transmission layer.

It is also controlled through the bash scripts components.

Suggested hardware

  • standard PC
  • mainly accessible through network (remote shells)
  • with Linux OS
  • with strong processor (fast) and gigabit ethernet!
  • 4 Gb RAM, USB port, small HD, simple graphic controller
  • compact
  • without (no need) CD/DVD, advanced graphic, monitor, keyboard, mouse...

The EPM engine machine setup is standardized, simple, fast,

Transmission & central layer (AlexLib project) notes

The transmission layer works as a visible daemon (a daemon with a visible front-end).

Its main class is central.java.

The transmission layer is a java program, launched from the a script.

Interaction

This layer has two sides.

Interacting with its presentation layer clients, it

  • delivers (begin of user session) the whole data set describing the passive jelly
  • continuously delivers information produced by the engines
  • receives orders from clients, and transmits them to engines

Interacting with the engine layer, it

  • creates, kills and controls engine processes
  • delivers orders defined by clients
  • receives state information from the engines, propagates them to all subscribing clients

Functions

The central controller (launched as a central on the centralHost machine) is able to:

  • read, analyse, display (or distribute) state data generated by the EPM engine
  • send orders to the EPM engine
  • visualize active engine and active front-ends

The central controller is alwas the first and mandatory component of all the processes.

Orders

The orders transmitted to the EPM are:

  • Wake Up (launch a new instance of EPM engine)
  • Halt (the EPM engine process is terminated)
  • Stop (the EPM engine is stopped: it continues to run, but does not perform any cycle)
  • Resume (the EPM engine resumes: it performs repeated cycles until new orders are sent)
  • Clear EPM memory (all excitation values are set to 0)
  • N cycle (the EPM engine performs N cycles, then it is stopped)
  • Set one-shot excitation for some nodes
  • Set permanent excitation for some nodes
  • Modify EPM parameters
  • Modify permeabilities of specified EPM links

Suggested hardware

Roughly the same as the computing layer.

More server oriented: more disk and network efficiency, less CPU needs, high availablity.

Presentation layer (AlexFX project) notes

This is a javaFX front-end client applic running

  • as stand-alone application
  • within browsers

Many clients (presentation layer) may run and interact with the transmission layer simultaneously.

The presentation layer client allows

  • to list all running engines to select any of them
  • to display the state of the selected EPM engine
  • to send to the selected EPM engine all orders listed above.

Suggested hardware

No specific hardware needed.

A standard PC with browser having good web access and good visualization hardware.

  • The screen resolution should by high (at least 1500x1000 points).
  • The graphic card should have average or high performance.
  • The preferred browsers are google chrome (chromium) and firefox.
  • The web access should be fast (>20Kbit/sec for download) and the network throughput should be high.
  • OS? Linux, Windows, Android and MacOS OK.

Resource Builder (AlexRB project) notes

The resource building part of Alex is a set of batch programs running sequentially.

They are described in details here.

Lauching Alex triple level components: what's running where?

We assume here that 'MMU' is both the dataHost and the centralHost. This may be checked with the a info comman (see Bash Scripts notes)

A typical Alex system includes data located in /server.Alex/  (assuming MMU is the dataHost machine).

A typical running set includes:

  • a ceds (unique script running on MMU, mainly reporting the creation of central process, engine process, and client process)
  • central (unique server program running on MMU)
  • one or many engines (runing on several hosts)
  • one or many UI clients (running on several hosts)

The active process may be listes using a ps or a psa. They are also visible in the UI interface.

The list of hosts likely to run the processes, known as hostSet is defined in java source mscp.alex.msg.hostSet .

Here is a typical output of a info

>> a info
General working context information
HOST MMM
ARCH i686
centralHost MMU
dataHost MMU
srcHost MMM
hostSet MMM MMQ MMU MMW
jnb /home/pge/javaNB4projects
alexBase /server.Alex
JAVA_HOME /usr/lib/jvm/java-8-oracle
Unix Linux MMM 3.13.0-43-generic i686 GNU/Linux
Ubuntu Ubuntu 14.04.1 LTS
gcc gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1)
java Java(TM) SE Runtime Environment (build 1.8.0_25-b17) Java HotSpot(TM) Server VM (build 25.25-b02, mixed mode)
uptime 15:55:45 up 29 days, 4:32, 6 users, load average: 0.54, 0.49, 0.64

alexBase=/server.Alex
alexEn3=/server.Alex/en3
alexLac=/server.Alex/lac
alexPk=/server.Alex/pkDir
alexResource=/server.Alex/resources
alexTrace=/server.Alex/trace

Java utility libraries notes

The java utility libraries are used

  1. by the transmission layer
  2. by the presentation layer
  3. by the resource builder

and generally speaking by all java programs included in the Assothink project (and possibly by other programs).

Project-library mslib

General purpose libraries, complementing the standard java packages.

Project-library techLib

Specialized technical tools.

  • byting: byte encoding/decoding of various simple data types
  • clock: nanosecond-level time measurement
  • pack: data compression
  • rounding: creation of rounded data for grafs
  • sort: sorting utilities
  • tObs & tSerie: time series
  • topSort: partial sorting
  • wordDistance: distance between langage words

Project-library structureLib

Advanced structures based mainly on Java collections, mainly matrix and indexing tools.

Project-library drawFXLib

JavaFX animation library, plus various javaFX utilities.

There is also a set of simple graphic programs used to test drawFXLib, located in the afxXXX projects.

Bash Scripts notes

The a script covers various maintenance and convenience functions.

It is located in ~/Scripts/a .

It uses function and settings defined in ~/Scripts/bashrc and ~/Scripts/bashrcAlex .

It covers very different functions, as visible in its help display.

Alex Main host is MMU Local host is MMM

Usage: a central  (launch FX Central; only on MMU)
Usage: a check (central prereq; check ssh capabilities; only on MMU)
Usage: a fx          (javafx front end)

Usage: a gcc         (compile engine)
Usage: a gcc <args>  (compile engine, then execute with args)
Usage: a engi <args> (run engine with args)

Usage: a r view      (view RB results)
Usage: a r 3a 3b 3c    (for instance - forced)
Usage: a r 4a-4z       (for instance - forced)
Usage: a r all              : all forced
Usage: a r need             : all needed
Usage: a r cnt              : cnt pk records
Usage: a r clr              : clear all pk files
Usage: a r step             : step list
Usage: a r stepp            : step list with header
Usage: a r steppp           : step list with header and comments
Usage: a r trace            : summary of trace files
Usage: a r fileSeq          : file construction sequence
Usage: a r file <fn>        : info on file <fn>
Usage: a r stepInfo <step>  : info on step <step>
Usage: a r ckdbl            : check possible double lines
Usage: a r -t ...  : generic option: terminal tracing
Usage: a r -f ...  : generic option: file tracing
Usage: a r -v|-vv|-vvv ...  : generic option: verbosity
Usage: a r help|-help|h|-h
Usage:    (a r works on a makefile in the src directory)

Usage: a run <class> <arg>    (run java process class mscp.<class> with args)
Usage: a runfx <class> <arg>  (run javafx process class mscp.<class> with args)
Usage: a ljr <class>  (list java runnable class(es))

Usage: a ps            (involved processes on this host)
Usage: a psa(ll)       (involved processes on all hosts)
Usage: a f(ollow)      (tail -f central stdout)
Usage: a e(rror)       (tail -f central stderr)
Usage: a ex(plore)     (terminal passive jelly explorer)
Usage: a engp(erf)     (engine performance, host comparison)
Usage: a engl(abspeed) (engine speed lab)
Usage: a pk(ack)       (pk files interface)
Usage: a ba(ckup)      (create a backup of critical source files)

Usage: a info          (general working context info)
Usage: a wiki          (open Alex wiki)
Usage: a he(lp)        (this help)