Languages (Environment)

Tutorial for supported language

Environments provide a runtime which is used to execute the functions.

Supported language images

The following pre-built environments are currently available for use in Fission:

EnvironmentImageBuilder Imagev1v2v3
Python 3fission/python-envfission/python-builderOOO
Gosee here for more infoOOO
JVM (Java)fission/jvm-envfission/jvm-builderOOO
Binary (for executables or scripts)fission/binary-envfission/binary-builderOOO
PHP 7fission/php-envfission/php-builderOOO
.NET 2.0fission/dotnet20-envfission/dotnet20-builderOOO
You can get the latest info about the environments at environment portal.

Environment Interface Version

Currently, Fission support three environment interface version: v1, v2 and v3.

  • v1
    • Support loading function from a single file. (Mainly for interpreted languages like Python and JavaScript.)
    • You are NOT allowed to specify which entrypoint to load in if there are multiple entrypoint in the file.

  • v2 (Recommend)
    • The function code can be placed in a directory or having multiple entry points in a single file.
    • Load function by specific entry point. (For the v2 interface, the function may not work if no entry point is provided.)
    • Support downloading necessary dependencies and source code compilation. (Optional)

  • v3 (Recommend)
    • All features in v2 interface.
    • Pre-warmed pool size adjustment.

Which Interface Version Should I Choose

If all source code and dependencies can be put into a single and non-compiled file, v1 interface would be enough.

If the function requires third party dependencies during the runtime or the function is written in compiled language, you should choose v2 interface in order to load function from a directory/binary with specific entry point.

If you want to adjust size of environment pre-warmed pool, use v3.

Using Specific Environment Interface Version

  # add version option to fission environment create command

For example, to create a go env with version 3 environment interface.

fission environment create --name go --image fission/go-env-1.16 --builder fission/go-builder-1.16  --version 3

Go Functions

Writing Go functions with fission

Java Functions

Writing Java functions with fission

Node.js Functions

Writing Node.js functions with fission

Python3 Functions

Writing Python functions with fission