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

README.md

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

Deploying

Setup

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
cat

Run the translation function:

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

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
gato

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]