0.0.6 • Published 8 years ago

lemans v0.0.6

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

LeMans: Virtual actor framework for node.js

LeMans is a framework to writing distributed systems using virtual actors in JavaScript. It allows developers to write scalable applications while simplifying concurrency, state management and actor lifetime.

LeMans was inspired by the fine work of Microsoft Research on Orleans for the .NET framework. LeMans shares many of the same concepts and syntax as Orleans, but has a much different implementation due to the single-threaded nature of node and the use of isolated worker processes.

Basic Example

npm install --save lemans

const { Silo, GrainFactory, Grain } = require('lemans');

(async () => {
  const silo = new Silo({
    grains: {
      HelloGrain: class extends Grain {
        async sayHello() {
          return `Hello from HelloGrain with key ${this.key}`;
        }
      }
    }
  });

  await silo.start();

  if (silo.isWorker) {
    try {
      const grain = await GrainFactory.getGrain('HelloGrain', 'someGrainKey');
      console.log(await grain.sayHello());
    } catch (e) {
      console.error(e);
    }
  }
})();
0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago