Summary
Document the serialization backends, schema validation system, and policy-based container configuration in container_system.
Parent Issue
Part of: [EPIC] docs: Address documentation gaps across all ecosystem systems (kcenon/common_system#325)
Background (Why)
container_system includes three undocumented subsystems:
- Serializers — Including
msgpack_serializer.h beyond the documented JSON/binary formats
- Schema — Runtime schema validation for container structure at
core/container/schema.h
- Policy containers — Policy-based container configuration at
core/policy_container.h + core/storage_policy.h
Users are unaware of MessagePack serialization support, schema validation capabilities, or policy-based container customization.
Source files:
core/serializers/msgpack_serializer.h — MessagePack serialization
core/container/schema.h — Schema definition and validation
core/policy_container.h — Policy-based container configuration
core/storage_policy.h — Storage strategy policies
Scope (What)
1. Serialization Framework
Available Serializers
| Serializer |
Format |
Size |
Speed |
Use Case |
| JSON |
Text |
Large |
Moderate |
Human-readable, debugging |
| Binary |
Binary |
Small |
Fast |
Network transfer, storage |
| MessagePack |
Binary |
Smallest |
Fastest |
High-performance scenarios |
MessagePack Serializer (msgpack_serializer.h)
- API: serialize/deserialize interface
- Type mapping (container types ↔ msgpack types)
- Nested container handling
- Binary data handling
- Performance comparison with JSON and binary serializers
2. Schema System (schema.h)
Schema Definition
- How to define expected container structure
- Supported type constraints
- Nested schema support
- Optional vs required fields
Schema Validation
- Runtime validation API
- Error reporting (which field, what violation)
- Validation performance impact
auto schema = container_schema::create()
.field("name", type::string, required)
.field("age", type::integer, optional)
.field("address", nested_schema, required)
.build();
auto result = schema.validate(my_container);
3. Policy Container Framework
policy_container (policy_container.h)
- How policies compose container behavior
- Available policy dimensions
- Compile-time vs runtime policy application
Storage Policies (storage_policy.h)
- Available storage strategies (in-memory, mapped, etc.)
- Policy selection criteria
- Custom storage policy interface
4. Integration Examples
- MessagePack serialization with schema validation
- Policy container with custom storage
- Full pipeline: create → validate → serialize → store
Acceptance Criteria
Summary
Document the serialization backends, schema validation system, and policy-based container configuration in container_system.
Parent Issue
Part of: [EPIC] docs: Address documentation gaps across all ecosystem systems (kcenon/common_system#325)
Background (Why)
container_system includes three undocumented subsystems:
msgpack_serializer.hbeyond the documented JSON/binary formatscore/container/schema.hcore/policy_container.h+core/storage_policy.hUsers are unaware of MessagePack serialization support, schema validation capabilities, or policy-based container customization.
Source files:
core/serializers/msgpack_serializer.h— MessagePack serializationcore/container/schema.h— Schema definition and validationcore/policy_container.h— Policy-based container configurationcore/storage_policy.h— Storage strategy policiesScope (What)
1. Serialization Framework
Available Serializers
MessagePack Serializer (
msgpack_serializer.h)2. Schema System (
schema.h)Schema Definition
Schema Validation
3. Policy Container Framework
policy_container (
policy_container.h)Storage Policies (
storage_policy.h)4. Integration Examples
Acceptance Criteria