Re: Tech Interchange Meeting February 14th

2018-02-13 Thread Ying Chun Guo
Hi, Martin

Thank you for organizing this.
I would like to take 5-10 minutes to talk about license header auditing in the 
release process 
and we need to get an agreement on the list of excluded files during header 
auditing.

Here are some examples of issues I reported:
https://github.com/apache/incubator-openwhisk/issues/3264
https://github.com/apache/incubator-openwhisk-catalog/issues/256
https://github.com/apache/incubator-openwhisk-wskdeploy/issues/716

Here is the discussion in mailing list:
http://mail-archives.apache.org/mod_mbox/incubator-openwhisk-dev/201802.mbox/%3cof33eb10e9.d0ed99eb-on0025822e.00432d2b-0025822e.00442...@notes.na.collabserv.com%3e

Is it able to arrange this topic this week? Thank you in advance.

Best regards
Ying Chun Guo (Daisy)


-Martin Henke  wrote: -
To: dev@openwhisk.apache.org
From: Martin Henke 
Date: 02/13/2018 05:15PM
Subject: Tech Interchange Meeting February 14th

Hello,

this is a kind reminder for our bi-weekly Tech Interchange Meeting tomorrow.

The proposed agenda up to now is:

- Introduction of new attendees
- Asking around for notable changes/updates
- Updates on the graduation / release mgmt. process for OpenWhisk by Vincent S 
Hou [20 min]
- Sharding Loadbalancer changes by Markus Thömmes [10 min]
- Find and confirm moderator for next meeting Feb 28th 

@all: Please contact me  if you have another topic that should show up on the 
agenda.
@Matt: Can you please the agenda  to the CWiki.

Details:
What: Apache OpenWhisk "Tech. Interchange" (bi-weekly) Zoom Meeting 
When: @ 11:00am EDT, 8am PDT, 3pm GMT, 5pm CEST , 3pm UTC 
Where: 
https://urldefense.proofpoint.com/v2/url?u=https-3A__zoom.us_my_asfopenwhisk=DwIFaQ=jf_iaSHvJObTbx-siA1ZOg=V_NQebMEsahq0wRsMMLN8VHG-pcqPRpdHygvo4rmK4o=9FnXQbMCgmxXL2yMESD0WjhcmAqHl7_85eJj1IBzQLg=DwPgj_ictYPTQbP1lIU_G_76udk0a05NJ-H-HDPyVPQ=

Regards,
Martin





Re: Hot standby controller

2018-02-13 Thread 甯尤刚
+1
​
-Original Message-
From: "Carlos Santana"
To: ;
Cc:
Sent: 2018-02-14 (星期三) 02:57:05
Subject: Re: Hot standby controller
 
+1

On Tue, Feb 13, 2018 at 8:05 AM Christian Bickel  wrote:

> Hi,
>
> some time ago, we started working on the scale out of the controllers.
> One of our first steps was to deploy two controllers, but use the second
> one as hot standby controller. At this time, this was an important step,
> because we had to handle cache-invalidation first and solve
> Load-balancing-issues.
> In the meantime all these issues are solved, and the default is that all
> controllers are used round robin for months now.
>
> We added a flag if the controllers should be used round robin or the
> second as hot standby. This flag is set to "use all controllers round
> robin" for months now.
>
> In my opinion, we don't need the hot standby ability anymore.
> Does anyone has another opinion?
>
> If not, I'll go forward with the following PR
> https://github.com/apache/incubator-openwhisk/pull/3266 (
> https://github.com/apache/incubator-openwhisk/pull/3266) and let it merge.
>
> Greetings
> Christian Bickel
>



First Implementation of the self-replacing Go support for OpenWhisk

2018-02-13 Thread Michele Sciabarra
As promised I released a first implementation of Go support using the technique 
I described before.

In short, a library implementing the proxy and serving both /run and /init, 
with the ability of replace itself with a new version.

Using the library, implementing a function in Go looks like this:

---
package main

import (
"encoding/json"
"fmt"

"github.com/sciabarracom/openwhisk-runtime-go/openwhisk"
)

func hello(event json.RawMessage) (json.RawMessage, error) {
// input and output
var input struct{ Name string }
var output struct {
Greetings string `json:"greetings"`
}
// read the input event
json.Unmarshal(event, )
if input.Name != "" {
// handle the event
output.Greetings = "Hello, " + input.Name
fmt.Println(output.Greetings)
return json.Marshal(output)
}
return nil, fmt.Errorf("no name specified")
}

func main() {
openwhisk.Start(ciao)
}
---

Actually in practice it is better to place the function in a separate package 
for implementing some tests, because apparently adding tests in the main 
package does not work.

Source code of the library is here:

https://github.com/sciabarracom/openwhisk-runtime-go

Here is a simple transcription of how it works and how I tested it.

First you build  a couple of executable, and for simplicity you also prepare 
the json payload for the init.

$ cd test
$ go build -o hello ../main/hello.go
$ go build -o ciao ../main/ciao.go
$ echo '{"value":{"binary":true,"code":"'$(base64 hello)'"}}' >hello.json
$ echo '{"value":{"binary":true,"code":"'$(base64 ciao)'"}}' >ciao.json

Now you can start the actual server

$ go run ../main/exec.go

Now the magic happens.

Default behaviour (no executable)

```
$ curl -XPOST http://localhost:8080/run -d '{"value":{"name":"Mike"}}'
{"error":"the action failed to locate a binary"}
```

Now post the `hello` handler and run it:

```
$ curl -XPOST http://localhost:8080/init -d @hello.json
OK
$ curl -XPOST http://localhost:8080/run -d '{"value":{"name":"Mike"}}'
{"greetings":"Hello, Mike"}
```

As you can see, the function changed and now it implements the "hello" handler.

But the replaced server is still able to run init so let's do it again, 
replacing with the "ciao" handler.


```
$ curl -XPOST http://localhost:8080/init -d @ciao.json
OK
$ curl -XPOST http://localhost:8080/run -d '{"value":{"name":"Mike"}}'
{"saluti":"Ciao, Mike"}
```

---

I want to say "thank you" to James Thomas, I basically copied his code for 
implementing the /run handler since it was ready, then I added my code for the 
/init. I also had to dig into the internals of the http Go package more than I 
expected.

Work is not yet complete, I have to manage the environment variables (stealing 
more code from James Thomas implementation), package in Docker, integrate in 
OpenWhisk. But definitely I believe looks like a promising start.

-- 
  Michele Sciabarra
  openwh...@sciabarra.com


Re: Hot standby controller

2018-02-13 Thread Carlos Santana
+1

On Tue, Feb 13, 2018 at 8:05 AM Christian Bickel  wrote:

> Hi,
>
> some time ago, we started working on the scale out of the controllers.
> One of our first steps was to deploy two controllers, but use the second
> one as hot standby controller. At this time, this was an important step,
> because we had to handle cache-invalidation first and solve
> Load-balancing-issues.
> In the meantime all these issues are solved, and the default is that all
> controllers are used round robin for months now.
>
> We added a flag if the controllers should be used round robin or the
> second as hot standby. This flag is set to "use all controllers round
> robin" for months now.
>
> In my opinion, we don't need the hot standby ability anymore.
> Does anyone has another opinion?
>
> If not, I'll go forward with the following PR
> https://github.com/apache/incubator-openwhisk/pull/3266 (
> https://github.com/apache/incubator-openwhisk/pull/3266) and let it merge.
>
> Greetings
> Christian Bickel
>


Hot standby controller

2018-02-13 Thread Christian Bickel
Hi,

some time ago, we started working on the scale out of the controllers.
One of our first steps was to deploy two controllers, but use the second one as 
hot standby controller. At this time, this was an important step, because we 
had to handle cache-invalidation first and solve Load-balancing-issues.
In the meantime all these issues are solved, and the default is that all 
controllers are used round robin for months now.

We added a flag if the controllers should be used round robin or the second as 
hot standby. This flag is set to "use all controllers round robin" for months 
now.

In my opinion, we don't need the hot standby ability anymore.
Does anyone has another opinion?

If not, I'll go forward with the following PR 
https://github.com/apache/incubator-openwhisk/pull/3266 
(https://github.com/apache/incubator-openwhisk/pull/3266) and let it merge.

Greetings
Christian Bickel


Tech Interchange Meeting February 14th

2018-02-13 Thread Martin Henke
Hello,

this is a kind reminder for our bi-weekly Tech Interchange Meeting tomorrow.

The proposed agenda up to now is:

- Introduction of new attendees
- Asking around for notable changes/updates
- Updates on the graduation / release mgmt. process for OpenWhisk by Vincent S 
Hou [20 min]
- Sharding Loadbalancer changes by Markus Thömmes [10 min]
- Find and confirm moderator for next meeting Feb 28th 

@all: Please contact me  if you have another topic that should show up on the 
agenda.
@Matt: Can you please the agenda  to the CWiki.

Details:
What: Apache OpenWhisk "Tech. Interchange" (bi-weekly) Zoom Meeting 
When: @ 11:00am EDT, 8am PDT, 3pm GMT, 5pm CEST , 3pm UTC 
Where: https://zoom.us/my/asfopenwhisk

Regards,
Martin