New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

federation

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

federation

Federated Node Message Network

  • 0.0.1
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Introduction

Federation is an actor system for Node.js inspired by Erlang and Akka.

Install

$ npm install federation

Usage

Federation nodes can send and receive messages to each other.

var router = require('federation').router;

var node1  = router.createNode('node1');
var node2  = router.createNode('node2');

Send a Message

Every node exists at a URL, and can be messaged at that URL. For nodes on the same host, the host and protocol can be omitted.

var message = "Hello World";
var address = "/node2";
node1.tell(address,message);

Receive Messages

Each node can be assigned a single receive function, which will be called whenever the node receives a message.

node1.receive = function(message){
  // handle message
}

TODO

  • add network-level transport
  • add request-reply pattern

FAQs

Package last updated on 28 Jan 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc