feat: IPC binding for socom#86
Conversation
Transport socom semantics over IPC to another process. It uses shared memory for payloads to avoid copying huge payloads.
License Check Results🚀 The license check job ran with the Bazel command: bazel run //:license-checkStatus: Click to expand output |
|
The created documentation from the pull request is available at: docu-html |
massif did not work yet but I am on it
However some changes should be considered workarounds
The Error type does not own any string, only string_view. Thus it the error message given must be likely a static string
send() can fail whenever the peer disconnects
| ### Overall Statistics | ||
| - **Total Heap Allocated**: 10,447,202 bytes (~10.0 MB) | ||
| - **Peak Heap Usage**: 195,318 bytes (~191 KB) | ||
| - **Peak Stack Usage**: 26,832 bytes (~26 KB) |
There was a problem hiding this comment.
This means that we allocate/de-allocate a lot, right? This we should look into and minimize. In a safety-critical system it would be favorable to allocate on startup and then don't have any heap operations until shutdown. That means total heap allocated should be more or less equal to peak heap usage.
There was a problem hiding this comment.
I reworked the performance tests and memory profiling tests. There was a bug, which skipped an iteration if it failed to allocate shared memory, which can happen after all slots were consumed, but not freed. Now it looks more reasonable:
Towards your conclusion that there might be many small allocations and deallocations, I have now an idea where they come from. The socom::Payload is an interface class and shared_ptr is used for reference counting. Thus we see lots of shared_ptr<socom::Payload> constructions and destructions.
There was a problem hiding this comment.
with latest changes allocations during event updates are gone. However due to the use of unordered_map and std::vector, there could still some happen after init and these have to be properly pre initialized
|
Test code when only one side provides a service, but not the other one. Currently tests are always configured to be symmetric and even the same service is possible to be offered on both sides. UPDATE Dealt with in 1a52ead |
mariuswbr
left a comment
There was a problem hiding this comment.
Stumbled on this while trying to use the IPC binding in someipd and gatewayd.
… times from multiple threads
…t shared memory configuration for method calls and event updates.
… mw-com-as-socom-bridge

Transport socom semantics over IPC to another process. It uses shared memory for payloads to avoid copying huge payloads.
TODO