Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically let Ditto figure out "pre-defined" extraFields to send along with events and messages #2099

Open
thjaeckle opened this issue Jan 17, 2025 · 0 comments

Comments

@thjaeckle
Copy link
Member

Following up on #2072 - where static configuration was added which "pre-defined" extraFields to proactively send with Thing "Events" and "Messages" in order to reduce roundtrips in the cluster to retrieve the extraFields.

It would be even better to let Ditto automatically figure out

  • for which namespaces
  • which "extraFields" are requested frequently
  • and pro-actively start sending them, aiming to reduce internal fetching of extraFields

Ditto could e.g. track how often a RetrieveThing command (in scope of "enrichment" - which could be identifiable via an internal header) for specific fields of a namespace is done and automatically build up a cache of "most frequently" asked for fields.
Then start to send them pro-actively as pre-defined extraFields (see #2072 for the fundamentals on that).

Reasoning of this is that e.g. connections have rather statically configured "extraFields" - and via connections Ditto most likely gets most of the "extraFields" enrichment requests.
Sporadically, also WebSocket and SSE (Server Sent Event) may ask for extraFields - but this should not be much, so ideally such things would not be pro-actively added by the mechanism (to also not send too much stuff pro-actively).

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

No branches or pull requests

1 participant