Skip to content

Initial implementation for HV LoLa gateway sample transport layer#508

Open
SebSparrowHawk wants to merge 1 commit into
eclipse-score:mainfrom
SebSparrowHawk:ssp_sample_transport_layer_impl
Open

Initial implementation for HV LoLa gateway sample transport layer#508
SebSparrowHawk wants to merge 1 commit into
eclipse-score:mainfrom
SebSparrowHawk:ssp_sample_transport_layer_impl

Conversation

@SebSparrowHawk

Copy link
Copy Markdown
Contributor

A sample implementation of a transport layer for the Hypervisor LoLa gateway.

@SebSparrowHawk SebSparrowHawk force-pushed the ssp_sample_transport_layer_impl branch 4 times, most recently from f0c4236 to 964676f Compare June 12, 2026 15:20
@SebSparrowHawk SebSparrowHawk force-pushed the ssp_sample_transport_layer_impl branch 5 times, most recently from 3702f09 to 8048124 Compare June 29, 2026 14:54
std::uint32_t shm_data_size);

GatewayCore& gateway_app_;
std::unique_ptr<IBidirectionalTransport> transport_;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Applied that change.

return transport_->Setup();
}

void SampleHyperVisorTransport::OnMessageReceived(std::unique_ptr<TransportMessage> message)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Compact this method by calling explicit subfunctions for each message.

I.e. in case of
if (message->GetType() == MessageType::kProvideServiceRequest) call
HandleProvideServiceRequest(request);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't quite correct, as you implemented ResolveShmPaths and GetShmSizes ....

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would start maybe with the following paragraph:

The functionality a Gateway Transport Layer has to provide can be roughly divided into two parts:

  1. Provide a message transport between the gateways, so that the gateways instances can interact with specific control messages.
  2. 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,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 ProvideService request, the destination Transport Layer receives from the source side, there is an InstanceSpecifier and the sizes for the control/data shm-objects.
  • from the InstanceSpecifier the 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.

@SebSparrowHawk SebSparrowHawk force-pushed the ssp_sample_transport_layer_impl branch 3 times, most recently from d772072 to 2f9b7b3 Compare July 7, 2026 13:54
crimson11
crimson11 previously approved these changes Jul 9, 2026
@SebSparrowHawk SebSparrowHawk marked this pull request as ready for review July 9, 2026 14:54
@SebSparrowHawk SebSparrowHawk force-pushed the ssp_sample_transport_layer_impl branch from 2f9b7b3 to 42b5ad5 Compare July 9, 2026 14:59
crimson11
crimson11 previously approved these changes Jul 9, 2026
@crimson11 crimson11 enabled auto-merge July 9, 2026 15:03
@crimson11 crimson11 added this pull request to the merge queue Jul 10, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 10, 2026
@castler castler added this pull request to the merge queue Jul 10, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 10, 2026
A sample implementation of a transport layer for the mw::com gateway for Hypervisors.
@SebSparrowHawk SebSparrowHawk force-pushed the ssp_sample_transport_layer_impl branch from 42b5ad5 to 2c08e42 Compare July 10, 2026 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants