Skip to content

Conversation

@bryce-anderson
Copy link
Contributor

@bryce-anderson bryce-anderson commented Apr 23, 2024

See #2902 for a counter proposal using a map like abstraction.

Motivation:

We're trying out a couple API's that let us add additional metadata to the endpoints provided by ServiceDiscoverer.

Modifications:

This example makes the weight metadata a first class concept on the ServiceDiscovererEvent interface.

I think there are some pros and cons

Pros:

  • It's clean.
  • It's very clear what the data is and where it comes from.

Cons:

  • Everything that needs to be passed through must become a field.
  • Right now the protocol defines three key parts: (address, status, metadata) where metadata is 'everything else'. Making meta-data first class fields muddies the waters a bit.
  • Changing the meta-data requires making a proxy class and that will rely on all underlying proxies to forward correct data, eg not use the default.

Motivation:

We're trying out a couple API's that let us add additional
metadata to the endpoints provided by ServiceDiscoverer.

Modifications:

This example makes the weight metadata a first class concept
on the ServiceDiscovererEvent interface.

I think there are some pros and cons

Pros:
- It's clean.
- It's very clear what the data is and where it comes from.

Cons:
- Everything that needs to be passed through must become a field.
- Right now the protocol defines three key parts:
  (address, status, metadata) where metadata is 'everything else'.
  Making meta-data first class fields muddies the waters a bit.
- Changing the meta-data requires making a proxy class and that
  will rely on all underlying proxies to forward correct data, eg
  not use the default.
@bryce-anderson
Copy link
Contributor Author

Going to close this for now.

@bryce-anderson bryce-anderson deleted the bl_anderson/ServiceDiscovererMetadata-asFields branch May 1, 2024 15:35
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

Successfully merging this pull request may close these issues.

1 participant