Rename _protocol.hpp messaging files for the NATS world
Table of Contents
This page is a capture in the next bucket of the product backlog — a pre-sprint idea, not yet pulled into a sprint as a story.
What
The messaging headers generated per entity are named <entity>_protocol.hpp
(e.g. currency_protocol.hpp, currency_market_tier_protocol.hpp), with an
aggregator protocol.hpp. The "protocol" suffix is a holdover from the old
binary-protocol era. Today these files just hold NATS request/response
struct=s (each with a =nats_subject and a response_type) — there is no
wire protocol to speak of. Reconsider the naming: either drop the _protocol
postfix (e.g. <entity>_messages.hpp / <entity>_messaging.hpp, or fold into
a messaging/ namespace that makes the suffix redundant) or confirm
"protocol" still reads sensibly as "the NATS message contract" and keep it
deliberately rather than by inertia.
Scope: the codegen protocol facet templates
(ores.cpp.protocol.*), the output paths in the facet catalogue, the
aggregator header, and every #include across api/core/qt/shell/http/cli.
A rename touches a lot of includes, so it is best done as a mechanical
codegen-driven sweep (regenerate + fix includes) rather than by hand.
Why
Naming by inertia: the suffix describes a world (a hand-rolled binary protocol) that no longer exists. New contributors read "protocol" and look for serialization/framing that isn't there. Aligning the name with the NATS request/response reality (or consciously keeping it) removes that friction and is a good cleanup to fold into the broader codegen/messaging tidy-up.
References
- Generated headers:
projects/ores.refdata/api/include/ores.refdata.api/messaging/<entity>_protocol.hppand the aggregatormessaging/protocol.hpp. - Templates:
projects/ores.codegen/library/templates/ores.cpp.protocol.*.org(theprotocolfacet).
See also
- Commission: currency — surfaced while reconciling currency's messaging headers during the unified-model migration.