loongs-zhang commented on PR #21992:
URL: https://github.com/apache/pulsar/pull/21992#issuecomment-1988551611

   > FWIW
   > 
   > I've been working on some POC to enable WASM function in Kafka Connect, 
Pulsar Functions and Apache Camel, where the focus was mainly to prove that 
[_Chicory_](https://github.com/dylibso/chicory), a pure Java WASM runtime, was 
good enough to be leveraged by Kafka Connect, Pulsar Functions, Camel:
   > 
   > * 
https://lburgazzoli.github.io/posts/2024-02-01_apache_kafka_connect_meets_wasm_part_1/
   > * https://github.com/lburgazzoli/kafka-connect-wasm-transformer
   > * https://github.com/lburgazzoli/pulsar-function-wasm
   > * 
https://lburgazzoli.github.io/posts/2024-01-14_apache_camel_meets_wasm_part_1/
   > 
   > Because the focus was on _Chicory_, a number of assumption have been made 
and no performances tests have been executed.
   > 
   > The different POCs have also different implementations, as an example, 
within the the Apache Camel the wole message in transit is 
serialize/deserialize to/from the WASM guest function whereas in the Kafka 
Connect and Pulsar POCs, the developer can leverage a number of exported 
functions in order to access individual part of the native envelop (Message, 
Record, etc) to reduce serdes costs.
   > 
   > I did explore the 
[component-model](https://component-model.bytecodealliance.org/introduction.html)
 and I think it would become the right thing to use, but since it was not 
supported by _Chicory_ and also not widely supported across the WASM runtimes I 
know, I opted for a conservative approach where the only requirement is to 
support the WASM spec (WASI is not even required). The side effect is that, an 
SDK would be really appreciated to reduce the boilerplate developers have to 
write.
   
   I'd like the SDK way, remember 
https://github.com/apache/pulsar/pull/21975#issuecomment-1933278909 ? The 
`WasmLoader` interface is the SPI.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to