-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request] Custom data converters #130
Labels
enhancement
New feature or request
Comments
#158 changes the data converter interface to be async. |
Removed from beta, we'll handle this soon after the release |
lorensr
added a commit
that referenced
this issue
Mar 2, 2022
- Adds custom data converter feature and changes the DataConverter API. Design doc: https://github.com/temporalio/sdk-typescript/tree/main/docs/data-converter.md ```ts interface DataConverter { payloadConverterPath?: string; payloadCodec?: PayloadCodec; } interface PayloadConverter { toPayload<T>(value: T): Payload | undefined; fromPayload<T>(payload: Payload): T; } interface PayloadCodec { encode(payloads: Payload[]): Promise<Payload[]>; decode(payloads: Payload[]): Promise<Payload[]>; } ``` Note: Codec is not yet run on Payloads in interceptor headers. - Unreverts #430 and modified the Protobuf data converter API: https://github.com/temporalio/sdk-typescript/tree/main/docs/protobuf-libraries.md#current-solution - Separated `common` package into: ``` common internal-workflow-common internal-non-workflow-common ``` The new `common` only exports things you might want to use in your own common code (shared between client/worker/workflow) like data converters, failures, and errors. The default exports of `common` and `internal-workflow-common` are included in the Workflow bundle. - Always include `assert` in the Workflow bundle. - Closes #130 - Closes #237 - Closes #434
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
At the moment there is no way of customizing the Workflow data converter.
This is a complex problem because of Workflows run in isolation and do not have access to node libraries.
While we're tacking this problem we might want to make the data converter interface asynchronous to facilitate network requests and non-blocking compression.
Solution requires a proper proposal in the proposals repo.
The text was updated successfully, but these errors were encountered: