npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

node-red-contrib-orchestrate

v0.1.3

Published

Orchestrate DBaaS support for Node-RED

Downloads

9

Readme

Orchestrate Client for Node-RED

NPM

Node-RED and Orchestrate

A Node-RED wrapper for the Orchestrate database as a service API. There are both input and output nodes included for interacting with the Orchestrate REST API.

What is this? Where am I?

Calm down, you're safe here. I'll explain everything.

What's Node-RED?

From Node-RED's own web page:

Node-RED is a tool for wiring together hardware devices, APIs and online services in new and interesting ways.

What's Orchestrate?

From Orchestrate's own web page:

Orchestrate unifies multiple databases through a simple REST API. It runs as a service (you store your data with [them]!) and supports queries like full-text search, events, graph, and key/value.

Thanks, I feel so much better now

You're welcome.

Installation

Run this command in the root directory of your Node-RED installation:

npm install node-red-contrib-orchestrate

Note that this will also install the nodes' sole dependency - orchestrate.js.

Usage

Once installed (and after restarting Node-RED and refreshing its page in your browser), you'll see some rather attractively-coloured nodes labelled "orchestrate" in your node locker under the 'storage' section.

The node with both an input and an output is (confusingly) our input node. This node allows you to get information from your orchestrate database.

The node with only an input is our output node. This allows you to send information to your orchestrate database and save it there.

When you drag either node to your workspace, you'll need to open its options and either add an orchestrate application (if you haven't already), or select one. Adding an application is as simple as pasting in the API token you can get from your application's dashboard on the Orchestrate site.

For both the input and output nodes you can specify a collection to send the information to in their node options.

Both nodes take their information from a msg object passed to them. Below are the specs for each node's msg inputs. Note that these are also visible if you select a node in Node-RED and view the info tab on the right of the screen.

Ouput node msg object

  • msg.collection (semi-optional): Specify which collection to push the data to (this will override the option entered in the node config window if set, allowing you to use one output node to send to multiple collections). Note that collection must be set either in the node options or in this property.
  • msg.data (required): The JS data object you want to send to your collection.
  • msg.key (optional): Give the data a key. If absent, orchestrate will apply its own.
  • msg.match (optional): Update if the value of this matches a currently stored ref, or assign as false to create only if no match found.

Input node msg object

  • msg.collection (optional): Specify which collection to push the data to (this will override the option entered in the node config window if set, allowing you to use one output node to send to multiple collections).
  • msg.key (optional): Get based on a key. This will supercede a query if present.
  • msg.query (optional): A lucene search query string.
  • msg.queryOptions (required if using msg.query): An object with options that apply modifiers to your query results, e.g.
{ sort: 'temp.sort:desc', limit: 5, offset: 2 }

Features

Currently, the output node provides support for:

  • Puts (with collection, key and data).
  • Conditional puts (with collection, key, data and matching logic).
  • Posts (with collection).
  • One output node can provide access to multiple collections within an application's database through use of object properties passed to it that override options set on the node.

The input node provides support for:

  • Gets (with collection and key).
  • Queries (with collection, lucene query, and query options).
  • Again, one node can interface with multiple collections, allowing for nice node reuse in a flow.

For more on these features and how they work in Orchestrate, check out their docs.

Future plans

TAKE OVER THE- Oh, you mean with this node? Ah. Awkward.

  • Gets with ref - seemed redundant until we have something with...
  • Collection Listing
  • Graphing
  • Events