openwhisk-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matt Rutkowski" <>
Subject RE: Porting Knative on Openwhisk
Date Thu, 10 Oct 2019 19:39:18 GMT
The functionality should still be available IMO... allowing for expanded 
use cases (and reuse) other than fixed, env.-only params. plus possibility 
of re-init. 

Kind regards,

From:   "Michele Sciabarra" <>
To:     "Matt Rutkowski" <>,
Date:   10/10/2019 12:19 PM
Subject:        [EXTERNAL] Re: Porting Knative on Openwhisk

Question: but does the "/init" and "/run" entry point should be still 

Also, why do you need to accept this init? 
Should not be an action built with tekton already ready to run, or you 
still have an initialization step?

  Michele Sciabarra

----- Original message -----
From: Matt Rutkowski <>
Subject: RE: Porting Knative on Openwhisk
Date: Thursday, October 10, 2019 6:45 PM

Hi Alessio,

It should be noted that the JavaScript proxy (httpserver) under knative 
allows the single root "/" entry point to handle a JSON paylaod that 
includs "init", "run" or "init/run" together (along with parameter data) 
to separate logical data and avoid keyname collisins. 

In order to do this, we simply intrduced new top-level keys in the JSON 
payload to separate the "init" data from "run" (activation) data, as we 
already had a collision on the key "name".  An example can be fund here:

It should be noted that the changes needed to support these combinations 
was not easy in NodeJS as route handlers with Promises do not behave in a 
last-in first out manner and behave asynchronously (in case you were 
loooking at the code wondering why there was lots of duplication...).

Much of the "experimental" work we did under

(and where we are working on Java optimizations as well)

From:   Alessio Marinelli <>
To:     <>
Date:   10/10/2019 10:19 AM
Subject:        [EXTERNAL] Re: Porting Knative on Openwhisk

 ok, thanks, Alessio
    Il giovedì 10 ottobre 2019, 16:14:54 CEST, Michele Sciabarra 
<> ha scritto: 
 Hi Alessio, thanks for your help.

Basically, the task is to write implement in the runtime an adapter that 
will allow Knative images, that are basically simply http servers, to 
satisfy the contract of the OpenWhisk actions. 

There is already an implementation in Javascript here:

The contract is split in /init and /run behaviour
I already did the work for the init part although I have to change it to 
work in the same way the Javascript implementation works. I will take care 

of it.

I would ask you to implement support of the /run part. Basically it means:

- accepting an http request in the root path
- create a single line json that encodes the values that an action 
expects, as described here:

 (look for activation)
- feed the json to the underlying action executor that is already running 
after the initalization 
- collect the answer and decode it in order to provide the expected http 
answer. For a web action it must implement the web action contract as 
described here:

otherwise just return an action.

The javascript knative.js code should provide a good guidance on the 
details. For anything else just ask, either here or on slack.

 Go the same implementation here:

  Michele Sciabarra

----- Original message -----
From: Alessio Marinelli <>
To: "" <>
Subject: Porting Knative on Openwhisk
Date: Thursday, October 10, 2019 4:02 PM

Hi I am a colleague of Michele and I would like to help you complete the 
Knative support for actionloop, any indication will be appreciated, 
thanks, Alessio.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message