-
Simple benchmark using Protobuf and JSON serialization
- Create a domain model (Recipe List)
- Add Protobuf to project
- Create protobuf files
- Setup auto-generated .proto files
- Create simple serialization converstion POJOs
- Add JSON to project
- Create new ObjectFactory
- Add annotations on classes
- Create method that takes in an Object and serializes and passes back
- Create de-serialization method, passes back Object
- Create test cases that show/prove serialization
- Create test harness to test timing
-
Investigate the Payload as a second source of performance
- Create a RESTful service that speaks Protobuf and JSON and stores/retrieves Recipes (in-memory)
- Build test suite that runs service locally
- Benchmark: query service with Protobuf objects only
- Benchmark: query service with JSON objects only
mvn clean verify -Pbenchmark
mvn clean verify
http://tutorials.jenkov.com/java-performance/jmh.html
Recipe --has-a--> List --has-a--> Ingredient && --has-a--> Quantity && --has-a--> MeasurementType