nuxeo/nuxeo-lambda-pictureview-conversion

Name: nuxeo-lambda-pictureview-conversion

Owner: Nuxeo

Description: null

Created: 2017-08-03 13:58:13.0

Updated: 2018-05-17 15:50:27.0

Pushed: 2018-05-17 16:09:13.0

Homepage: null

Size: 127

Language: Java

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Nuxeo Lambda Picture View Conversion

About General

The contribution redirects all image conversion to AWS Lambda. Currently, Nuxeo Lambda used for picture conversion creation. Current implementation uses streaming to download the initial file from Nuxeo. This approach allows to get around with storage limitation at AWS Lambda in many cases.

The contribution exposes Picture.Recompute automation operation. The operation accepts only one parameter - query. It will recompute all Pictures that satisfies the given query using AWS Lambda. To get more information about calling automation operations in Nuxeo, please follow our official documentation.

Performance

AWS Lambda dramatically speeds up computation time. Benchmarks show the ability to recompute a thousand of various PSD files (18 - 600MB)in less than 2 minutes. In the benchmark test, each entry creates 4 picture views of different size.

Limitations

Currently AWS Lambda limited with:

Installation

The contribution contains two parts. In nuxeo-lambda-image-conversion you can find server side contribution. This should be build with regular maven command from the root directory.

mvn clean install

to set up the function name used at your AWS account you need to update nuxeo.conf property nuxeo.lambda.image.conversion. Otherwise nuxeo-lambda-picture name will be used.

aws_lambda_impl contains code ready to use on AWS Lambda. By default AWS has Imagemagick version 6.x. We highly recommend to update it to the 7th version.

To do so, you need to build Imagemagick from source under the same environment used on AWS. You can use the following script:

sr/bin/env bash
 yum -y install libpng-devel libjpeg-devel libtiff-devel gcc
 -O http://www.imagemagick.org/download/ImageMagick.tar.gz
zxvf ImageMagick.tar.gz
mageMagick
nfigure --prefix=/var/task/imagemagick --enable-shared=no --enable-static=yes

 make install
zcvf ~/imagemagick.tgz /var/task/imagemagick/

At the end you will have imagemagick.tgz file. Move it to aws_lambda_impl To prepare Lambda for upload, use following commands:

ws_lambda_impl
i
-r lambda.zip *

Now, lambda.zip is ready to be uploaded to your AWS Lambda. If you have not yet created your AWS Lambda, please follow the official documentation.

Make sure that you configured your function accordingly with your requirements. We suggest to set timeout at least to 2 minutes. Average RAM consumptions is about 700 MB for PSDs under 300MB.

About Nuxeo

Nuxeo dramatically improves how content-based applications are built, managed and deployed, making customers more agile, innovative and successful. Nuxeo provides a next generation, enterprise ready platform for building traditional and cutting-edge content oriented applications. Combining a powerful application development environment with SaaS-based tools and a modular architecture, the Nuxeo Platform and Products provide clear business value to some of the most recognizable brands including Verizon, Electronic Arts, Netflix, Sharp, FICO, the U.S. Navy, and Boeing. Nuxeo is headquartered in New York and Paris. More information is available at www.nuxeo.com.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.