yunfengzhou-hub commented on issue #1125:
URL: https://github.com/apache/flink-agents/issues/1125#issuecomment-5843351867

   Hi @wenjin272, +1 for the centralized registry/normalizer direction.
   
   The main design choice is where normalization runs. I'd put it at the 
lowest-level deserialization entry point, e.g. Java's `Event.fromJson` and its 
Python counterpart, so a single change covers the EventRouter, Event Log, 
listeners, and actions ahead of dispatch, and future boundaries can't be missed.
   
   The registry maps each built-in event type to its existing `fromEvent` 
reconstruction path, so no new mechanism is needed. Restoration is idempotent, 
so actions that already reconstruct their own subtype keep working, and it 
applies in both directions.
   
   This does change one public API return type: for a known built-in type, 
`fromJson` returns the concrete subclass instead of a base `Event`. That's the 
more correct deserialization semantics, and 0.4 is the designated breaking 
window, so I'll treat it as in-scope and just flag it here. If you'd rather 
keep `fromJson` on the base `Event`, the fallback is to normalize only at the 
runtime cross-language boundary, at the cost of an explicit call at each 
boundary.


-- 
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