Skip to content

Releases: jruizgit/durable

durable.js preview

14 Aug 06:07
Compare
Choose a tag to compare
durable.js preview Pre-release
Pre-release

durable.js combines state of the art technologies in a simple yet powerful end to end library for coordinating events to store, transform, aggregate and visualize data.

  • Install durable.js node package from the npm repository simply by running:
    npm install durable
  • Now write your first state machine:
var d = require('durable');   
d.run({  
  chart: d.stateChart({
    s1: {
      t1: {
        when: d.tryReceive({ content: 's2' }),
        run: function (s) { s.i = (s.i ? s.i + 1: 1); },
        to: 's2' } },
    s2: {
      t1: {
        when: d.tryReceive({ content: 's1' }),
        run: function (s) { s.i = s.i + 1; },
        to: 's1' },
      t2: {
        when: d.tryReceive({ content: 'end' }),
        to: 'end' } },
    end: { } 
  }) 
});
  • Run the state machine program hosting it in node.js:
    node chart.js
  • Program data visualization and management is automatically available.

For more information visit the WebSite or the Wiki