MVP achieved !!! ?TO INVESTIGATE? ? ? jq is a json processing cmd line tool ? ??????????????? DONE #1 meta, all field that are not <...> , will be stored in meta DONE #2 PID document PID in the meta, and support $PID replacement in params garbage collection based on pid filea ALSO $PARAMS supported DONE #3 SRC document compilation and new emit function that only take name in src document cmq.py --emit name params DONE #3.1 garbage pid TODO #3.2 let {'method':'let','params':{'name1':'val,'name2':'val'}} ... same pid {'method':'save','params':{'_id':...,'val':'$name1'}} will enable lot of possibility, declar once immutable let return top params not given param all procedure must have $arg who serve as rpc initial param sugar synthax ! {'let':'name','with':{}} 3.3 macro just permit to include predefined set of code in the src, but avoid loop { 'macro' : { 'macroname' : [...can call macro...] } } { 'src' : { 'procname' : [ {'reuse' : 'macroname', 'with' : 'optional', 'from':''} ] } } maybe it is not preferable, building method may be the true way of code reuse #4 webhook event manager that trigger emit #5 mail support , mailhook and mail sender DIRECTION: need $PID var that is changed a params level before execution every pid is a document by itself. garbage collection rule, obey to pid-doc, otherwise delete pid file is emited along with first instruction. when an instruction is done, it can say exit and its value will be save at src field of pid document, using pid as procname. emit will have another meaning. it wont emit code directly but a documentname where the source is. cmq --emit doc:procname any document with src field will be used as source inside src, any fn are available to code inside, outside src, native function and _id:procname can be called. any call to a src proc will yield a function who call the pid of a newly created rpc.once the pid function available it will return its value you know pid will become a source once procedure is done. code inside src is more restrictive and consise than rpc field. because i want to avoid infinitly long then chain and infinite amount of document when doing a loop. this is why i dont intend to allow nested operation in the same pid first event i will support is couch-web-hook. any new document that appear in a db will be trigered as params to a method. can use same db for mq and event. that mean it ignore any document with <...> i think that a hook should be explicitly runned as cronjob by admin. give it a wildcard and a method, it will emit all of them { hook : { wildcard : {}, method :`"" } } any new document who valid wildcard will have hooked:$pid and a new piddoc will be emited. and then i will need pop-mail-webhook and rss-webhook will need also smtp mail support alreaqdy have ajax support with json-predicate json-path and json-... that work it will be possible to do something out of it.