Conversation
|
All contributors have signed the CLA ✍️ ✅ |
|
I have read the CLA Document and I hereby sign the CLA |
|
Hi @m1l4n54v1c, I'm trying to understand what is a concrete usage of this interface. Could you provide the example use case you're trying to solve? Also, if you need to plug into serialization/deserialization, could the SerdeFactory interface work already for you? https://docs.restate.dev/develop/java/serialization#use-another-serialization-library |
|
Hi @slinkydeveloper I've just pushed an example to this PR. Thanks for getting time to take a look at this.
Why Upcaster (not just Serde)
Hope this clarifies. Please let me know what you think :) |
Both these things are standard practices that you can do within a custom
I'm not sure what you mean by "before type resolution" here. Whatever type the Serde "materializes" (that is, the |
|
Ah, you are right! I missed that |
Upcasters with enough context (such as the core message type and selected header keys) to make informed transformation decisions.Upcaster:
The upcaster is invoked for relevant protocol messages before handed over to the current state of the
StateMachine. Messages carrying any form of payload. It could be that certain messages could be left out.To help
Upcasterimplementations, metadata is constructed that includes the name of the core message and, where applicable, relevant information.Since there is no hierarchy/generalization in messages,
DefaultInvocationInputUpcasteris a bit verbose. I'm open to suggestions on how to improve it.I see this as a conversation starter rather than a final solution. Looking forward to the feedback.