This repository was archived by the owner on Jan 26, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
This repository was archived by the owner on Jan 26, 2026. It is now read-only.
Comprehensive Serialization Framework Comparison Tests #7
Copy link
Copy link
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Update current comparison tests to benchmark Imprint against common serialization frameworks, ranging from prolific general-purpose libraries (Jackson) to high-performance streaming formats (Protobuf, Avro).
Required Frameworks
Core Frameworks (Must Have)
- Protobuf - Google's high-performance binary format, widely used in microservices
- Avro - Apache's schema evolution-friendly format, popular in big data ecosystems
- Kryo - Fast Java serialization library, common in distributed systems
- Jackson JSON - De facto standard for JSON serialization in Java
- MessagePack (via Jackson) - Efficient binary JSON-like format
- FlatBuffers - Google's zero-copy serialization, direct competitor to Imprint's field access model
- FST - Fast Java serialization, popular drop-in replacement for Java serialization
- CBOR - Concise Binary Object Representation, standardized binary JSON alternative
Optional Frameworks (Nice to Have)
- Apache Thrift - Cross-language RPC framework with efficient serialization
- Apache Fury (formerly Fury) - JIT-optimized serialization framework
- Jackson with Blackbird - Jackson with bytecode generation for performance
Test Categories
1. Serialization Performance
- Metric: Average time per operation (ns/op)
- Goal: Measure write performance across frameworks
- Expected: Imprint may be slower due to directory construction overhead
2. Deserialization Performance
- Metric: Average time per operation (ns/op)
- Goal: Measure read performance across frameworks
- Expected: Imprint should excel due to O(1) field directory
3. Single Field Access Performance
- Metric: Time to access field near end of record without full deserialization
- Goal: Showcase Imprint's core value proposition
- Expected: Imprint should significantly outperform competitors
4. Serialized Size Comparison
- Metric: Bytes per serialized record
- Goal: Compare storage efficiency
- Expected: Binary formats (Protobuf, Avro) likely smallest
5. Merge/Update Operations
- Metric: Time to merge two records and re-serialize
- Goal: Test partial update scenarios
- Expected: Imprint should be competitive due to selective field access
Test Data Characteristics
Data Characteristics
- Field count: 20 fields total (7 core + 13 extra)
- Record size: ~500-1000 bytes when serialized
- Access pattern: Tests should access field 15+ to simulate "field near end" scenarios
- Complexity: Mix of primitives, strings, collections, and nested data
Production-Like Configuration
Framework Setup Requirements
- Protobuf: Use generated classes with proper schema definition
- Avro: Use generic records with predefined schema, binary encoding
- Kryo: Register classes, configure for production (no auto-registration)
- Jackson: Standard ObjectMapper with default settings
- MessagePack: Jackson with MessagePack factory
- Thrift (optional): Use compact protocol, generated classes
- Fury (optional): Configure for Java-only optimization
Test Environment
- JVM Settings: Standard production JVM settings, sufficient heap
- Warmup: Adequate JMH warmup iterations (3+ iterations, 1+ seconds each)
- Measurement: Consistent measurement iterations (3+ iterations)
- Threading: Single-threaded tests to avoid concurrency overhead
Implementation Notes
Dependencies
- Add protobuf-gradle-plugin for schema compilation
- Include all framework dependencies in JMH scope only (not main library)
- Use compatible versions across frameworks
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request