open-rmf / rmf

Root repository for the RMF software
Apache License 2.0
238 stars 59 forks source link

Put query update message on a diet #75

Closed gbiggs closed 3 years ago

gbiggs commented 3 years ago

Feature request

Description

The message used to send query updates from the schedule node to mirror nodes includes the entire original query in it. The mirror nodes already know their query, so they don't require it, and if the query is complex this is a significant extra payload to transmit in query updates, which are published at a high frequency.

The query should be removed from the message.

Implementation considerations

The query is included in the message so that mirrors can verify that they are receiving the correct update for their query, in case an error in the schedule node causes queries to get mixed up somehow. The removal of it from the message must provide an alternative means of verifying that the correct query update is being received.

mxgrey commented 3 years ago

I think adding a concept of a "schedule node version" would help with this, where each time a schedule node fails over, that version number gets bumped. Mirror updates would contain the schedule node version that the update is coming from, while Participant updates would contain the schedule node version that the update is targeted towards. Then updates can be discarded if the schedule node version is wrong, while the rectification systems give us eventual consistency.