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 2018/05/28 10:43:33 UTC

[GitHub] chetanmeh opened a new pull request #3709: Inlined attachments

chetanmeh opened a new pull request #3709: Inlined attachments
URL: https://github.com/apache/incubator-openwhisk/pull/3709
 
 
   This PR enables inlining attachment content as part of attachment name for smaller attachments
   
   ## Description
   
   Currently [runtime manifest][1] determine if the code related to any runtime is stored as attachment or as string property as part of action document itself. As part of #3450 plan is introduce a new `AttachmentStore` SPI and move code storage to a separate store. In doing that reading an action with code would invoke 2 remote calls. 
   
   To reduce this overhead for smaller codes this PR enables inlining of attachments as part of attachment name itself.
   
   Under this if any   
   
   1. attachment length \>= `maxInlineSize` - Then its saved as proper attachment
   2. attachment length < `maxInlineSize` - Then its content would be converted to URL encoded base64 string and would be stored as part of `attachmentName` within the action document. Thus it can read without going to attachment storage
   
   Attachment name for an inlined attachment would be a URI like below
   
       mem:T3BlbldoaXNrIEZUVw==
   
   Here 
   
   * Scheme - `mem`
   * Path - Would be base64 encoded attachment content
   
   
   ## Related issue and scope
   <!--- Please include a link to a related issue if there is one. -->
   - [ ] I opened an issue to propose and discuss this change (#????)
   
   ## My changes affect the following components
   <!--- Select below all system components are affected by your change. -->
   <!--- Enter an `x` in all applicable boxes. -->
   - [ ] API
   - [ ] Controller
   - [ ] Message Bus (e.g., Kafka)
   - [ ] Loadbalancer
   - [ ] Invoker
   - [ ] Intrinsic actions (e.g., sequences, conductors)
   - [X] Data stores (e.g., CouchDB)
   - [ ] Tests
   - [ ] Deployment
   - [ ] CLI
   - [ ] General tooling
   - [ ] Documentation
   
   ## Types of changes
   <!--- What types of changes does your code introduce? Use `x` in all the boxes that apply: -->
   - [ ] Bug fix (generally a non-breaking change which closes an issue).
   - [x] Enhancement or new feature (adds new functionality).
   - [ ] Breaking change (a bug fix or enhancement which changes existing behavior).
   
   ## Checklist:
   <!--- Please review the points below which help you make sure you've covered all aspects of the change you're making. -->
   
   - [x] I signed an [Apache CLA](https://github.com/apache/incubator-openwhisk/blob/master/CONTRIBUTING.md).
   - [x] I reviewed the [style guides](https://github.com/apache/incubator-openwhisk/wiki/Contributing:-Git-guidelines#code-readiness) and followed the recommendations (Travis CI will check :).
   - [x] I added tests to cover my changes.
   - [ ] My changes require further changes to the documentation.
   - [ ] I updated the documentation where necessary.
   
   [1]: https://github.com/apache/incubator-openwhisk/blob/master/ansible/files/runtimes.json
   [2]: https://console.bluemix.net/docs/services/Cloudant/offerings/bluemix.html#request-and-document-size-limits
   
   

----------------------------------------------------------------
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