Problem
Right now, MessagePackTimelineSerializer is Timeline specific serializer that duplicates MessagePack configuration, options, and ULID handling. This causes:
- repeated configuration code across serializers
- inconsistent serialization patterns across domain types
- harder testing and extending for new types
At same time, ISerializer<T> already provides generic, reusable serializer abstraction with MessagePack support and ULID handling.
Goal
Replace MessagePackTimelineSerializer with generic solution using ISerializer<T>:
- Use
ISerializer<Timeline> as the underlying serializer
- Make
ITimelineSerializer thin adapter delegating to ISerializer<Timeline>
- Remove duplicate configuration for MessagePack options and ULID formatter
Proposed Tasks
- Remove current
MessagePackTimelineSerializer
- Implement
TimelineSerializerAdapter : ITimelineSerializer that wraps ISerializer<Timeline>
- Register
ISerializer<Timeline> in DI using MessagePackSerializer<Timeline>
- Update all consumers of
ITimelineSerializer to use adapter
- Verify Timeline serialization/deserialization still works correctly
Benefits
- Eliminates duplicate serializer configuration
- Provides single, reusable serialization mechanism for multiple domain types
- Makes it easier to swap serialization formats (JSON, Protobuf, etc.)
- Improves testability and maintainability of serialization logic
Problem
Right now,
MessagePackTimelineSerializeris Timeline specific serializer that duplicates MessagePack configuration, options, and ULID handling. This causes:At same time,
ISerializer<T>already provides generic, reusable serializer abstraction with MessagePack support and ULID handling.Goal
Replace
MessagePackTimelineSerializerwith generic solution usingISerializer<T>:ISerializer<Timeline>as the underlying serializerITimelineSerializerthin adapter delegating toISerializer<Timeline>Proposed Tasks
MessagePackTimelineSerializerTimelineSerializerAdapter : ITimelineSerializerthat wrapsISerializer<Timeline>ISerializer<Timeline>in DI usingMessagePackSerializer<Timeline>ITimelineSerializerto use adapterBenefits