Re: mod_wasm: Contributing Upstream to Apache

2022-12-13 Thread Jesús González
Thanks, Ruediger!

mod_wasm code can be reviewed now on the PR: 
https://github.com/apache/httpd/pull/335
I will work on adding a Travis CI test for mod_wasm.

Cheers,
Jesús

El 13/12/22, 20:45, "Ruediger Pluem" mailto:rpl...@apache.org>> escribió:


!! External Email


On 12/13/22 7:58 PM, Jesús González wrote:
> Thank Jean-Frederic for your feedback!
>
> Regarding reviewing from the diff, I agree that a PR to GitHub will ease the 
> review process.
> I'm afraid I don't have enough permission to do it. Who/where can I ask for 
> it?


You don't need special permissions. Just create a fork of 
https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fapache%2Fhttpd&data=05%7C01%7Cjesusgm%40vmware.com%7C47055f4dc74c4b83020f08dadd429a24%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C0%7C638065575374911445%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=8LaYxIvquVrH%2FrssQ%2Fl0vCE4T0hr0dRhh1quVybdSIY%3D&reserved=0
 

 with your github account.
Branch trunk to your feature branch in this fork. Commit mod_wasm to it and 
create a PR against 
https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fapache%2Fhttpd&data=05%7C01%7Cjesusgm%40vmware.com%7C47055f4dc74c4b83020f08dadd429a24%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C0%7C638065575374911445%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=8LaYxIvquVrH%2FrssQ%2Fl0vCE4T0hr0dRhh1quVybdSIY%3D&reserved=0
 



Regards


Rüdiger




!! External Email: This email originated from outside of the organization. Do 
not click links or open attachments unless you recognize the sender.





Re: mod_wasm: Contributing Upstream to Apache

2022-12-13 Thread Ruediger Pluem



On 12/13/22 7:58 PM, Jesús González wrote:
> Thank Jean-Frederic for your feedback!
> 
> Regarding reviewing from the diff, I agree that a PR to GitHub will ease the 
> review process.
> I'm afraid I don't have enough permission to do it. Who/where can I ask for 
> it?

You don't need special permissions. Just create a fork of 
https://github.com/apache/httpd with your github account.
Branch trunk to your feature branch in this fork. Commit mod_wasm to it and 
create a PR against https://github.com/apache/httpd

Regards

Rüdiger



Re: mod_wasm: Contributing Upstream to Apache

2022-12-13 Thread Jesús González
Thank Jean-Frederic for your feedback!

Regarding reviewing from the diff, I agree that a PR to GitHub will ease the 
review process.
I'm afraid I don't have enough permission to do it. Who/where can I ask for it?

On the issue with wasm_return_const_char_ownership(), that's probably because 
we renamed the function name in the latest v0.10.0 for consistency.
Rebuilding everything (including the Rust library) should make that work.

With respect to the headers, in the update from yesterday both mod_wasm.h and 
mod_wasm.c now include the extended the Apache-2.0 license text as the other 
modules.

Finally, yes our goal is to donate the module code and help to maintain it! __

Jesús

El 13/12/22, 18:57, "jean-frederic clere" mailto:jfcl...@gmail.com>> escribió:


!! External Email


On 11/14/22 07:37, Jesús González wrote:
> Hi everyone,
>
> I’m Jesús González, and I am part of VMware’s Wasm Labs: wasmlabs.dev
> 
>  
> ;>,
>  a group focused on creating open source tools
> for WebAssembly.
>
> We have created mod_wasm, an Apachemodule for running WebAssembly
> binaries inside httpd, and we would like to contribute it upstream.
> Please see below for more details. We would love to get your feedback
> and understand what improvements would be needed (if any) before it
> could be considered for contribution to the project.
>
> The details:
>
> WebAssembly 
> 
>  
> ;>(Wasm)
>  is a new binary instruction
> format that is open, portable, efficient, secure, and polyglot. It
> originated in the browser but is increasingly used in server
> applications, in particular NGINX, Apache APISIX, Istio provide
> Wasm-based plugin support (i.e.:
> https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapisix.apache.org%2Fdocs%2Fapisix%2Fwasm%2F&data=05%7C01%7Cjesusgm%40vmware.com%7Cb9252a6ca5404ddfd20008dadd337411%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C1%7C638065510315707067%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=iJHoUOiV%2B%2FgD3VzOqhugsOnFrliTCQQChWQ%2Bdj5APwM%3D&reserved=0
>  
> 
> 
>  
> ;>).
>
> mod_wasm i

Re: mod_wasm: Contributing Upstream to Apache

2022-12-13 Thread jean-frederic clere

On 11/14/22 07:37, Jesús González wrote:

Hi everyone,

I’m Jesús González, and I am part of VMware’s Wasm Labs: wasmlabs.dev 
, a group focused on creating open source tools 
for WebAssembly.


We have created mod_wasm, an Apachemodule for running WebAssembly 
binaries inside httpd, and we would like to contribute it upstream. 
Please see below for more details. We would love to get your feedback 
and understand what improvements would be needed (if any) before it 
could be considered for contribution to the project.


The details:

WebAssembly (Wasm) is a new binary instruction 
format that is open, portable, efficient, secure, and polyglot. It 
originated in the browser but is increasingly used in server 
applications, in particular NGINX, Apache APISIX, Istio provide 
Wasm-based plugin support (i.e.: 
https://apisix.apache.org/docs/apisix/wasm/ 
).


mod_wasm is a way to run WebAssembly modules inside Apache Server. This 
is similar to how mod_php embeds a PHP runtime to run PHP code. This 
enables any language that supports WebAssembly (including C++, Rust, Go 
but also Python, PHP, Ruby) to run with mod_wasm and take advantage of 
the extra level of security and sandboxing. To learn more about mod_wasm 
you can check out the following resources:


  * An overviewarticle
for the original
release.
  * We presented mod_wasm at ApacheCon this year and here are theslides

and
 the source code:https://github.com/vmware-labs/mod_wasm 
.
  * CNCF Talk on mod_wasm showcasing how to run
WordPress:https://www.youtube.com/watch?v=jXe8kulUscQ


In terms of mod_wasm architecture, the module is split into two parts:

  * /mod_wasm.so/is the extension module for Apache and it’s written in C.
  * An external dependency:/libwasm_runtime.so/, which is written in
Rust and needs to be installed into the system.

We modelled this after mod_tls, a module that is part of httpd and also 
has a Rust dependency.


You can take a look at the architecture diagram and instructions on how 
to build the module 
here:https://github.com/vmware-labs/mod_wasm#%EF%B8%8F-building-mod_wasm 



In terms of the actual contribution, please find a patch attached. We 
tried to follow all existing conventions in terms of autoconf/automake, 
providing module documentation, etc. Please let us know anything that 
you see missing or could be improved. In particular, we do not know yet 
if it is better to keep the Rust code separate, as an external 
dependency (like mod_tls does) or in the Apache source code repository.


In summary, we believe mod_wasm is a worthy addition to httpd and it 
will allow us to catch up to some of the other web servers already 
supporting Wasm, like NGINX. We were encouraged by Rich Bowen, Jim 
Jagielski and Jean-Frederic Clere to submit it for contribution upstream 
and we are looking forward to your feedback.


Today I have send some time of mod_wasm, basically I have build the 
module and the runtime and run the hello demo. Using 
https://github.com/vmware-labs/mod_wasm.git (main)


Reviewing that from a diff is hard, probably probably a PR again httpd 
(https://github.com/apache/httpd/tree/trunk for example) would more easy 
to review.


When trying to run the hello I noted that requires a big runtime 
(basically I had unresolved wasm_return_const_char_ownership() which 
comes from a rust file).


I also noted that the headers in the c and h file needs to updated.

And to clarify your goal is to donate the modules code and help to 
maintain it, correct?





Cheers!

Jesús



--
Cheers

Jean-Frederic