0.0.8 • Published 7 years ago

ratatoskr v0.0.8

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

Build Status Dependency Status devDependency Status NPM version

Note: This library is highly experimental.

Ratatoskr is a lightweight virtual actor framework for node.js.

Ratatoskr aims to make writing realtime distributed systems easier by leveraging virtual actors to allow developers to focus on application logic, not how their application will be distributed.

Visit the wiki for more documentation.

Basic Example

  1. npm install --save ratatoskr
  2. Start redis locally
const ratatoskr = require("ratatoskr")();

ratatoskr.actor("helloActor", () => {
    return class {
        onMessage(username) {
            return "Hello, " + username;
        }
    }
});

ratatoskr.start().then(() => {
    return ratatoskr.send("helloActor", "Joe").then((result) => {
        console.log(result);
    });
});