-
Notifications
You must be signed in to change notification settings - Fork 530
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
[csharp] use IDirectBuffer implementation from Agrona.NET #492
Comments
@JPWatson Should anything be done on this? |
Hello, Thanks for advance. |
Yes, I have been working on it. We've got an early stage generator for SBE that uses .NET implementation of Agrona. For the time being, there is a workaround. You can use the pointers to wrap the same underlying memory.
|
@JPWatson Any update on how you are getting along with this? |
We have been incubating a generator that mirrors the Java generator and uses the Agrona.NET interfaces. Would be happy to share that if you're interested? |
That would be much appreciated. |
@juddgaddie Feel free to have a place around with this: |
Eventually, I hope to get this into the main repository once it has some tests around it. |
I also use this generator in Aeron.NET to generate the Archive/Cluster codecs. Source for this build of the JAR is here: |
Thanks for sharing, @JPWatson which version of CSharpGenerator is more up to date https://github.com/JPWatson/sbe-generators or https://github.com/JPWatson/simple-binary-encoding/commits/csharp-update ? |
AFAIR there isn't any difference between the generators themselves. |
@JPWatson is the bounds checking not implemented simply because you didn't get around to it or is there any technical reason? |
@juddgaddie There is bound checking code in UnsafeBuffer but it's set at compile time rather than runtime. From what I remember, there just wasn't an obvious way to mirror the same behaviour as the java version. |
Like Java, C# (unlike c/c++) is typically not compiled from sources for that reason I think the bounds checking would be better served with a runtime toggle we could use system environment variables (the same approach as c or c++ code uses for runtime configuration) I also would think the default build that goes to Nuget should have bounds checking enabled by default. Happy to send PRs |
@JPWatson Example of what I mean here: https://gist.github.com/juddgaddie/eeafbbb195a332bf72808748cdcd4336 |
It would be nice if Aeron.NET and the generated c# from sbe referred to the same IDirectBuffer interface. I guess this is dependent on AdaptiveConsulting/Aeron.NET#57
The text was updated successfully, but these errors were encountered: