You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2020/02/07 02:02:43 UTC

[GitHub] [openwhisk] upgle commented on issue #4215: only nodejs and python runtime can reuse global scope variable

upgle commented on issue #4215: only nodejs and python runtime can reuse global scope variable
URL: https://github.com/apache/openwhisk/issues/4215#issuecomment-583199661
 
 
   If you use a global variable, as you said, you can reuse the DB connection pool or use the cache layer.
   
   I think it is more useful to use it if the action code developer understands the global object well. (you should handle an exception, and consider the memory limit of the container. )
   
   There are also some examples of actually using the global object to retain state.
   
   - https://www.trek10.com/blog/stateless/
   - https://rewind.io/blog/simple-caching-in-aws-lambda-functions/

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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