0.0.1-alpha.64 • Published 2 years ago

@map-aggregate/map-aggregate v0.0.1-alpha.64

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

Map-Aggregate

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

Usage

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.

Components

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

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).

Schema

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.

Examples

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.

0.0.1-alpha.61

2 years ago

0.0.1-alpha.60

2 years ago

0.0.1-alpha.63

2 years ago

0.0.1-alpha.62

2 years ago

0.0.1-alpha.64

2 years ago

0.0.1-alpha.56

2 years ago

0.0.1-alpha.58

2 years ago

0.0.1-alpha.57

2 years ago

0.0.1-alpha.59

2 years ago

0.0.1-alpha.45

2 years ago

0.0.1-alpha.47

2 years ago

0.0.1-alpha.46

2 years ago

0.0.1-alpha.48

2 years ago

0.0.1-alpha.50

2 years ago

0.0.1-alpha.52

2 years ago

0.0.1-alpha.51

2 years ago

0.0.1-alpha.54

2 years ago

0.0.1-alpha.53

2 years ago

0.0.1-alpha.44

2 years ago

0.0.1-alpha.43

2 years ago

0.0.1-alpha.42

2 years ago

0.0.1-alpha.41

2 years ago

0.0.1-alpha.40

2 years ago

0.0.1-alpha.39

2 years ago

0.0.1-alpha.37

3 years ago

0.0.1-alpha.34

3 years ago

0.0.1-alpha.32

3 years ago

0.0.1-alpha.27

3 years ago

0.0.1-alpha.26

3 years ago

0.0.1-alpha.25

3 years ago

0.0.1-alpha.23

3 years ago

0.0.1-alpha.22

3 years ago

0.0.1-alpha.24

3 years ago

0.0.1-alpha.21

3 years ago

0.0.1-alpha.20

3 years ago

0.0.1-alpha.9

3 years ago

0.0.1-alpha.12

3 years ago

0.0.1-alpha.11

3 years ago

0.0.1-alpha.14

3 years ago

0.0.1-alpha.13

3 years ago

0.0.1-alpha.16

3 years ago

0.0.1-alpha.15

3 years ago

0.0.1-alpha.18

3 years ago

0.0.1-alpha.17

3 years ago

0.0.1-alpha.10

3 years ago

0.0.1-alpha.19

3 years ago

0.0.1-alpha.8

3 years ago

0.0.1-alpha.7

3 years ago

0.0.1-alpha.6

3 years ago

0.0.1-alpha.5

3 years ago

0.0.1-alpha.4

3 years ago

0.0.1-alpha.3

3 years ago

0.0.1-alpha.2

3 years ago