Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
opk-pipe-cli
Advanced tools
Thin command-line interface for Pipe Drivers. Will pull data from one Driver and push it to another.
pipething
0.0.5
npm
command is a dependency (install nodejs).
$ npm install -g pipething
$ mkdir MyPipe
$ cd MyPipe
$ pipe init
$ npm install pipething_random
$ pipe thing pipething_random
$ npm install pipething_logger
$ pipe reservoir pipething_logger
$ pipe interval 5000
$ pipe watch
Comments on this draft here.
###What I want to do
In the first phase of the Open Pipe Kit development we'll build the engine of the car while the second phase will focus on the building the dashboard for end users to interact with. By the end of phase one we should have a working engine that you can ...
Our first challenge in Phase One is to think about an architecture that will best accomplish the above goals. Here's my first crack at that.
###My attempt and results A Pipe is a process in the Pipe Engine that is configured to use a specific Sensor Plugin and a specific Reservoir plugin along with some additional data on how the Pipe should be managed (ex. frequency of polling the Sensor, what port the Sensor hardware is plugged into, which database the Reservoir Plugin should use, etc.). In other words, a Pipe takes data from a Sensor and gives it to a Reservoir at the frequency you configure.
Below describes how a Sensor Plugin, a Reservoir Plugin, and a Pipe may be described for the Pipe Engine.
A Sensor Plugin is a folder in the ./Sensors folder with the following structure.
./info.json // A file with info all about this sensor
./install.sh // A script that installs the dependencies for the sensor
./uninstall.sh // A script that uninstalls the dependencies for the sensor
./poll.py // A script that knows how to poll the sensor and returns a value
info.json
example:
{
"id": "grove_dht"
"name": "Grove Temperature",
"poll": {
"command": "python ./poll.py",
"parameters": [ // A description of what parameters can be fed to the poll command
"port": {
"type": "Integer",
"range": [1, 4]
}
]
},
"measurementUnits": "Celsius",
"miniumumPollFrequency": 2000, // Some sensors can't be polled quickly, this is a safety measure for Pipes that are misconfigured
}
A Reservoir Plugin is a folder in the ./Reservoirs folder with the following structure.
./info.json // A file with a info all about this Reservoir
./install.sh // A script that installs the dependencies for the Reservoir
./uninstall.sh // A script that uninstalls the dependencies for the Reservoir
./save.py // A script that knows how to save data into a Reservoir
info.json
example:
{
"id": "dat",
"save": {
"command": "save.py",
"parameters": {
"location": {
"type": "String",
}
}
}
"miniumumSaveFrequency": 2000
}
The Pipe Engine takes directions from a settings.json that describes the Pipes.
{
"pipes": [
{
"id": "738fs9fsejs9h3hdkfs88sfn",
"name": "first pipe",
"frequency": 5000, // in milliseconds
"sensor": {
"id": "temper1",
"parameters": [ "4" ]
}
"reservoir": {
"id": "dat",
"parameters": {
"location": "~/dat-repo-2"
}
}
},
{
"id": "sdfJDFI87udfdf98dfdj90sk",
"name": "second pipe",
"frequency": 60000, // in milliseconds
"sensor": {
"id": "grove_dht",
"parameters": [ "1" ]
}
"reservoir": {
"id": "dat",
"parameters": {
"location": "~/dat-repo-2"
}
}
}
]
}
###Questions and next steps I'm wondering how this looks to everyone. In particular, I'm interested in getting feedback from people who would be interested in writing Sensor Plugins. Does the proposed architecture look easy enough for you? Can we think of a way to make it even easier?
###Why I'm interested I hope that if we make a Pipe Engine that is easy enough for developers to write plugins for, when they are next building a device that polls a sensor for data and saves it somewhere, they'll take advantage of the framework because it saves them time from having to write the equivalent Sensor or Reservoir plugin in their own custom code. When a developer does write a Sensor and/or Reservoir plugin, I hope they'll share that back with the community thus help to create an extensive library of Sensor and Reservoir plugins. This could save all of from having to write a ton of glue code every time we need to get data from a sensor and save it somewhere!
FAQs
Thin command-line interface for Pipe Drivers. Will pull data from one Driver and push it to another.
The npm package opk-pipe-cli receives a total of 0 weekly downloads. As such, opk-pipe-cli popularity was classified as not popular.
We found that opk-pipe-cli demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.