Skip to content
This repository has been archived by the owner on Feb 8, 2022. It is now read-only.

Implement Serialization Framework and rework WireFormat #20

Merged
merged 20 commits into from
Mar 3, 2016

Conversation

jhugard
Copy link
Collaborator

@jhugard jhugard commented Feb 18, 2016

Implement Features from Issue #19

Needs final code review before merging to master.

  • Rework WireFormat to support serialization
  • Implement ZeroCopyBuffer to reduce memory copies and array allocations
  • Create framework for serialization, with an eye to eventual F# code generation

Update: All of the above are now implemented, with unit tests.

Remaining work:

  • For proto2, missing required fields should cause exception
  • For proto2/proto3, need to elide default/zero values when serializing
  • For proto2, missing optional messages should probably be modeled as a Some type

Would very much like a code review & feedback on the overall direction, in particular the serialization framework. Thanks!

@jhugard jhugard changed the title [WIP] Refactor and complete wireformat (Issue #19) [WIP] Rework WireFormat and implement Serialization framework Feb 18, 2016
@jhugard jhugard changed the title [WIP] Rework WireFormat and implement Serialization framework [WIP] Implement Serialization Framework and rework WireFormat Feb 18, 2016
jhugard and others added 7 commits February 19, 2016 23:05
- Rewrite wire-format encoding and decoding to use zero-copy buffer
(based on ArraySegment) to minimize memory copies and limit object allocations.
- Add full WireFormat unit test suite.
- Rename Froto.Core.IO to Froto.Core.WireFormat.
Includes a sample serializable class, but NO unit tests! (yet)

Todo: add dehydrate functions for signed types & floats.

Todo: figure out how to support repeated fields (non-packed).  Should be able to add a helper that composes with the existing hydrate and dehydrate methods.

Todo: Add unit tests for all serialization & deserialization code.  Consider using binary files encoded with stock protobuf code.
… build. Need to add serialization tests & optional/required.
@jhugard jhugard force-pushed the refactor-and-complete-wireformat-19 branch from 09e49f2 to a5b0f1c Compare February 20, 2016 07:06
@jhugard jhugard self-assigned this Feb 20, 2016
jhugard and others added 7 commits February 19, 2016 23:48
Fix a serialization bug.
Some minor code refactorings.
Add lots of method and function comments.
…ating newly-constructed objects and inner messages.
Also now supports inner message as a Some type.
@jhugard jhugard force-pushed the refactor-and-complete-wireformat-19 branch from 4419316 to 6901a3b Compare March 1, 2016 21:54
@jhugard jhugard changed the title [WIP] Implement Serialization Framework and rework WireFormat Implement Serialization Framework and rework WireFormat Mar 2, 2016
@jhugard jhugard force-pushed the refactor-and-complete-wireformat-19 branch from 47da42b to d73adfb Compare March 2, 2016 05:40
@jhugard
Copy link
Collaborator Author

jhugard commented Mar 2, 2016

Ready for code review.

@@ -3,7 +3,7 @@
<metadata>
<id>Froto.Parser</id>
<version>0.0.0</version>
<authors>Cameron Taggart</authors>
<authors>Cameron Taggart, James Hugard</authors>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this change! :)

ctaggart added a commit that referenced this pull request Mar 3, 2016
Implement Serialization Framework and rework WireFormat
@ctaggart ctaggart merged commit 80ec6c4 into master Mar 3, 2016
@ctaggart ctaggart deleted the refactor-and-complete-wireformat-19 branch March 3, 2016 03:59
@ctaggart
Copy link
Owner

ctaggart commented Mar 3, 2016

Great work!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants