2021-04-16 17:29:36 UTC - Matt Welke: Hey everyone. I have something I'd like 
peoples' thoughts on. I started with OpenWhisk with Node.js and so when reading 
instructions to create a "main" function and then upload that function, I 
thought that made sense. I have a function, and I give it to OpenWhisk. Lately, 
I've been trying more runtimes because I'm tending to like compiled languages 
more these days. For example the dotnet runtime 
(<https://github.com/apache/openwhisk-runtime-dotnet>).

I noticed that it has a dependency on a JSON library because it was set up to 
have the Main method take a JSON object in and return a JSON object. But since 
it's a compiled language, the action project has to depend on a JSON library to 
do this. I thought this added friction to getting started so I made a version 
of the `dotnet:3.1` runtime for demonstration purposes that gets rid of that 
JSON dependency. It uses a standard library data structure (yay, no 
dependencies) instead of JSON as the contract between runtime and action. You 
can see details about it and examples on using it (including proof of it 
running well on IBM Cloud Functions) at 
<https://github.com/apache/openwhisk-runtime-dotnet/issues/51>.

I was wondering if people thought this is a better way to do action contracts 
(maybe I'm overthinking things, I just hate dependencies where they technically 
aren't needed), and if so, if this should be some sort of standard that's 
introduced. For example, "action functions/methods should accept a standard 
library map data structure as their single parameter and return a standard 
library map data structure", etc.
clap : Rodric Rabbah
https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1618594176150500?thread_ts=1618594176.150500&cid=C3TPCAQG1
----

Reply via email to