Organic Development

w/ javascript

Basement Level 1

organic software development concept and history

The 'Concept'

Organic Computing

“Organic computing is a form of biologically-inspired computing with organic properties.”
Wikipedia: Organic computing

Organic Computing

“Organic computer systems consist of autonomous and cooperating subsystems, they function – as far as possible – self-organizing. Self-organization is based on adaptive and context-sensitive behavior. ”
organic-computing.de

Organic properties

Organic Computer (OC) systems have so called self-x properties like:

  • Self-configuration
  • Self-optimization
  • Self-protection
  • Self-reflection
organic-computing.de

The 'History'

  • observed since the 1960ies
  • ...?
  • Jun, 2004 - Ercatons: Thing-oriented Programming
  • ...?
  • Jul, 2012 - node-organic @ Varnalab

Basement Level 2

node-organic

Unicorn

Where IT meets Biology

a simplified analogy with existing concepts

Configuration

==

DNA


                var DNA = {
                  "branch": {
                    "branch": {
                      "property": "value"
                    }
                  }
                }
              

Data Structure

==

Chemical


              var ChemicalX = {
                  type: "ChemicalX",
                  xpower: 100,
                  target: Object
              }
            

Event Bus

==

Plasma


              plasma.on("myEvent", function(c){
                console.log(c.type) // ChemicalX
                console.log(c.xpower) // 100
              })
              plasma.emit({type: "myNewEvent"})
              plasma.emit("myEvent") // same as {type: "myEvent"}
              
              plasma.emit(new Error("an error chemical with message"))
              plasma.on(Error, function(err){
                console.log(err) // "Error: an error chemical with message"
              })
            

Controller

==

Organelle

              
                var Organelle = function(plasma, dna) {
                  this.doSomething = function(){}
                }
                var ctrl = new Organelle(plasma, dna)
                ctrl.doSomething()
              
            

Application

==

Cell


              var Cell = function(){
                this.start = function(){
                  var dna = new DNA()
                  var plasma = new Plasma()
                  var nucleus = new Nucleus(plasma, dna)
                  plasma.on("build", function(c, next){
                    nucleus.build(c, next)
                  })
                  dna.loadDir("dna", function(){
                    plasma.emit({type: "build", branch: "main"})
                  })
                }
              }
              var app = new Cell()
              app.start()
            
organic application overview

DNA


              var dna = new DNA()
              dna.loadDir("dna", function(){
                foldAndMerge(dna, "branch-name")
                transform(dna)

                var value = dna.selectBranch("branch-name.object.property")
              })
            
  • a class
  • a data structure

DNA bellow the fold*

  • dynamic runtime configuration
  • the predefined knowledge of a system

Plasma


              var plasma = new Plasma()
              plasma.on("Chemical1", function(){})
              plasma.once(["Chemical1", "2"], function(){})
              plasma.emit({type: "Chemical1", data: {}})
            
  • a class
  • publisher/subscriber, observer pattern

Plasma bellow the fold*

  • medium for communication
  • inner system environment

Organelle


              var MyOrganelle = function(plasma, dna){
                // ... plasma.on , dna.property, ...
              }

              var my_organele_instance = new MyOrganelle(plasma, dna)
            
  • a class
  • controller, actor, command and strategy pattern

Organelle bellow the fold*

  • worker doing one thing only
  • a reaction

Nucleus


              var nucleus = new Nucleus(plasma, dna)

              nucleus.build({
                "branch": "root.based.dna.branch.name"
              })
              
              nucleus.buildOne({
                "source": "path/to/organelle/module",
                "organelle-dna": {}
              })
            
  • a class
  • a organelle
  • dependency injection, builder, factory pattern

Nucleus bellow the fold*

  • has access to all knowledge contained in dna
  • is just yet another organelle :)

Cell


              var Cell = function(){
              }

              Cell.prototype.start = function(){
                // load dna
                // construct organelles
                // ...
              }

              Cell.prototype.stop = function(){
                // dispose and destroy organelles
              }

              var cell_instance = new Cell()
              cell_instance.start()
            
  • a class
  • composition, dependency injection, initializer* pattern

Cell bellow the fold*

  • worker doing one thing only
  • a building block for large systems

Stellar Links

Even more Links

Special thanks to Hakim El Hattab for the presentation framework