@totemorg/debe v3.9.0
DEBE
The DEBE TOTEM plugin provides:
/NOTEBOOK.TYPE ? QUERY
/COMMAND ? QUERY
notebook endpoints where TYPE:
run | brief | browse
exe | tou | md | status | suitors | usage | EVENTS
import | export | publish | mod
js | py | m | jx | jade | R
renders, runs, probes, manages or licenses a notebook.
There are also NLP, image tile, quiz, and other *COMMAND**s
search | searches | words
wms | wfs | tips | DG | HYDRA | NCL | ISPY | ESS | MIDB
uploads | stores | ingest
follow | proctor | likeus
notebooks
decode | config | info
ESC
matlab
Manage
npm install @totemorg/debe # install extended service
npm install @totemorg/totem # install base service
npm install @totemorg/dbs # install database schema
npm run start [ ? | $ | ...] # Unit test
npm run verminor # Roll minor version
npm run vermajor # Roll major version
npm run redoc # Regen documentation
npm run startdbs # Start required database servers
npm run setprot # Configure for protected mode
npm run setdebug # Configure for debugging mode
npm run setoper # Configure for operational mode
npm run setprod # Configure for production mode
npm run genio # Generate totem-man.github.io from jades/totemblog
npm run raster --in=src --out=tar # Rasterize source url into a target file
Usage
Acquire, optionally configure and start a DEBE server:
require("debe").config({
key: value, // set key
"key.key": value, // indexed set
"key.key.": value // indexed append
}, sql => {
console.log( sql ? "look mom - Im running!" : "something evil is lurking" );
});
where configuration keys follow ENUMS deep copy conventions.
Program Reference
Members
String
String~align()
Kind: inner method of String
String~trimGoogle()
Kind: inner method of String
Array
Array~merge(Recs, idx)
Merge changes when doing table deltas from their baseline versions.
Kind: inner method of Array
Param | Type | Description |
---|---|---|
Recs | Array | Source records to merge into this records |
idx | String | Key name to use for detecting record changes |
Array~schemaify(src)
Returns a schema of the array using the specified src path.
Kind: inner method of Array
Param | Type | Description |
---|---|---|
src | String | path to source |
Array~treeify(idx, kids, level, keys, wt)
Returns a tree = {name,weight,nodes} from records having been sorted on keys=key,...
Kind: inner method of Array
Param | Type | Description |
---|---|---|
idx | Number | starting index (0 on first call) |
kids | Number | number of leafs following starting index (this.length on first call) |
level | Number | current depth (0 on first call) |
keys | Array | pivot keys |
wt | String | key name that contains leaf weight (defaults to "size") |
Data
DEBE
Provides notebook interface to the barebone TOTEM web service. This module documented in accordance with jsdoc.
Requires: module:totem, module:atomic, module:man, module:enums, module:reader, module:skin, module:crypto, module:child_process, module:fs, module:stream, module:cluster, module:repl, module:i18n-abide, module:optimist, module:tokml, module:officegen
Author: ACMESDS
Example
// npm test D2
// Start challenge-protected server with additional node Routers.
config({
riddles: 10,
"nodeRouters.": {
wfs: function (req,res) {
res("here i go again");
Fetch(WFS_TEST, data => {
Trace(data);
});
}
}
}, sql => {
Trace( "This bad boy in an encrypted service with a database and has an /wfs endpoint" );
});
Example
// npm test D3
// Start server using default config
config({
}, sql => {
Trace( "Stateful network flow manger started" );
});
Example
// npm test D4
// Start server and prep file system
function readFile(sql, path, cb) {
sql.beginBulk();
readers.xls( "./config.stores/test.xls", rec => {
if (rec)
cb(rec,sql);
else
sql.endBulk();
});
}
config({
}, sql => {
var recs = 0, now = new Date();
readFile( sql, "./config.stores/test.xls", (rec,sql) => {
if ( ++recs<5 ) {
var
doc = (rec.doc || rec.Doc || rec.report || rec.Report || "")
.replace( /\n/g, " ")
.replace( /\&\#10;/g, " "),
docs = doc
.match( /(.*)TEXT:(.*)COMMENTS:(.*)/ ) || [ "", "", doc, ""],
text = "";
docs[2].replace( /\. /g, "\n").replace( /^[0-9 ]*\. \(.*\) (.*)/gm, (str,txt) => text += txt + ". " );
sql.query("INSERT INTO openv.docs SET ?", {
Reported: rec.reported || rec.Reported || now,
Name: rec.reportID || ("tbd-"+recs),
Pipe: JSON.stringify( text )
}, err => Trace("add", err) );
}
});
});
- DEBE
- static
- .nodeMappers
- .defaultDocs
- .licenseOnDownload
- .$
- .dogWatchers
- .dataFilters
- .areaRouters
- .nodeRouters
- .uploads
- .stores
- .search(req, res)
- .searches(req, res)
- .words(req, res)
- .wms(req, res)
- .wfs(req, res)
- .tips(req, res)
- .follow(req, res)
- .proctor(req, res)
- .likeus(req, res)
- .favicon(req, res)
- .notebooks(req, res)
- .ingest(req, res)
- .decode(req, res)
- .devstatus(req, res)
- .config(req, res)
- .DG(req, res)
- .HYDRA(req, res)
- .NCL(req, res)
- .ISPY()
- .ESS(req, res)
- .MIDB(req, res)
- .matlab(req, res)
- .ESC(req, res)
- .typeRouters
- .siteContext
- .probono : boolean
- .isSpawned : Boolean
- .soapRouters : Object
- .config(sql, init)
- inner
- static
DEBE.nodeMappers
Route nodes according to security requirements.
Kind: static property of DEBE
DEBE.defaultDocs
Default doc for reserved notebook keys
Kind: static property of DEBE
DEBE.licenseOnDownload
Kind: static property of DEBE
DEBE.$
Kind: static property of DEBE
DEBE.dogWatchers
Watchdogs {name: dog(sql, lims), ... } run at intervals dog.cycle seconds usings its dog.trace, dog.parms, sql connector and threshold parameters.
Kind: static property of DEBE
Cfg: Object
dogWatchers.repos()
Repository watchdog
Kind: static method of dogWatchers
dogWatchers.daily()
Daily watchdog to distribute email updates
Kind: static method of dogWatchers
dogWatchers.weekly()
Weekly watchdog to distribute email updates
Kind: static method of dogWatchers
dogWatchers.system()
System health and utilization watchdog
Kind: static method of dogWatchers
dogWatchers.detectors()
Detector training stats watchdog
Kind: static method of dogWatchers
dogWatchers.bricks()
Data brick ingesting watchdog
Kind: static method of dogWatchers
dogWatchers.catalog()
Reserved watchdog for building mater catalogs
Kind: static method of dogWatchers
dogWatchers.licenses()
Watchdog for monitoring code licenses
Kind: static method of dogWatchers
dogWatchers.voxels()
Watchdog for monitoring data voxels
Kind: static method of dogWatchers
dogWatchers.cache()
Watchdog for monitoring data cache
Kind: static method of dogWatchers
dogWatchers.jobs()
Watchdog for monitoring notebook jobs
Kind: static method of dogWatchers
dogWatchers.email()
Watchdog for monitoring email
Kind: static method of dogWatchers
dogWatchers.clients()
Watchdog for monitoring client profiles
Kind: static method of dogWatchers
dogWatchers.news()
Watchdog for creating system news
Kind: static method of dogWatchers
dogWatchers.notebooks()
Watchdog for monitoring notebook usage
Kind: static method of dogWatchers
dogWatchers.users()
Watchdog for monitoring system users
Kind: static method of dogWatchers
DEBE.dataFilters
Data filters:
(recs,req,res) => { ... }
convert the recs list provided on the current req request and uses the res responder
to supply the filtered results.
Kind: static property of DEBE
Param | Type | Description |
---|---|---|
recs | Array | Records to filter |
req | Object | Totem session request |
res | function | Totem session response |
dataFilters.xdoc
Kind: static property of dataFilters
Param | Type | Description |
---|---|---|
recs | Array | Records to filter |
req | Object | Totem session request |
res | function | Totem session response |
dataFilters.xxls
Kind: static property of dataFilters
Param | Type | Description |
---|---|---|
recs | Array | Records to filter |
req | Object | Totem session request |
res | function | Totem session response |
dataFilters.xpps
Kind: static property of dataFilters
Param | Type | Description |
---|---|---|
recs | Array | Records to filter |
req | Object | Totem session request |
res | function | Totem session response |
dataFilters.xppt
Kind: static property of dataFilters
Param | Type | Description |
---|---|---|
recs | Array | Records to filter |
req | Object | Totem session request |
res | function | Totem session response |
dataFilters.data(recs, req, res)
Kind: static method of dataFilters
Param | Type | Description |
---|---|---|
recs | Array | Records to filter |
req | Object | Totem session request |
res | function | Totem session response |
dataFilters.open(recs, req, res)
Kind: static method of dataFilters
Param | Type | Description |
---|---|---|
recs | Array | Records to filter |
req | Object | Totem session request |
res | function | Totem session response |
dataFilters.dbx(recs, req, res)
Kind: static method of dataFilters
Param | Type | Description |
---|---|---|
recs | Array | Records to filter |
req | Object | Totem session request |
res | function | Totem session response |
dataFilters.kml(recs, req, res)
Kind: static method of dataFilters
Param | Type | Description |
---|---|---|
recs | Array | Records to filter |
req | Object | Totem session request |
res | function | Totem session response |
dataFilters.flat(recs, req, res)
Kind: static method of dataFilters
Param | Type | Description |
---|---|---|
recs | Array | Records to filter |
req | Object | Totem session request |
res | function | Totem session response |
dataFilters.tree(recs, req, res)
Kind: static method of dataFilters
Param | Type | Description |
---|---|---|
recs | Array | Records to filter |
req | Object | Totem session request |
res | function | Totem session response |
dataFilters.schema(recs, req, res)
Kind: static method of dataFilters
Param | Type | Description |
---|---|---|
recs | Array | Records to filter |
req | Object | Totem session request |
res | function | Totem session response |
DEBE.areaRouters
/AREA/FILE endpoint routers
Kind: static property of DEBE
DEBE.nodeRouters
/NODE endpoint routers
Kind: static property of DEBE
- .nodeRouters
- .uploads
- .stores
- .search(req, res)
- .searches(req, res)
- .words(req, res)
- .wms(req, res)
- .wfs(req, res)
- .tips(req, res)
- .follow(req, res)
- .proctor(req, res)
- .likeus(req, res)
- .favicon(req, res)
- .notebooks(req, res)
- .ingest(req, res)
- .decode(req, res)
- .devstatus(req, res)
- .config(req, res)
- .DG(req, res)
- .HYDRA(req, res)
- .NCL(req, res)
- .ISPY()
- .ESS(req, res)
- .MIDB(req, res)
- .matlab(req, res)
- .ESC(req, res)
nodeRouters.uploads
Endpoint to upload files to upload area
Kind: static property of nodeRouters
Param | Type | Description |
---|---|---|
req | Object | Totem session request |
res | function | Totem session response |
nodeRouters.stores
Endpoint to uUpload files to stores area
Kind: static property of nodeRouters
Param | Type | Description |
---|---|---|
req | Object | Totem session request |
res | function | Totem session response |
nodeRouters.search(req, res)
Endpoint to execute open-source search for a document find = NAME against search engines.
Kind: static method of nodeRouters
Param | Type | Description |
---|---|---|
req | Object | Totem session request |
res | function | Totem session response |
nodeRouters.searches(req, res)
Endpoint to execute open-source searches for document find = NAME against search engine and save results to specified file = NAME.
Kind: static method of nodeRouters
Param | Type | Description |
---|---|---|
req | Object | Totem session request |
res | function | Totem session response |
nodeRouters.words(req, res)
Endpoint to provide word statistics using the Porter-Lancaster stemmer, respond with a count of matched and unmatched words by comparing N randomlly selected documents from stores/SOURCE*.txt with its associated src = SOURCE database documents at the specified keys = KEY,...
Kind: static method of nodeRouters
Param | Type | Description |
---|---|---|
req | Object | Totem session request |
res | function | Totem session response |
nodeRouters.wms(req, res)
Endpoint to provided image catalog service for src = dglobe | omar | ess.
Kind: static method of nodeRouters
Param | Type | Description |
---|---|---|
req | Object | Totem session request |
res | function | Totem session response |
nodeRouters.wfs(req, res)
Endpoint to respond with ess-compatible image catalog for service src = dglobe | omar | ess and desired ring = [ lat,lon, ....]
Kind: static method of nodeRouters
Param | Type | Description |
---|---|---|
req | Object | Totem session request |
res | function | Totem session response |
nodeRouters.tips(req, res)
Endpoint to provide image tips found by detectors.
Kind: static method of nodeRouters
Param | Type | Description |
---|---|---|
req | Object | Totem session request |
res | function | Totem session response |
nodeRouters.follow(req, res)
Endpoint to track client's link selections.
Kind: static method of nodeRouters
Param | Type | Description |
---|---|---|
req | Object | Totem session request |
res | function | Totem session response |
nodeRouters.proctor(req, res)
Endpoint to grade a clients lesson = PART.PART... in module = ID.
Kind: static method of nodeRouters
Param | Type | Description |
---|---|---|
req | Object | Totem session request |
res | function | Totem session response |
nodeRouters.likeus(req, res)
Endpoint to credit client's profile with a like.
Kind: static method of nodeRouters
Param | Type | Description |
---|---|---|
req | Object | Totem session request |
res | function | Totem session response |
nodeRouters.favicon(req, res)
Endpoint to trap favicon requests.
Kind: static method of nodeRouters
Param | Type | Description |
---|---|---|
req | Object | Totem session request |
res | function | Totem session response |
nodeRouters.notebooks(req, res)
Endpoint to return published notebooks in client's focus.
Kind: static method of nodeRouters
Param | Type | Description |
---|---|---|
req | Object | Totem session request |
res | function | Totem session response |
nodeRouters.ingest(req, res)
Endpoint to ingest a source into the sql database. Return graph name = NAME:NAME: ... & idmode = name||hat
Kind: static method of nodeRouters
Param | Type | Description |
---|---|---|
req | Object | Totem session request |
res | function | Totem session response |
nodeRouters.decode(req, res)
Endpoint to return release information about requested license.
Kind: static method of nodeRouters
Param | Type | Description |
---|---|---|
req | Object | Totem session request |
res | function | Totem session response |
nodeRouters.devstatus(req, res)
Endpoint to provide issues being worked via repo.
Kind: static method of nodeRouters
Param | Type | Description |
---|---|---|
req | Object | Totem session request |
res | function | Totem session response |
nodeRouters.config(req, res)
Endpoint to respond with system configuration information on requested module mod = NAME or all modules if unspecified.
Kind: static method of nodeRouters
Param | Type | Description |
---|---|---|
req | Object | Totem session request |
res | function | Totem session response |
nodeRouters.DG(req, res)
Digital globe interface.
Kind: static method of nodeRouters
Param | Type | Description |
---|---|---|
req | Object | Totem session request |
res | function | Totem session response |
nodeRouters.HYDRA(req, res)
Legacy endpoint to run specified Hydra detection algorithms. Parameters include size, pixels, scale, step, range, detects, infile, outfile, channel.
Kind: static method of nodeRouters
Param | Type | Description |
---|---|---|
req | Object | Totem session request |
res | function | Totem session response |
nodeRouters.NCL(req, res)
NCL interface.
Kind: static method of nodeRouters
Param | Type | Description |
---|---|---|
req | Object | Totem session request |
res | function | Totem session response |
nodeRouters.ISPY()
Kind: static method of nodeRouters
nodeRouters.ESS(req, res)
ESS interface.
Kind: static method of nodeRouters
Param | Type | Description |
---|---|---|
req | Object | Totem session request |
res | function | Totem session response |
nodeRouters.MIDB(req, res)
MIDB interface.
Kind: static method of nodeRouters
Param | Type | Description |
---|---|---|
req | Object | Totem session request |
res | function | Totem session response |
nodeRouters.matlab(req, res)
Endpoint to flush matlab queue.
Kind: static method of nodeRouters
Param | Type | Description |
---|---|---|
req | Object | Totem session request |
res | function | Totem session response |
nodeRouters.ESC(req, res)
Endpoint to add client to class-action remedy ticket.
Kind: static method of nodeRouters
Param | Type | Description |
---|---|---|
req | Object | Totem session request |
res | function | Totem session response |
DEBE.typeRouters
/TABLE.TYPE-endpoint routers
Kind: static property of DEBE
typeRouters._pdf
Endpoint to Save a web page and stage its delivery.
Kind: static property of typeRouters
Param | Type | Description |
---|---|---|
req | Object | Totem session request |
res | function | Totem session response |
typeRouters._jpg
Endpoint to Save a web page and stage its delivery.
Kind: static property of typeRouters
Param | Type | Description |
---|---|---|
req | Object | Totem session request |
res | function | Totem session response |
typeRouters._gif
Endpoint to Save a web page and stage its delivery.
Kind: static property of typeRouters
Param | Type | Description |
---|---|---|
req | Object | Totem session request |
res | function | Totem session response |
typeRouters._rtp
Endpoint to Save a web page and stage its delivery.
Kind: static property of typeRouters
Param | Type | Description |
---|---|---|
req | Object | Totem session request |
res | function | Totem session response |
typeRouters._run
Endpoint to Save a web page and stage its delivery.
Kind: static property of typeRouters
Param | Type | Description |
---|---|---|
req | Object | Totem session request |
res | function | Totem session response |
typeRouters._html
Endpoint to Save a web page and stage its delivery.
Kind: static property of typeRouters
Param | Type | Description |
---|---|---|
req | Object | Totem session request |
res | function | Totem session response |
typeRouters.status
Endpoint to Status notebook.
Kind: static property of typeRouters
Param | Type | Description |
---|---|---|
req | Object | Totem session request |
res | function | Totem session response |
typeRouters.suitors
Endpoint to Return notebook stores.
Kind: static property of typeRouters
Param | Type | Description |
---|---|---|
req | Object | Totem session request |
res | function | Totem session response |
typeRouters.exe
Endpoint to execute notebook req.table in the provided context parameters req.query or, if query.ID || query.Name is provided, the notebook's usecase context. If query.Save is present, the notebooks's results are saved.
Kind: static property of typeRouters
Param | Type | Description |
---|---|---|
req | Object | http request |
res | function | Totem session response callback |
typeRouters.pub
Endpoint to publish a notebook req.table.
Kind: static property of typeRouters
Param | Type | Description |
---|---|---|
req | Object | http request |
res | function | Totem session response callback |
typeRouters.publish
Endpoint to publish notebook req.table.
Kind: static property of typeRouters
Param | Type | Description |
---|---|---|
req | Object | http request |
res | function | Totem session response callback |
typeRouters.wiki
Endpoint to generate a wikipage for the notebook req.table.
Kind: static property of typeRouters
Param | Type | Description |
---|---|---|
req | Object | http request |
res | function | Totem session response callback |
typeRouters.js
Endpoint to return the engine for the requested notebook req.table.
Kind: static property of typeRouters
Param | Type | Description |
---|---|---|
req | Object | http request |
res | function | Totem session response callback |
typeRouters.py
Endpoint to return the engine for the requested notebook req.table.
Kind: static property of typeRouters
Param | Type | Description |
---|---|---|
req | Object | http request |
res | function | Totem session response callback |
typeRouters.m
Endpoint to return the engine for the requested notebook req.table.
Kind: static property of typeRouters
Param | Type | Description |
---|---|---|
req | Object | http request |
res | function | Totem session response callback |
typeRouters.me
Endpoint to return the engine for the requested notebook req.table.
Kind: static property of typeRouters
Param | Type | Description |
---|---|---|
req | Object | http request |
res | function | Totem session response callback |
typeRouters.jade
Endpoint to return the engine for the requested notebook req.table.
Kind: static property of typeRouters
Param | Type | Description |
---|---|---|
req | Object | http request |
res | function | Totem session response callback |
typeRouters.export
Endpoint to export a notebook.
Kind: static property of typeRouters
Param | Type | Description |
---|---|---|
req | Object | http request |
res | function | Totem session response callback |
typeRouters.import
Endpoint to import a notebook.
Kind: static property of typeRouters
Param | Type | Description |
---|---|---|
req | Object | http request |
res | function | Totem session response callback |
typeRouters.use
Endpoint to return a notebook's usage info.
Kind: static property of typeRouters
Param | Type | Description |
---|---|---|
req | Object | http request |
res | function | Totem session response callback |
typeRouters.usage
Endpoint to return a notebook's usage info.
Kind: static property of typeRouters
Param | Type | Description |
---|---|---|
req | Object | http request |
res | function | Totem session response callback |
typeRouters.uses
Endpoint to return a notebook's usage info.
Kind: static property of typeRouters
Param | Type | Description |
---|---|---|
req | Object | http request |
res | function | Totem session response callback |
typeRouters.reset
Kind: static property of typeRouters
typeRouters.add
Endpoint to add notebook keys.
Kind: static property of typeRouters
Param | Type | Description |
---|---|---|
req | Object | http request |
res | function | Totem session response callback |
typeRouters.sub
Endpoint to remove notebook keys.
Kind: static property of typeRouters
Param | Type | Description |
---|---|---|
req | Object | http request |
res | function | Totem session response callback |
DEBE.siteContext
Site skinning context
Kind: static property of DEBE
DEBE.probono : boolean
Enable to give-away plugin services
Kind: static property of DEBE
DEBE.isSpawned : Boolean
Enabled when this is child server spawned by a master server
Kind: static property of DEBE
DEBE.soapRouters : Object
Reserved for soap interfaces
Kind: static property of DEBE
DEBE.config(sql, init)
Configure DEBE on startup.
Kind: static method of DEBE
Param | Type | Description |
---|---|---|
sql | Object | MySQL connector |
init | function | callback(sql) when service init completed |
DEBE~SOAPsession(req, res, proxy)
Process a SOAP session peer-to-peer request. Currently customized for Hydra-peer and could/should be revised to support more generic peer-to-peer soapRouters interfaces.
Kind: inner method of DEBE
Param | Type | Description |
---|---|---|
req | Object | HTTP request |
res | Object | HTTP response |
proxy | function | Name of APP proxy function to handle this session. |
DEBE~linkInspect()
Inspect doc - kludge i/f to support nlp project
Kind: inner method of DEBE
DEBE~publishNotebooks()
Kind: inner method of DEBE
DEBE~licenseCode()
License notebook engine code.
Kind: inner method of DEBE
DEBE~sendMail()
Kind: inner method of DEBE
DEBE~genDoc(recs, req, res)
Convert records to requested req.type office file.
Kind: inner method of DEBE
Param | Type | Description |
---|---|---|
recs | Array | list of records to be converted |
req | Object | Totem session request |
res | function | Totem session response |
DEBE~getEngine()
Kind: inner method of DEBE
DEBE~fileUpload()
Kind: inner method of DEBE
DEBE~savePage()
Kind: inner method of DEBE
DEBE~statusNotebook()
Kind: inner method of DEBE
DEBE~matchNotebook()
Kind: inner method of DEBE
DEBE~docNotebook()
Kind: inner method of DEBE
DEBE~trackNotebook()
Kind: inner method of DEBE
DEBE~getNotebook()
Return a watermarked engine to a registered service.
Kind: inner method of DEBE
DEBE~usersNotebook(req, res)
Endpoint to return users of a requested plugin/notebook/table.
Kind: inner method of DEBE
Param | Type | Description |
---|---|---|
req | Object | http request |
res | function | Totem session response callback |
DEBE~runNotebook(req, res)
Run notebook req.table
in its usecase context, then responds on res
(results). The notebook's Pipe
context parameter
can be specifed to pipe/regulate dataset(s) through the notebook; its Save_X
parameter can be specified to save its
results.
Kind: inner method of DEBE
Param | Type | Description |
---|---|---|
req | Object | Totem session request |
res | function | Totem session response |
DEBE~getCert(req, res)
Create/return public-private cert.
Kind: inner method of DEBE
Param | Type | Description |
---|---|---|
req | Object | Totem session request |
res | function | Totem session response |
HOSTNAME
Kind: global variable
WFS_TEST
Kind: global variable
PLUGIN_REPO
Kind: global variable
BY
Kind: global variable
URL_CESIUM
Kind: global variable
URL_NEO4J
Kind: global variable
URL_OSM
Kind: global variable
URL_NODERED
Kind: global variable
URL_REPO
Kind: global variable
Contacting, Contributing, Following
Feel free to
- submit and status TOTEM issues
- contribute to TOTEM notebooks
- revise TOTEM requirements
- browse TOTEM holdings
- or follow TOTEM milestones
License
© 2012 ACMESDS