setPass()method to assign which HTTP request to which message queue by giving some simple arguments. They can also use
setDirectUse()if there is no need to use the rpc and message queue in their controller design. Pushkin also provides a quite useful method
setDefaultPasses()to provide a typical controller design of experiments, which only need some message queue arguments.
httpmethodis send to
/api/myexp/controllermountpath/route, send an RPC call of
queueto a worker listening on the backend. This makes is easy for worker methods to be mapped to API endpoint URLS. When attached to a core API, this controller endpoint returns the data sent back by the worker to the client.
- ‘/startExperiment’, ‘startExperiment’, taskQueue, ‘post’
- ‘/getStimuli’, ‘getStimuli’, readQueue, ‘post’
- ‘/metaResponse’, ‘insertMetaResponse’, writeQueue, ‘post’
- ‘/stimulusResponse’, ‘insertStimulusResponse’, writeQueue, ‘post’
- ‘/endExperiment’, ‘endExperiment’, taskQueue, ‘post’
callbackargument of the
app.use([path,] callback [, callback...])
useControllermethod in``Core API`` section. This method is usually used in Core-API part,
usePushkinControllermethod. When it gets the Pushkin controller, call this function with a message queue connection to finally get the Express router/controller.