0.0.1-alpha.64 • Public • Published


The Map-Reduce framework is designed to enable the development of decentralized smart apps using data aggregated across multiple smart home sources.


In order to use this framework, install the library here:

npm install @map-aggregate/map-aggregate

The library can then be imported as follows:

const { runLocalGraph } = require("@map-aggregate/map-aggregate")

const result = await runLocalGraph({}, "aggregatedHistogram")

The library is designed to work as a callback, wherein you can specify what kind of graph to run and what kind of data to pass as configuration. If no data is passed in the first argument, it defaults to whatever arguments are supplied in the schema.

In order to run an arbitrary graph (program) that is not already pre-developed, use the runGraph method which accepts a string as the second parameter which represents the FBP specification to use.

Additionally, a runStoreGraph method is also provided to run graphs that are published on the Map-Aggregate store.


This directory contains the definitions and implementations of the operators and implementations within the framework. Each node has defined inPorts and outPorts where data enters and exits each node.


Graphs are FBP files that define the shape/layout of each program. In each file, there are three sections: Definition, Ports, and Connections. The first section defines all the nodes present in the program. The second section defines all the InPorts and OutPorts of each node that are not connected to other nodes in the program. The last section defines connections between nodes (port to port).


Each FBP spec file has a corresponding schema that defines the default inputs to use for a program if none are supplied. Please make sure to define a value in the schema for any values that are referenced in the graph ports.


The quickest way to get started is to create a graph and a schema. The schema defines the default values for the graph's inputs. The graph defines the shape of the program. The graph can then be run by calling the runLocalGraph function. The result is returned as a promise. The result is a JSON object that contains the output of the graph.




Package Sidebar


npm i @map-aggregate/map-aggregate

Weekly Downloads






Unpacked Size

168 kB

Total Files


Last publish


  • sophiesacks
  • lexicographical