Proposal
Background
OpenWhisk is an open source Faas computing platform in the Apache Foundation, announced and contributed to the open source community by IBM in 2016. In terms of running logic, OpenWhisk, like AWS Lambda, provides users with an event-driven, stateless computing model based on a variety of programming languages with direct support.
Its overall container-based runtime deployment (including traffic entry, controllers, triggers, etc.), using Docker to achieve function operation, management and scaling.
Meanwhile, in addition to container invocation and function management, OpenWhisk also includes authentication, function asynchronous triggering and other functions.
Test Environment
Configure the standalone run as per the official documentation and execute the following command after running Docker locally.
git clone https://github.com/apache/openwhisk.git
cd openwhisk
./gradlew core:standalone:bootRun
Objectives
Supports using functions in OpenWhisk as routing "upstream" via plugins to enable access to Faas functions.
Solutions
- plugin schema
| Name |
Type |
Optional |
Default |
Description |
| api_host |
string |
no |
|
OpenWhisk API host (eg. https://localhost:3233) |
| ssl_verify |
bool |
yes |
true |
Whether to verify the certificate |
| service_token |
string |
no |
|
OpenWhisk ServiceToken (The format is xxx:xxx,Passed through Basic Auth when calling the API) |
| namespace |
string |
no |
|
OpenWhisk Namespace (eg. guest) |
| action |
string |
no |
|
OpenWhisk Action (eg. hello) |
| result |
bool |
yes |
true |
Whether to get Action metadata (default to execute function and get response; false to get Action metadata but not execute Action, including runtime, function body, restrictions, etc.) |
| timeout |
integer |
yes |
60000ms |
Functions and HTTP call timeout |
| keepalive |
bool |
yes |
true |
HTTP keepalive |
| keepalive_timeout |
integer |
yes |
60000ms |
keepalive idle timeout |
| keepalive_pool |
integer |
yes |
5 |
Connection pool limit |
2. plugin implement
Implement the access phase processing function to send a request to the service endpoint using `resty.http` according to the configuration, and end the request processing after writing the result of the request to the response.
Request Demo:
POST http://localhost:3233/api/v1/namespaces/guest/actions/hello?blocking=true&result=true&timeout=60000
Authentication: Basic xxxxx
Content-Type: application/json
{"name":"test"}
{"payload":"Hello, test!"}
Other
What are your ideas?
Proposal
Background
OpenWhisk is an open source Faas computing platform in the Apache Foundation, announced and contributed to the open source community by IBM in 2016. In terms of running logic, OpenWhisk, like AWS Lambda, provides users with an event-driven, stateless computing model based on a variety of programming languages with direct support.
Its overall container-based runtime deployment (including traffic entry, controllers, triggers, etc.), using Docker to achieve function operation, management and scaling.
Meanwhile, in addition to container invocation and function management, OpenWhisk also includes authentication, function asynchronous triggering and other functions.
Test Environment
Configure the standalone run as per the official documentation and execute the following command after running Docker locally.
git clone https://github.com/apache/openwhisk.git cd openwhisk ./gradlew core:standalone:bootRunObjectives
Supports using functions in OpenWhisk as routing "upstream" via plugins to enable access to Faas functions.
Solutions
xxx:xxx,Passed through Basic Auth when calling the API)Request Demo:
Other
What are your ideas?