...
- install CouchDB from http://couchdb.apache.org/
- Via the
Create Database
link create a database called 'wps' (small case) - Click on wps database,
- Via the
New Document
link create a new view. - Manually update the source block (double click in the source block) by adding the following code:
Code Block { "_id": "_design/views", "language": "javascript", "views": { "processes": { "map": "function(doc) {\n\n if (doc.type == \"processes\") {\n \n doc.processes.forEach(function(element){\n emit(element.identifier, element);\n });\n}\n}" }, "input": { "map": "function(doc) {\n if (doc.type == \"input\") {\n emit(null, doc);\n}\n}" }, "output": { "map": "function(doc) {\n if (doc.type == \"output\") {\n emit(doc._id, doc);\n}\n}" }, "matlab": { "map": "function(doc) {\n\n if (doc.type == \"processes\" && doc.language == \"matlab\") {\n \n \n emit(doc._id, doc);\n }\n}" } } }
- If you modify an existing document, keep the original
"_rev": "BUT KEEP THE AUTOMATIC REV CODE GENERATED BY YOUR COUCHDB"
- Test
http://localhost:5984/wps/_design/views/_view/matlab
to look like:Code Block {"total_rows":0,"offset":0,"rows":[ ]}
- Switch to
queue_url = 'http://localhost:5984'
in the matlab wps runnerwps.runner.run
- Check out this fork of pywps https://github.com/openearth/PyWPS and use branch couchprocesses
- configure your couchdb server in
https://github.com/openearth/PyWPS/blob/couchprocesses/pywps/default.cfg