Develop Lambdas with any programming language

I just wanted to give a quick update.
I’ve successfully setup an environment, that supports WASM for Lambda in Go, Rust and AssemblyScript. Currently I’m mainly testing in Go and unfortunately there is some (generated) boilerplate code needed to make using resolvers pleasent (Generate Go Types, JSON marshaller/unmarshaller, wrappers that allow sending strings (JSON) between host and guest.
I was new to WASM and a limitation is the fact, that you cannot just send all types of data back and forth, for example strings. That requires some memory management. I will show this off soon to gather feedback.

Now onto a question I have:
In accordance to this “feature request”, we defined it would be ideal to support both local lambdas as well as (multiple) external. Therefore my suggestion would be:

  • Add @lambda([url: “…”]) with optional url as mentioned in here.
    @lambda without url runs on local server. @lambda with url is sent to external lambda.
  • Remove the lambda superflag.
    url is implicit from schema - can be removed.
    num is defined through admin api and defaults to 1.
    port is defined through admin api and defaults to 6868.
    restart-after is defined through admin api and defaults to 30s
  • Startup local lambdas when the schema is being loaded and a @lambda directive without url is detected.
  • Send requests to external lambdas dynamically (no prior definition in superflag needed).

What’s your feedback? Am I missing something?
Thanks.

1 Like