« A3 architecture » : différence entre les versions

De Assothink Wiki
Aller à la navigation Aller à la recherche
Contenu ajouté Contenu supprimé
Aucun résumé des modifications
 
(38 versions intermédiaires par le même utilisateur non affichées)
Ligne 1 : Ligne 1 :
== Intro ==
== Intro ==


The A3 architecture is one of the possible Assotink [[Architecture|architectures]].
The A3 architecture is one of the possible Assothink [[Architecture|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.<br>
It was developed from october 2012 and is still under development in april 2013 ...

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.
The A3 architecture divides the Assothink work in a trilogy of main working layers, plus 3 complementary side parts.


{| width="800" cellspacing="1" cellpadding="1" border="1" align="center"
{| cellspacing="1" cellpadding="1" border="1" align="center" width="900"
|-
|-
! bgcolor="#666666" scope="col" | <span style="color: rgb(255, 255, 255);">Part</span>
! bgcolor="#666666" scope="col" | <span style="color: rgb(255, 255, 255);">Part</span>
Ligne 48 : Ligne 50 :


| align="center" |
| align="center" |
Tranmission of information between engine layer
Transmission of information between engine layer


and presentation layer; engine launching<br>
and presentation layer; engine launching<br>
Ligne 96 : Ligne 98 :
Organized in numerous steps.
Organized in numerous steps.


(goal: data cohesion, data availability)
(goal: data coherence, data availability)


|-
|-
| bgcolor="#ccffff" align="center" |
| bgcolor="#ffcccc" align="center" |
'''''Java'''''
'''''Java'''''


Ligne 105 : Ligne 107 :


| align="center" |
| align="center" |
<span style="color: rgb(0, 128, 128);">Linux, java
<span style="color: rgb(0, 128, 128);">Linux, java, javaFX
</span>
</span>


Ligne 111 : Ligne 113 :
</span><br>
</span><br>


<span style="color: rgb(128, 0, 128);">techlib, structureLib, drawFXLib</span>
<span style="color: rgb(128, 0, 128);">techLib, structureLib, drawFXLib</span>


| align="center" |
| align="center" |
Generic tools for advanced java application development.
Generic tools for advanced java application development.


Not only usable with Assothink.
Usable not only with Assothink.


(goal: ease of development)
(goal: ease of development and deployment)


|-
|-
Ligne 141 : Ligne 143 :
|}
|}


== Engine layer (<span style="color: rgb(0, 0, 255);">engine</span> project) notes ==
<br>

== Engine layer (<span style="color: rgb(0, 0, 255);">engine</span>) notes ==


This layer implements the Assothink [[Excitation propagation model|Excitation Propagation Model (EPM)]], or Assothink ''active Jelly'', or Assothink ''brain''.
This layer implements the Assothink [[Excitation propagation model|Excitation Propagation Model (EPM)]], or Assothink ''active Jelly'', or Assothink ''brain''.


The program is a C program: engine.c.
Only concepts, links, signals.

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


Load links data from a data server.
Load concept and links data from the transmission layer.


Runs autonomously, saving state .
Runs autonomously, saving state .
Ligne 155 : Ligne 157 :
A brain uses a brain slot: a host/port combination.
A brain uses a brain slot: a host/port combination.


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


==== Interaction ====
==== Interaction ====
Ligne 161 : Ligne 163 :
The engine layer interacts mainly with the transmission layer.
The engine layer interacts mainly with the transmission layer.


It is slightly controlled through the scripts components.
It is also controlled through the bash scripts components.


==== Suggested hardware ====
==== Suggested hardware ====


*standard PC
*standard PC
*mainly accessible trough network (remote shells)
*mainly accessible through network (remote shells)
*with Linux OS and JVM (installed by myself)<br>
*with Linux OS<br>
*with strong processor (fast) and gigabit ethernet!
*with strong processor (fast) and gigabit ethernet!
*4 Gb RAM, USB&nbsp;port, small HD, simple graphic controller
*4 Gb RAM, USB&nbsp;port, small HD, simple graphic controller
Ligne 173 : Ligne 175 :
*without (no need) CD/DVD, advanced graphic, monitor, keyboard, mouse...
*without (no need) CD/DVD, advanced graphic, monitor, keyboard, mouse...


The [[EPM engine machine setup|EPM&nbsp;engine machine setup]] is standardized, simple, fast,
The [[EPM engine machine setup|EPM&nbsp;engine machine setup]] is standardized, simple, fast,


== Transmission layer (<span style="color: rgb(0, 0, 255);">alexLib</span>) notes ==
== Transmission &amp; central layer (<span style="color: rgb(0, 0, 255);">AlexLib</span> project) notes ==


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


Its main class is central.java.
Its main class is central.java.


The transmission layer is a java program, launched from the a script.
The transmission layer is a java program, launched from the <span style="color: rgb(128, 128, 128);">a</span> script.


==== Interaction ====
==== Interaction ====


This layer has two sides.
This layer has two sides.
Ligne 191 : Ligne 193 :
*delivers (begin of user session) the whole data set describing the passive jelly
*delivers (begin of user session) the whole data set describing the passive jelly
*continuously delivers information produced by the engines
*continuously delivers information produced by the engines
*receives orders from clients, and transmits then to engines
*receives orders from clients, and transmits them to engines


Interacting with the engine layer, it
Interacting with the engine layer, it
Ligne 201 : Ligne 203 :
==== Functions ====
==== Functions ====


The '''central''' controller (launched as <span style="color: rgb(128, 128, 128);">a central</span> on the centralHost machine) is able to:
The controller is able to:


*read, analyse, display (or distribute) state data generated by the EPM engine
*read, analyse, display (or distribute) state data generated by the EPM engine
*send orders to 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 ====
==== Orders ====


The tranmissted orders are:
The orders transmitted to the EPM&nbsp;are:


*Wake Up (launch a new instance of EPM engine)
*Wake Up (launch a new instance of EPM engine)
Ligne 227 : Ligne 232 :
More server oriented: more disk and network efficiency, less CPU needs, high availablity.
More server oriented: more disk and network efficiency, less CPU needs, high availablity.


== Presentation layer (<span style="color: rgb(0, 0, 255);">alexFX</span>) notes ==
== Presentation layer (<span style="color: rgb(0, 0, 255);">AlexFX</span> project) notes ==


This is a javaFX front-end client applic running
This is a javaFX front-end client applic running
Ligne 234 : Ligne 239 :
*within browsers
*within browsers


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


The presentation layer client allows
The presentation layer client allows
Ligne 240 : Ligne 245 :
*to list all running engines to select any of them
*to list all running engines to select any of them
*to display the state of the selected EPM engine
*to display the state of the selected EPM engine
*to send to the selected EPM engine all orders handled by the [[EPM controller|EPM controller]].
*to send to the selected EPM engine all orders listed above.


==== Suggested hardware ====
==== Suggested hardware ====
Ligne 254 : Ligne 259 :
*OS? Linux, Windows, Android and MacOS OK.
*OS? Linux, Windows, Android and MacOS OK.


== Resource Builder (<span style="color: rgb(0, 0, 255);">AlexRB</span>&nbsp;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/'''&nbsp; (assuming MMU&nbsp;is the dataHost machine).

A typical running set includes:

*<strike>'''a ceds''' (unique script running on MMU, mainly reporting the creation of central process, engine process, and client process)</strike>
*central (unique server program running on MMU)
*one or many engines (runing on several hosts)
*one or many UI&nbsp;clients (running on several hosts)

The active process may be listes using '''a ps''' or '''a psa'''. They are also visible in the UI&nbsp;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'''<br>
<pre>&gt;&gt; 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
</pre>

== Java utility libraries notes<br> ==

The java utility libraries are used

#by the transmission layer
#by the presentation layer
#by the resource builder

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

==== Project-library <span style="color: rgb(0, 0, 255);">mslib</span> ====

General purpose libraries, complementing the standard java packages.

==== Project-library <span style="color: rgb(0, 0, 255);">techLib</span><br> ====

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 &amp; tSerie: time series
*topSort:&nbsp;partial sorting
*wordDistance: distance between langage words

==== Project-library <span style="color: rgb(0, 0, 255);">structureLib</span> ====

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

==== Project-library <span style="color: rgb(0, 0, 255);">drawFXLib </span><br> ====

JavaFX&nbsp;animation library, plus various javaFX&nbsp;utilities.

There is also a set of simple graphic programs used to test drawFXLib, located in the [http://m3m.homelinux.org/wikiPG/index.php/MatscApp afxXXX] projects.

== Bash Scripts notes<br> ==

The <span style="color: rgb(128, 128, 128);">a</span> script covers various maintenance and convenience functions.<br>

It is located in <span style="color: rgb(128, 128, 128);">~/Scripts/a</span> .<br>

It uses function and settings defined in <span style="color: rgb(128, 128, 128);">~/Scripts/bashrc</span> and <span style="color: rgb(128, 128, 128);">~/Scripts/bashrcAlex</span> . <br>

It covers very different functions, as visible in its help display.<br>
<pre>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 &lt;args&gt; (compile engine, then execute with args)
Usage: a engi &lt;args&gt; (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 &lt;fn&gt; : info on file &lt;fn&gt;
Usage: a r stepInfo &lt;step&gt; : info on step &lt;step&gt;
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 &lt;class&gt; &lt;arg&gt; (run java process class mscp.&lt;class&gt; with args)
Usage: a runfx &lt;class&gt; &lt;arg&gt; (run javafx process class mscp.&lt;class&gt; with args)
Usage: a ljr &lt;class&gt; (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)


</pre>
<br>
<br>

Dernière version du 11 janvier 2015 à 17:04

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)