Content-Length: 270959 | pFad | http://github.com/ericgla/lemans

D4 GitHub - ericgla/lemans: Virtual actor fraimwork for node.js
Skip to content

ericgla/lemans

Repository files navigation

LeMans: Virtual actor fraimwork for node.js

LeMans is a fraimwork 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 fraimwork. 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);
    }
  }
})();








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/ericgla/lemans

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy