wenjin272 commented on issue #1431:
URL: https://github.com/apache/flink-agents/issues/1431#issuecomment-7095939221

   Thanks for following up with this proposal. I’m open to exploring 
improvements to serialization, but I would consider the broader goal of 
supporting `pipeline.generic-types=false` a low-priority feature for the 
community at this stage.
   
   Kryo can become a bottleneck in traditional Flink DataStream workloads, but 
we haven’t yet seen evidence that serialization is a significant bottleneck in 
representative Flink Agents workloads. Flink also [[recommends using this 
option only during development and 
pre-production](https://nightlies.apache.org/flink/flink-docs-stable/docs/deployment/config/#pipeline-generic-types)](https://nightlies.apache.org/flink/flink-docs-stable/docs/deployment/config/#pipeline-generic-types).
 Supporting the configuration alone does not seem sufficient to justify a 
substantial runtime redesign.
   
   Removing the existing Kryo dependency involves more than replacing state 
descriptors:
   
   - **Application values:** Events and memory contain dynamic, potentially 
nested application objects. Explicit serializers for their outer structures 
still need a consistent serialization contract for those values.
   - **Task recovery:** Pending tasks contain keys, events, action references, 
and execution metadata. Changing their representation must preserve recovery 
behavior across Java and Python execution paths.
   - **Durable replay:** Memory-update values in durable records also use Kryo. 
A value must retain its intended type and meaning whether it is restored from 
Flink state or replayed from the durable store.
   - **Object copying:** Kryo-backed serializers are also used to copy events 
and isolate memory values. Replacements must preserve mutation isolation, not 
merely support serialization and deserialization.
   - **Compatibility:** Checkpoints, savepoints, durable records, and offline 
cleanup tools need coordinated format and compatibility rules. Even a 
fresh-state-only implementation needs to reliably reject unsupported restores.
   
   Maintaining separate opt-in and default runtime paths would add further 
implementation, testing, and maintenance costs. Given the currently unproven 
benefits, I think the return on that investment is low.
   
   That said, incremental improvements to **framework-owned serialization** 
could still be worthwhile. For example, explicit serializers for well-defined 
recovery markers, or reusing the input key serializer for stored keys, could be 
evaluated as standalone changes. They should have clear benefits and 
appropriate compatibility and recovery tests, without requiring a separate 
runtime mode. Configurable serialization for application payloads could also be 
considered independently, with a consistent contract across state, copying, and 
durable replay.
   
   You’re welcome to experiment on your fork. Profiling and benchmarks with 
representative Agent workloads would help establish whether a broader redesign 
is justified. In the meantime, smaller, well-scoped improvements to 
framework-owned serialization can be proposed independently; they do not need 
to commit the project to the full scope of this feature.


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