Examples of different methods to compose FaaS functions together
Switch branches/tags
Nothing to show
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
functions Text/label detection; allow specifying target language May 3, 2018
test-images Add dog test image May 3, 2018
.gitignore Vision function now does both ocr and label detection May 3, 2018
README.md Add instructions and sample commands to README May 3, 2018


FaaS Composition Patterns

Companion examples to this conference talk: https://kccnceu18.sched.com/event/Dqvm/function-composition-in-a-serverless-world-erwin-van-eyk-timirah-james-platform9-intermediate-skill-level



You'll need a Kubernetes cluster setup, Fission installed, and Fission Workflows installed.

Install demo

fission env create --name python --image fission/python-env

fission spec apply

This will deploy all of the demo functions and triggers.

Run the demo

Demo the vision function:

On a picture of text:

curl -X POST -d "url=https://raw.githubusercontent.com/fission/faas-composition-patterns/master/test-images/ocrtest.png" http://$FISSION_ROUTER/vision
Hej Verden!

On a picture of a cat:

curl -X POST -d "url=https://raw.githubusercontent.com/fission/faas-composition-patterns/master/test-images/cat.jpg" http://$FISSION_ROUTER/vision

Run the translation function:

curl -X POST -d "text=Hej&to=en" http://$FISSION_ROUTER/translation

Now run any of the combined functions:

Using the compiled function, Identify the cat picture and translate the label to Spanish:

curl -X POST -d "url=https://raw.githubusercontent.com/fission/faas-composition-patterns/master/test-images/cat.jpg&lang=es" http://$FISSION_ROUTER/compiled

Using the coordinator, OCR a picture of text and translate it to English:

curl -X POST -d "url=https://raw.githubusercontent.com/fission/faas-composition-patterns/master/test-images/ocrtest.png&lang=en" http://$FISSION_ROUTER/coordinator
Hello World!

[There's a workflow function sample too under functions/workflow, but it's not tested yet]