The document discusses new runtimes in OpenWhisk for supporting Go, Swift, and binary actions. Specifically:
- A new ActionLoop runtime was created to efficiently support Go actions and be more performant than the Docker skeleton runtime.
- The ActionLoop runtime was extended to support generic binaries, scripting languages like Bash and Haskell, and compiling Go and Swift actions from source code.
- Images with the ActionLoop runtime can be used both to execute actions directly and to compile Go and Swift actions offline.
2. What is it?
• At the core, a new runtime
– born to support GO Actions
– designed to be efficient than the docker skeleton
– action loop
• It was extended to support
– generic binaries (and scripts!)
– compilation of go actions in source code
– improved swift actions
– images-as-compilers for offline compilation
3. A quick reminder
why the "action loop"
Test: 100 threads executing 100 actions
executed on OSX using Docker for Mac
(executables compiled for linux-amd64)
Go performances against DockerSkeleton
5. ActionLoop: a simple concept
• Works for any binary
executable
– very similar to an unix
pipe
– it is actually
implemented with pipes
• Provides high
performances
– because the binary is
started once
– and it is kept running
• The simple idea:
– A binary must:
– Loop on
• read one line of text in
stdin
• decode it as a json
• execute the action
• log in stdout and stderr
• output in fd3
– Why fd3? long story
short: compatibility
9. New Feature: offline compilation
• Images actionloop-golang-v1.9 and
actionloop-swift-v4.1 compiles on the fly
• They can be also used as offline compilers:
– place your source in src
– docker run
-v $PWD/src:/src –v $PWD/out:/out
actionloop-golang-v1.9 compile
– the binary is left in out/main