TileDB Cloud allows you to run any lambda-like user-defined function (UDF). More specifically, you write the code on your laptop using the TileDB Cloud client (see Installation), your function gets shipped and executed on stateless TileDB Cloud REST workers. You get charged only for the time it took to run the function and the amount of data that got returned to your laptop. You do not need to worry about launching or managing any computational resources.
There are two types of supported UDFs:
- Generic: These can include any code.
- Array UDFs: These are UDFs that are applied to slices of one or more arrays.
Running UDFs is particularly useful if you want to perform reductions (such as a sum or an average), since the amount of data returned is very small regardless of how much data the UDF processes.
TileDB Cloud currently supports only Python and R UDFs, but support for more languages will be added soon.
TileDB Cloud runs your UDF in a separate dedicated container for security. Any array access is executed in parallel on the same REST worker but separate containers, and the results are sent to the UDF container using zero-copy techniques for performance.
We offer Python and R UDF images based on the following versions:
In the environment that the UDF runs, we include the following Python packages:
Version (Python 3.9)
Version (Python 3.7.10)
In the environment that the UDF runs, we include the following R packages:
Version (R 4.2.2-1.2004.0)
Geospacial image is based on Python images and include the following packages:
Genomics image is based on Python images and include the following packages:
Imaging image is based on Python images and include the following packages:
If you would like additional packages added to the UDF environment, please leave your suggestion on our feedback request board.
Each UDF allows for the following configurations to be used:
In the future, TileDB Cloud will offer more flexibility in choosing the types of resources to run the UDF on.
All UDFs will time out by default after 15 minutes, the value is configurable