function-stream icon indicating copy to clipboard operation
function-stream copied to clipboard

Data schema support

Open RobertIndie opened this issue 1 year ago • 0 comments

Motivation

Our wasm function requires knowledge of the data schema to parse JSON data.

Goals

  • Support transfer of the data schema from function-stream host to wasm function

Implementation

We can employ pulsar-client-go to extract the schema in JSON format from the message.

One possible approach is to mount a specific file, say /schema, to the wasm function's wasi. We can then utilize the buffer_reader to write to this file.

When the wasm function wants to access the schema, we could transfer the schema through this file interface.

RobertIndie avatar Feb 06 '24 04:02 RobertIndie