Module grpc

Module grpc 

Source
Expand description

§gRPC Transport Implementation

This module provides the gRPC-based transport layer for distributed traceability operations in the trace2e framework. It implements both client and server functionality for machine-to-machine (M2M) communication using Protocol Buffers and the Tonic gRPC framework.

§Components

  • M2mGrpc: Client service for making outbound gRPC calls to remote middleware
  • P2mHandler: Server implementation that routes incoming gRPC requests for P2M operations
  • M2mHandler: Server implementation that routes incoming gRPC requests for M2M operations
  • O2mHandler: Server implementation that routes incoming gRPC requests for O2M operations
  • Protocol Buffer Conversions: Type conversions between internal and protobuf types

§Connection Management

The gRPC client maintains a cache of connected remote clients to avoid repeated connection overhead. Connections are established on-demand and reused for subsequent requests to the same remote endpoint.

§Service Operations

§Process-to-Middleware (P2M)

  • Local process enrollment (file descriptors)
  • Remote process enrollment (network connections)
  • I/O request authorization
  • I/O operation reporting

§Machine-to-Machine (M2M)

  • Destination compliance policy retrieval
  • Source compliance policy retrieval
  • Provenance information updates

§Operator-to-Middleware (O2M)

  • Policy management
  • Confidentiality management
  • Integrity management
  • Deletion management
  • Consent management
  • Provenance information retrieval

§Protocol Buffer Integration

The module includes comprehensive type conversions between the internal trace2e types and their Protocol Buffer representations, ensuring seamless serialization and deserialization across network boundaries.

Modules§

proto
Protocol Buffer definitions and descriptor sets for the trace2e gRPC service.

Structs§

M2mGrpc
gRPC client service for machine-to-machine communication.
M2mHandler
O2mHandler
gRPC server handler for operator-to-middleware operations.
P2mHandler
gRPC server router that handles incoming requests and routes them to appropriate services.

Constants§

DEFAULT_GRPC_PORT
Default port for gRPC communication between trace2e middleware instances.

Functions§

destination_to_proto_node_variant
Helper function that performs the actual Destination -> proto conversion logic. This can be reused by other modules that need the same conversion.