Skip to content

ratatoskr/ratatoskr

Repository files navigation

Ratatoskr

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);
    });
});