-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Description:
Currently, the Agent Connector’s request_mission method simply publishes a mission request to helyOS Core without waiting for or returning any response. This “fire‐and‐forget” approach means that the caller never receives confirmation or the mission id generated by helyOS Core. This is problematic in scenarios where the agent needs to know the outcome of its mission request immediately (e.g., for logging, tracking, or further processing).
Proposed Change:
Introduce a new class (e.g., MissionRPCConnector) that wraps the mission request functionality into an RPC-style call. This class should mimic the behavior of the existing DatabaseConnector (as seen in our repository) by publishing a mission request message with the proper reply_to and correlation_id properties and then waiting synchronously for a response from helyOS Core. The expected response should include the mission id of the created mission, which is then returned by the RPC call.
Rationale:
-
Immediate Feedback:
By converting the mission request to an RPC call, agents receive immediate confirmation and the mission id from helyOS Core. This facilitates tracking and handling of mission assignments. -
Error Handling:
The new implementation allows for proper timeout handling. If no response is received within a defined period, the caller is notified via aTimeoutErrorinstead of hanging indefinitely. -
Consistency:
Mimicking theDatabaseConnectorclass structure provides consistency in our RPC mechanism across different parts of the SDK.