-
-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Offset Model (8-bit, 16-bit, 64-bit offset sizes, file identifier sizes) #207
Conversation
bump Microsoft.CodeAnalysis.CSharp.Workspaces and Microsoft.Net.Compilers version from 3.8.0 to 3.11.0 update (some) tests, more to go
Codecov Report
@@ Coverage Diff @@
## master #207 +/- ##
==========================================
- Coverage 94.68% 94.68% -0.01%
==========================================
Files 104 105 +1
Lines 7584 7635 +51
Branches 677 681 +4
==========================================
+ Hits 7181 7229 +48
- Misses 300 303 +3
Partials 103 103
Continue to review full report at Codecov.
|
Hey -- Now that I have v6 done, I'm interested in taking a look at this. Thanks for the suggestions here. There is a lot to think about with this change. There a few things that stick out to me initially:
I've seen your So, I'm totally game for figuring out what the bigger picture here looks like, but this will be a pretty fundamental change and I want to make sure we do due diligence up front. |
And finally -- what does this look like if/when You might also be interested in this: https://github.com/dotnet/apireviews/tree/main/2016/11-04-SpanOfT#spant-and-64-bit |
BigSpans is an implementation of option 3 in that API review. It's the .NET Span runtime library code made to work with (u)longs. There's no good way around not using it (or a reimplementation of it) if you need to address a 64-bit address range. If
Yeah, we'll have some of that.
Per-compilation is easier. Per-table can come later as an extension or otherwise.
That's what's holding us up with porting |
Thanks for the thoughts. I've been mulling this over today. Based on what I've seen, the It seems like there's an opportunity here to do more than just "64 bit flatbuffers". I think if we're going to diverge from the binary format of FlatBuffers, we shouldn't do it halfway. There's quite a bit of mindshare and expertise in this area between you, me, and the folks from
This is, obviously, a big endeavor, but much of the code from FlatSharp, flatcc, flatc will be reusable. I'm interested in collaborating on a whitepaper for some new specification, and seeing if something compelling pops out of that discussion. |
Given the foundational changes we're discussing here, I think I want to do this outside of the core FlatSharp repo. FlatSharp is at this point pretty mature and stable, and I'd like it to remain FlatBuffer focused and have no dependencies outside of Roslyn / .NET standard library. I also don't know what the future looks like for FlatSharp; there aren't any immediate "things I want to add" on my list (which has happened before). That's not to say I consider it "finished" or have plans to abandon it. It's more an expression of the fact that FlatSharp is at feature parity with Anyway, my thoughts in summary are that...
|
This all sounds reasonable. Happy to change the name of BigBuffers to describe the project better. |
You might be interested in our changelist at https://github.com/StirlingLabs/BigBuffers/blob/main/docs/source/DifferencesFromFlat.md @TYoungSL made alignment optional without harming compatibility against FlatBuffers but it would be better to have optional alignment of tables in the spec. We actually need alignment in many of our tables for SIMD but some users wouldn't have that requirement. |
Implements a new component for type models,
OffsetModel
to allow varying offset and file identifier sizes.Bumps Microsoft.CodeAnalysis.CSharp.Workspaces and Microsoft.Net.Compilers versions from 3.8.0 to 3.11.0.
VTable offset sizes are not parameterized yet.
Messages can be extremely short when 16 and 8-bit offset sizes are specified.
Messages can (obviously) contain a lot more data when 64-bit offset sizes are specified.
Implemented by compiler options,
--offset-size
,--file-identifier-size
and--strict-file-identifier-size
.This will be tested for parity against flatcc built with non-standard offset sizes. (dvidelabs/flatcc#206)
StirlingLabs have a fork of Google's FlatBuffers called BigBuffers which also aims for parity with flatcc with 64-bit offset sizes.