Initial implementation for HV LoLa gateway sample transport layer#508
Initial implementation for HV LoLa gateway sample transport layer#508SebSparrowHawk wants to merge 1 commit into
Conversation
f0c4236 to
964676f
Compare
3702f09 to
8048124
Compare
| std::uint32_t shm_data_size); | ||
|
|
||
| GatewayCore& gateway_app_; | ||
| std::unique_ptr<IBidirectionalTransport> transport_; |
There was a problem hiding this comment.
rebame to message_transport_ -> makes reading code easier ... because now we have "transport" everywhere ... it is good to know, that this is the "endpoint" for the transport of messages.
There was a problem hiding this comment.
Applied that change.
| return transport_->Setup(); | ||
| } | ||
|
|
||
| void SampleHyperVisorTransport::OnMessageReceived(std::unique_ptr<TransportMessage> message) |
There was a problem hiding this comment.
Compact this method by calling explicit subfunctions for each message.
I.e. in case of
if (message->GetType() == MessageType::kProvideServiceRequest) call
HandleProvideServiceRequest(request);
There was a problem hiding this comment.
Applied that change.
| as these parts are vendor-specific and depend on the used HyperVisor and its shared memory abilities. | ||
| This includes the following methods: | ||
|
|
||
| - `ShmPaths score::mw::com::gateway::ResolveShmPaths(const impl::InstanceSpecifier&)` where a path to access the HV-shared memory region has to be created. |
There was a problem hiding this comment.
This isn't quite correct, as you implemented ResolveShmPaths and GetShmSizes ....
There was a problem hiding this comment.
I removed that part and switched to your recommendation, mentioning the limitations and expectations for that part of the implementation.
|
|
||
| # Gateway Transport Layer Sample Implementation | ||
|
|
||
| This module provides a sample implementation of a mw::com gateway's transport layer based on regular POSIX network sockets |
There was a problem hiding this comment.
I would start maybe with the following paragraph:
The functionality a Gateway Transport Layer has to provide can be roughly divided into two parts:
- Provide a message transport between the gateways, so that the gateways instances can interact with specific control messages.
- Provide the data exchange for the service-instance related data. In case of a non-copying shared memory setup, this means to make shared-memory accessible between VMs. I case of copying Transport Layer this means setting up DMA data transfers and the like.
For the 1st part this module provides a sample ...
|
|
||
| ## Vendor-specific implementation details | ||
|
|
||
| Parts that interact with the underlying shared memory have not been implemented as part of this sample implementation, |
There was a problem hiding this comment.
Maybe document:
Our sample Transport Layer implementation returns true in API IsMemorySharingSupported. So it is a sample for a Gateway Transport Layer for an inter-VM setup, where sharing of memory between VMs is possible.
It can't fully implement the part 2 (see above) with regard to making shared-memory objects visible/accessible between gateway domains (VMs) as this is vendor/hypervisor/OS specific. Thus, there are a TODOs in the code.
However, the basic assumption in this sample implementation is:
- in the
ProvideServicerequest, the destination Transport Layer receives from the source side, there is anInstanceSpecifierand the sizes for the control/data shm-objects. - from the
InstanceSpecifierthe Transport Layer can deduce the identification of the shared-memory objects created on the source side. - it can verify, whether the shm-object sizes communicated in the request match with the shm-objects he opened.
d772072 to
2f9b7b3
Compare
2f9b7b3 to
42b5ad5
Compare
A sample implementation of a transport layer for the mw::com gateway for Hypervisors.
42b5ad5 to
2c08e42
Compare
A sample implementation of a transport layer for the Hypervisor LoLa gateway.