this patch adds another middleware ChainMiddleware
the middleware allows rescheduling of response from previous job as a new job
for the chain to work the following statements should be true:
response should contain X-Zerovm-Execute: 1.0 header
response should contain Content-Type: application/json header, and effectively be a json job description
you can see that the application that tries to chain something should be able to set a response header
which means that application MUST use message/cgi or message/http as its output channel content type
ChainMiddleware MUST be placed anywhere before ProxyQueryMiddleware in the proxy-server pipeline
example job description that can output a chained job is:
as you can see, stdout has no path - will be sent to user, and its content_type is message/http
Protection from infinite loops:
ChainMiddleware has a config file setting chain_timeout (in seconds), by default chain_timeout = 20.
If chain is executing more than chain_timeout the chain will stop and the resulting job description file will be returned to user.
this patch adds another middleware
ChainMiddleware
the middleware allows rescheduling of response from previous job as a new job for the chain to work the following statements should be true:X-Zerovm-Execute: 1.0
headerContent-Type: application/json
header, and effectively be a json job descriptionyou can see that the application that tries to chain something should be able to set a response header which means that application MUST use
message/cgi
ormessage/http
as its output channel content type ChainMiddleware MUST be placed anywhere before ProxyQueryMiddleware in the proxy-server pipelineexample job description that can output a chained job is:
as you can see, stdout has no path - will be sent to user, and its content_type is
message/http
Protection from infinite loops:
ChainMiddleware
has a config file settingchain_timeout
(in seconds), by defaultchain_timeout = 20
. If chain is executing more thanchain_timeout
the chain will stop and the resulting job description file will be returned to user.