DEBE defines CRUD (POST, GET, PUT, DELETE) the endpoints
DATASET.TYPE ? QUERY
NOTEBOOK.TYPE ? QUERY
AREA/PATH/FILE.TYPE ? QUERY
HOOK.TYPE ? QUERY
to access DATASETs, NOTEBOOKs, FILEs and HOOKs as detailed in DEBE's API and skinning guide.
Use TYPE to filter DATASETs
db | xml | csv | txt | html | json | blog
kml | tree | schema | nav | delta
or to render
view | run | plugin | pivot | site | spivot | brief | gridbrief | pivbrief | runbrief
probe
exe | tou | md | status | suitors | usage | reset | EVENTS
manage
import | export | publish | addkey | subkey
or license
js | py | m | me | jade | ...
NOTEBOOKs.
The following HOOKs
riddle | task | ping | login | agent
restart
validate sessions, shard tasks, test connections, establish secure link with clients, and interface with in-network task agents.
DEBE also provides several FILE areas:
stores | uploads | shares | west | east | jades
for supervised/unsupervised file sharing.
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
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.
Open/Close
## Modules- String
- Array
- Data
- DEBE
-
Provides UI interfaces to the barebone TOTEM web service to support notebooks and other entities. This module documented in accordance with jsdoc.
Env Dependencies
HOSTNAME = name of host machine REPO = http://DOMAIN:ACCOUNT JIRA = http://DOMAIN RAS = http://DOMAIN BY = https://DOMAIN
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 UI interfaces to the barebone TOTEM web service to support notebooks and other entities. This module documented in accordance with jsdoc.
Env Dependencies
HOSTNAME = name of host machine
REPO = http://DOMAIN:ACCOUNT
JIRA = http://DOMAIN
RAS = http://DOMAIN
BY = https://DOMAIN
Requires: module:totem
, module:atomic
, module:man
, module:enums
, module:reader
, module:skin
, module:dogs
, 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 byNode-routed entpoints.
config({
riddles: 10,
"byNode.": {
wfs: function (req,res) {
res("here i go again");
Fetch(ENV.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
- ~$libs
- ~nodeRouter.
- ~defaultDocs
- ~licenseOnDownload
- ~filters.
- ~byArea.
-
~byNode.
- .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)
- .users(req, res)
- .graphs(req, res)
- .notebooks(req, res)
- .ingest(req, res)
- .decode(req, res)
- .devstatus(req, res)
- .config(req, res)
- .info(req, res)
- .DG(req, res)
- .HYDRA(req, res)
- .NCL(req, res)
- .ESS(req, res)
- .MIDB(req, res)
- .matlab(req, res)
- .ESC(req, res)
- ~byType.
- ~site.
- ~errors.
- ~paths.
-
~probono :
boolean
-
~isSpawned :
Boolean
-
~bySOAP :
Object
- ~linkInspect()
- ~licenseCode()
- ~sendMail()
- ~initialize(sql, init)
- ~SOAPsession(req, res, proxy)
- ~genDoc(recs, req, res)
- ~setAutorun()
- ~exeAutorun()
- ~getEngine()
- ~fileUpload()
- ~savePage()
- ~statusPlugin()
- ~matchPlugin()
- ~docPlugin()
- ~trackPlugin()
- ~getPlugin()
- ~simPlugin()
- ~usersPlugin(req, res)
- ~exportPlugin(req, res)
- ~importPlugin(req, res)
- ~exePlugin(req, res)
- ~modifyPlugin(req, res)
- ~retractPlugin(req, res)
- ~helpPlugin(req, res)
- ~runPlugin(req, res)
- ~getCert(req, res)
DEBE~$libs
Kind: inner property of DEBE
$libs.$site
Kind: static property of $libs
$libs.$notebooks
Kind: static property of $libs
$libs.$
See man
Kind: static property of $libs
$libs.$log
See debe
Kind: static property of $libs
$libs.$task
See debe
Kind: static property of $libs
$libs.$sql
See jsdb
Kind: static property of $libs
$libs.$neo
See jsdb
Kind: static property of $libs
$libs.$copy
See enums
Kind: static property of $libs
$libs.$each
See enums
Kind: static property of $libs
$libs.$fetch()
Kind: static method of $libs
$libs.$get()
Kind: static method of $libs
$libs.$help()
Kind: static method of $libs
DEBE~nodeRouter.
Route nodes according to security requirements.
Kind: inner property of DEBE
DEBE~defaultDocs
Default doc for reserved notebook keys
Kind: inner property of DEBE
DEBE~licenseOnDownload
Kind: inner property of DEBE
DEBE~filters.
Filter dataset recs on specifed req-res thread
Kind: inner property of DEBE
filters..xdoc
Kind: static property of filters.
Param | Type | Description |
---|---|---|
recs | Array |
Records to filter |
req | Object |
Totem session request |
res | function |
Totem session response |
filters..xxls
Kind: static property of filters.
Param | Type | Description |
---|---|---|
recs | Array |
Records to filter |
req | Object |
Totem session request |
res | function |
Totem session response |
filters..xpps
Kind: static property of filters.
Param | Type | Description |
---|---|---|
recs | Array |
Records to filter |
req | Object |
Totem session request |
res | function |
Totem session response |
filters..xppt
Kind: static property of filters.
Param | Type | Description |
---|---|---|
recs | Array |
Records to filter |
req | Object |
Totem session request |
res | function |
Totem session response |
filters..data(recs, req, res)
Kind: static method of filters.
Param | Type | Description |
---|---|---|
recs | Array |
Records to filter |
req | Object |
Totem session request |
res | function |
Totem session response |
filters..open(recs, req, res)
Kind: static method of filters.
Param | Type | Description |
---|---|---|
recs | Array |
Records to filter |
req | Object |
Totem session request |
res | function |
Totem session response |
filters..dbx(recs, req, res)
Kind: static method of filters.
Param | Type | Description |
---|---|---|
recs | Array |
Records to filter |
req | Object |
Totem session request |
res | function |
Totem session response |
filters..kml(recs, req, res)
Kind: static method of filters.
Param | Type | Description |
---|---|---|
recs | Array |
Records to filter |
req | Object |
Totem session request |
res | function |
Totem session response |
filters..flat(recs, req, res)
Kind: static method of filters.
Param | Type | Description |
---|---|---|
recs | Array |
Records to filter |
req | Object |
Totem session request |
res | function |
Totem session response |
filters..tree(recs, req, res)
Kind: static method of filters.
Param | Type | Description |
---|---|---|
recs | Array |
Records to filter |
req | Object |
Totem session request |
res | function |
Totem session response |
filters..schema(recs, req, res)
Kind: static method of filters.
Param | Type | Description |
---|---|---|
recs | Array |
Records to filter |
req | Object |
Totem session request |
res | function |
Totem session response |
DEBE~byArea.
/AREA/FILE-endpoint routers
Kind: inner property of DEBE
DEBE~byNode.
/NODE-endpoint routers
Kind: inner property of DEBE
-
~byNode.
- .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)
- .users(req, res)
- .graphs(req, res)
- .notebooks(req, res)
- .ingest(req, res)
- .decode(req, res)
- .devstatus(req, res)
- .config(req, res)
- .info(req, res)
- .DG(req, res)
- .HYDRA(req, res)
- .NCL(req, res)
- .ESS(req, res)
- .MIDB(req, res)
- .matlab(req, res)
- .ESC(req, res)
byNode..uploads
Upload files to upload area
Kind: static property of byNode.
Param | Type | Description |
---|---|---|
req | Object |
Totem session request |
res | function |
Totem session response |
byNode..stores
Upload files to stores area
Kind: static property of byNode.
Param | Type | Description |
---|---|---|
req | Object |
Totem session request |
res | function |
Totem session response |
byNode..search(req, res)
Search for a file
Kind: static method of byNode.
Param | Type | Description |
---|---|---|
req | Object |
Totem session request |
res | function |
Totem session response |
byNode..searches(req, res)
Search of multiple files
Kind: static method of byNode.
Param | Type | Description |
---|---|---|
req | Object |
Totem session request |
res | function |
Totem session response |
byNode..words(req, res)
Word statistics
Kind: static method of byNode.
Param | Type | Description |
---|---|---|
req | Object |
Totem session request |
res | function |
Totem session response |
byNode..wms(req, res)
WMS
Kind: static method of byNode.
Param | Type | Description |
---|---|---|
req | Object |
Totem session request |
res | function |
Totem session response |
byNode..wfs(req, res)
WFS
Kind: static method of byNode.
Param | Type | Description |
---|---|---|
req | Object |
Totem session request |
res | function |
Totem session response |
byNode..tips(req, res)
Provide image tips.
Kind: static method of byNode.
Param | Type | Description |
---|---|---|
req | Object |
Totem session request |
res | function |
Totem session response |
byNode..follow(req, res)
Track web links.
Kind: static method of byNode.
Param | Type | Description |
---|---|---|
req | Object |
Totem session request |
res | function |
Totem session response |
byNode..proctor(req, res)
Proctor quizes.
Kind: static method of byNode.
Param | Type | Description |
---|---|---|
req | Object |
Totem session request |
res | function |
Totem session response |
byNode..likeus(req, res)
Update like-us stats
Kind: static method of byNode.
Param | Type | Description |
---|---|---|
req | Object |
Totem session request |
res | function |
Totem session response |
byNode..users(req, res)
Return list of clients that have used this service
Kind: static method of byNode.
Param | Type | Description |
---|---|---|
req | Object |
Totem session request |
res | function |
Totem session response |
byNode..graphs(req, res)
Retrieve requested neo4j graph.
Kind: static method of byNode.
Param | Type | Description |
---|---|---|
req | Object |
Totem session request |
res | function |
Totem session response |
byNode..notebooks(req, res)
Return published notebooks
Kind: static method of byNode.
Param | Type | Description |
---|---|---|
req | Object |
Totem session request |
res | function |
Totem session response |
byNode..ingest(req, res)
Endpoint to ingest a source into the sql database
Kind: static method of byNode.
Param | Type | Description |
---|---|---|
req | Object |
Totem session request |
res | function |
Totem session response |
byNode..decode(req, res)
Endpoint to return release information about requested license.
Kind: static method of byNode.
Param | Type | Description |
---|---|---|
req | Object |
Totem session request |
res | function |
Totem session response |
byNode..devstatus(req, res)
Kind: static method of byNode.
Param | Type | Description |
---|---|---|
req | Object |
Totem session request |
res | function |
Totem session response |
byNode..config(req, res)
Configure DEBE/TOTEM.
Kind: static method of byNode.
Param | Type | Description |
---|---|---|
req | Object |
Totem session request |
res | function |
Totem session response |
byNode..info(req, res)
Kind: static method of byNode.
Param | Type | Description |
---|---|---|
req | Object |
Totem session request |
res | function |
Totem session response |
byNode..DG(req, res)
Digital globe interface.
Kind: static method of byNode.
Param | Type | Description |
---|---|---|
req | Object |
Totem session request |
res | function |
Totem session response |
byNode..HYDRA(req, res)
Hydra interface.
Kind: static method of byNode.
Param | Type | Description |
---|---|---|
req | Object |
Totem session request |
res | function |
Totem session response |
byNode..NCL(req, res)
NCL interface.
Kind: static method of byNode.
Param | Type | Description |
---|---|---|
req | Object |
Totem session request |
res | function |
Totem session response |
byNode..ESS(req, res)
ESS interface.
Kind: static method of byNode.
Param | Type | Description |
---|---|---|
req | Object |
Totem session request |
res | function |
Totem session response |
byNode..MIDB(req, res)
MIDB interface.
Kind: static method of byNode.
Param | Type | Description |
---|---|---|
req | Object |
Totem session request |
res | function |
Totem session response |
byNode..matlab(req, res)
Matlab interface.
Kind: static method of byNode.
Param | Type | Description |
---|---|---|
req | Object |
Totem session request |
res | function |
Totem session response |
byNode..ESC(req, res)
ESC remedy interface.
Kind: static method of byNode.
Param | Type | Description |
---|---|---|
req | Object |
Totem session request |
res | function |
Totem session response |
DEBE~byType.
/TABLE.TYPE-endpoint routers
Kind: inner property of DEBE
DEBE~site.
Site skinning context
Kind: inner property of DEBE
DEBE~errors.
Error messages
Kind: inner property of DEBE
DEBE~paths.
Paths to things
Kind: inner property of DEBE
DEBE~probono : boolean
Enable to give-away plugin services
Kind: inner property of DEBE
DEBE~isSpawned : Boolean
Enabled when this is child server spawned by a master server
Kind: inner property of DEBE
DEBE~bySOAP : Object
Reserved for soap interfaces
Kind: inner property of DEBE
DEBE~linkInspect()
Inspect doc - kludge i/f to support nlp project
Kind: inner method of DEBE
DEBE~licenseCode()
License notebook engine code.
Kind: inner method of DEBE
DEBE~sendMail()
Kind: inner method of DEBE
DEBE~initialize(sql, init)
Initialize DEBE on startup.
Kind: inner method of DEBE
Param | Type | Description |
---|---|---|
sql | Object |
MySQL connector |
init | function |
callback(sql) when service init completed |
DEBE~SOAPsession(req, res, proxy)
Process an bySOAP session peer-to-peer request. Currently customized for Hydra-peer and could/should be revised to support more generic peer-to-peer bySOAP 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~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~setAutorun()
Kind: inner method of DEBE
DEBE~exeAutorun()
Kind: inner method of DEBE
DEBE~getEngine()
Kind: inner method of DEBE
DEBE~fileUpload()
Kind: inner method of DEBE
DEBE~savePage()
Kind: inner method of DEBE
DEBE~statusPlugin()
Kind: inner method of DEBE
DEBE~matchPlugin()
Kind: inner method of DEBE
DEBE~docPlugin()
Kind: inner method of DEBE
DEBE~trackPlugin()
Kind: inner method of DEBE
DEBE~getPlugin()
Kind: inner method of DEBE
DEBE~simPlugin()
Kind: inner method of DEBE
DEBE~usersPlugin(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~exportPlugin(req, res)
Endpoint to export requested plugin/notebook/table.
Kind: inner method of DEBE
Param | Type | Description |
---|---|---|
req | Object |
http request |
res | function |
Totem session response callback |
DEBE~importPlugin(req, res)
Endpoint to import requested plugin/notebook/table.
Kind: inner method of DEBE
Param | Type | Description |
---|---|---|
req | Object |
http request |
res | function |
Totem session response callback |
DEBE~exePlugin(req, res)
Endpoint to execute plugin req.table using usecase req.query.ID || req.query.Name.
Kind: inner method of DEBE
Param | Type | Description |
---|---|---|
req | Object |
http request |
res | function |
Totem session response callback |
DEBE~modifyPlugin(req, res)
Endpoint to add keys to requested plugin/notebook/table.
Kind: inner method of DEBE
Param | Type | Description |
---|---|---|
req | Object |
http request |
res | function |
Totem session response callback |
DEBE~retractPlugin(req, res)
Endpoint to remove keys from requested plugin/notebook/table given.
Kind: inner method of DEBE
Param | Type | Description |
---|---|---|
req | Object |
http request |
res | function |
Totem session response callback |
DEBE~helpPlugin(req, res)
Endpoint to return plugin/notebook/table usage info.
Kind: inner method of DEBE
Param | Type | Description |
---|---|---|
req | Object |
http request |
res | function |
Totem session response callback |
DEBE~runPlugin(req, res)
Endpoint to run a dataset-engine plugin named X = req.table using parameters Q = req.query
or (if Q.id or Q.name specified) dataset X parameters derived from the matched
dataset (with json fields automatically parsed). On running the plugin's engine X, this
method then responds on res(results). If Q.Save is present, the engine's results are
also saved to the plugins dataset. If Q.Pipe is present, then responds with res(Q.Pipe),
thus allowing the caller to place the request in its job queues. Otherwise, if Q.Pipe
vacant, then responds with res(results). If a Q.agent is present, then the plugin is
out-sourced to the requested agent, which is periodically polled for its results, then
responds with res(results).
Kind: inner method of DEBE
Param | Type | Description |
---|---|---|
req | Object |
Totem session request |
res | function |
Totem session response |
DEBE~getCert(req, res)
Endpoint to create/return public-private certs of given url query
Kind: inner method of DEBE
Param | Type | Description |
---|---|---|
req | Object |
Totem session request |
res | function |
Totem session response |
Feel free to
- submit and status TOTEM issues
- contribute to TOTEM notebooks
- revise TOTEM requirements
- browse TOTEM holdings
- or follow TOTEM milestones
© 2012 ACMESDS