You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Accessing a variable length SBE property modifies the state of the auto-generated SBE classes by advancing an offset field. Client code has to access every variable length property exactly once, in order. It's common to pass around lists or strings whose length we can't know ahead of time; in such cases SBE client code is brittle and hard to debug.
Could you add auto-generated DTOs to the SBE code-gen to mitigate this problem? The requirements for these objects would be:
Safe to get or set any property in any order
Index-based access for array-like collections
Use separately allocated memory for the DTOs, with methods to convert the DTOs to / from the wire format
The DTOs would be really useful in non-latency-critical scenarios such as testing, debugging tools and post-processing of persisted messages. It's understood that using the DTOs will incur a performance penalty.
C++ / C# are the two languages used by the author of this request, but I can imagine other users wanting this feature in code-gen for other languages.
The text was updated successfully, but these errors were encountered:
Accessing a variable length SBE property modifies the state of the auto-generated SBE classes by advancing an offset field. Client code has to access every variable length property exactly once, in order. It's common to pass around lists or strings whose length we can't know ahead of time; in such cases SBE client code is brittle and hard to debug.
Could you add auto-generated DTOs to the SBE code-gen to mitigate this problem? The requirements for these objects would be:
The DTOs would be really useful in non-latency-critical scenarios such as testing, debugging tools and post-processing of persisted messages. It's understood that using the DTOs will incur a performance penalty.
C++ / C# are the two languages used by the author of this request, but I can imagine other users wanting this feature in code-gen for other languages.
The text was updated successfully, but these errors were encountered: