-
Notifications
You must be signed in to change notification settings - Fork 403
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
Reserved chunkinfo user payload header #14
Comments
Thanks for the request @rex-schilasky Having a user defined extra space in the chunk header would be possible. But I'm wondering if this could also be solved in your middleware code that uses iceoryx as transport layer. This would be similar to what we are doing under the hood. We also provide a pointer to the payload to the user but have in front of that memory space for our chunk header. What do you think? |
This is exactly how I use iceoryx right now. The only disadvantage from my point of view is that I'm a kind of specific here in that way that when I want to communicate between an eCAL task that send out some payload buffer (maybe encoded in google protobuf) and I want to receive that buffer in a 'basic' iceoryx task, I need to know that there is a specific header and cut it off before processing the payload. If there were a "transport specific" reserved header that is only used for additional internal data between a pub / sub connection (maybe internal clock, hashes, id ..) then this information would be transparent for the higher user level API. Not a must have but a nice to have one .. |
Got your point. Maybe we could make this more flexible for being able to introduce a variable size byte array. |
Is this still planned to have a "byte array" like flexible ChunkHeader member ? This would qualify eCAL to have real zero copy local message transport. |
@rex-schilasky, how many bytes do you need for your header? There is another possibility, we could partition the payload further and add userHeader and userPayload functions. By default, userHeader would return a nullptr and the userPayload function would return the pointer to the actual payload. If a user header is used, the size of this header would be stored in the ChunkHeader and userPayload() would return the calculated address of the user payload.
What do you think? Aside from better naming ;) |
@elBoberido looks perfect for me. Would be really great to get this feature and UserHeader is not that bad ;) |
okay, it's on my TODO but I don't know when I have time for this, since there are some topics with higher priority, like mac and windows support. |
Pain is a hard word. My projects is using iceoryx successfully now and this change will only improve performance. |
@rex-schilasky, I'm currently working on this and need to clarify one thing. Do you need to be able to set a custom header per sender port or would it be sufficient for you if you could specify it at compile time |
Signed-off-by: Kraus Mathias (CC-AD/ESW1) <[email protected]>
@elBoberido to specify it at compile time would be sufficient in the meaning of specifying it's fixed, maximum size in advance. |
@elBoberido what do you think, how much work is left and is this a topic for 1.0 release. As this could be an API breaker |
@budrus @rex-schilasky sorry, this completely slipped my attention. I have a branch with some ideas. There are some open points, but I think there is work for 1-2 weeks left. |
Signed-off-by: Mathias Kraus <[email protected]>
Signed-off-by: Mathias Kraus <[email protected]>
Signed-off-by: Mathias Kraus <[email protected]>
@rex-schilasky, please have a look at the proposed design |
…nly to the ChunkSender Signed-off-by: Mathias Kraus <[email protected]>
Signed-off-by: Mathias Kraus <[email protected]>
…load Signed-off-by: Mathias Kraus <[email protected]>
Signed-off-by: Mathias Kraus <[email protected]>
Signed-off-by: Mathias Kraus <[email protected]>
…stom header Signed-off-by: Mathias Kraus <[email protected]>
Signed-off-by: Mathias Kraus <[email protected]>
Signed-off-by: Mathias Kraus <[email protected]>
… call on the untyped C++ API Signed-off-by: Mathias Kraus <[email protected]>
Signed-off-by: Mathias Kraus <[email protected]>
… call on the C API Signed-off-by: Mathias Kraus <[email protected]>
…ons and check if iox_pub_init works Signed-off-by: Mathias Kraus <[email protected]>
…ding the BasePublisher Signed-off-by: Mathias Kraus <[email protected]>
Signed-off-by: Mathias Kraus <[email protected]>
…iding the BasePublisher Signed-off-by: Mathias Kraus <[email protected]>
Signed-off-by: Mathias Kraus <[email protected]>
…kHeader::userPayload Signed-off-by: Mathias Kraus <[email protected]>
Signed-off-by: Mathias Kraus <[email protected]>
Signed-off-by: Mathias Kraus <[email protected]>
…ccess-to-chunk-header Iox eclipse-iceoryx#14 restrict access to chunk header
…yped-user-header-API Iox eclipse-iceoryx#14 adjust untyped user header api
Signed-off-by: Mathias Kraus <[email protected]>
…h_roudi_environment Signed-off-by: Mathias Kraus <[email protected]>
….hpp Signed-off-by: Mathias Kraus <[email protected]>
Signed-off-by: Mathias Kraus <[email protected]>
…e-chunk-mocks Iox eclipse-iceoryx#14 consolidate chunk mocks
Brief feature description
When sending a payload chunk via publishers sendChunk method a user can pass the payload memory pointer and it's size to transfer it with zero copy behavior to the subscribers side. If there is any additional content that needs to be transferred too (like counter, user timestamp, hash values ..) there is no option to apply this information additionally into the chunk header. So the only way to transport the payload data and some additional header information as single chunk is to do an extra memory copy in a new payload memory block before sending it as one chunk. So for this use case the amazing zero memory concept is broken.
Possible solution
Provide a reserved space in the ChunkInfo header to hold / transfer a user specific payload header that is not in the same linear memory like the payload data.
edited by @elBoberido
Progress Tracking
ChunkHeader
and write test for the new functionalityChunkInfo
and use the refactoredChunkHeader
in the code baseChunkHeader
members and hand out references instead of pointerchunk_mock_dds.hpp
and userchunk_mock.hpp
insteadpayload
butchunkPayload
anduserPayload
. ThechunkPayload
consists of thecustomHeader/userHeader
anduserPayload
The text was updated successfully, but these errors were encountered: