This repository has been archived by the owner on Feb 8, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27
Implement Serialization Framework and rework WireFormat #20
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jhugard
changed the title
[WIP] Refactor and complete wireformat (Issue #19)
[WIP] Rework WireFormat and implement Serialization framework
Feb 18, 2016
jhugard
changed the title
[WIP] Rework WireFormat and implement Serialization framework
[WIP] Implement Serialization Framework and rework WireFormat
Feb 18, 2016
- 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.
…te where to continue.
… build. Need to add serialization tests & optional/required.
jhugard
force-pushed
the
refactor-and-complete-wireformat-19
branch
from
February 20, 2016 07:06
09e49f2
to
a5b0f1c
Compare
Fix a serialization bug. Some minor code refactorings. Add lots of method and function comments.
…n that chains all field serializers.
…ating newly-constructed objects and inner messages.
Also now supports inner message as a Some type.
jhugard
force-pushed
the
refactor-and-complete-wireformat-19
branch
from
March 1, 2016 21:54
4419316
to
6901a3b
Compare
jhugard
changed the title
[WIP] Implement Serialization Framework and rework WireFormat
Implement Serialization Framework and rework WireFormat
Mar 2, 2016
jhugard
force-pushed
the
refactor-and-complete-wireformat-19
branch
from
March 2, 2016 05:40
47da42b
to
d73adfb
Compare
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> |
There was a problem hiding this comment.
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
Great work! |
This was referenced Mar 3, 2016
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implement Features from Issue #19
Update: All of the above are now implemented, with unit tests.
Remaining work:For proto2, missing required fields should cause exceptionFor proto2/proto3, need to elide default/zero values when serializingFor proto2, missing optional messages should probably be modeled as a Some typeWould very much like a code review & feedback on the overall direction, in particular the serialization framework. Thanks!