You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by gi...@git.apache.org on 2017/08/28 16:43:29 UTC

[GitHub] ittaibaratz opened a new issue #2666: Feature Request: Add support for action post-processing (Delayed docker pause)

ittaibaratz opened a new issue #2666: Feature Request: Add support for action post-processing (Delayed docker pause)
URL: https://github.com/apache/incubator-openwhisk/issues/2666
 
 
   Currently, an activation is complete when a function returns a response (Or it's promise is fulfilled).
   
   This architecture prevents doing any post-processing within the lifecycle of the action. 
   It would be great to be able to provide a response back to the action caller and be able to do some post processing before the activation is considered complete and the container is paused.
   
   ## Example use cases:
   
   * An IoT device interacts with a function and needs a fast response. After the response is sent back to the device, the action needs to send data to an external data warehouse/Analytics system. 
   
   * Integration with Microsoft Bot Framework (https://dev.botframework.com/). The bot framework decouples bot message receive from reply. When the bot message is received, the framework needs to send an immediate acknowledgement to the chatbot and then do some post processing before sending one or more replies through the Microsoft bot backend.  
   
   Trying to integrate the bot framework with the current architecture fails because the docker is paused before the post processing is complete. 
   
   # Possible solutions:
   
   Allow an action to declare when it's considered complete, the options could be:
   1. When function returns (default)
   2. When Node JS event loop is empty
   3. Using a specific hook (Which could be made available through https://github.com/apache/incubator-openwhisk-client-js and other clients) which will single back to Openwhisk that the action is complete.
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services