Skip to content

Communication of federation availabilities #101

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

Closed
christophfriedrich opened this issue Apr 7, 2025 · 6 comments · Fixed by #102
Closed

Communication of federation availabilities #101

christophfriedrich opened this issue Apr 7, 2025 · 6 comments · Fixed by #102
Labels
question Further information is requested

Comments

@christophfriedrich
Copy link
Collaborator

More as a side quest to #100, I wanted to align the styling of FederationNotice and FederationMissingNotice. While doing so, I realised several other aspects about the communication of federation-related stuff in general:

When the user is presented with this warning of the FederationMissingNotice:

Image

...they might be wondering which services ARE available right now? If that information would be added to the list, the whole component would become very similar to the FederationNotice itself, just with an edited text because not all backends are online, to warn the user a little more.

Also, regarding the current wording, the list might not necessarily be "incomplete", as e.g. lists of all collections might be cached and not removed from the response just because the service is temporarily unavailable.

And in the FederationNotice, the whole communication could also be changed around -- for me, the default expectation is that a collection is just on one service, so this notice for one-backend collections:

Image

could be replaced by a green notice for multi-backend collections stating something like:

Wow, this collection is available on more than one backend in the federation!

Also, with the current implementation, the notice would claim that a collection is "only" available on X,Y,Z even if those are ALL backends of the federation.

Maybe the whole thing should be switched to an "availability board" which always lists all federation backends and shows red/yellow/green for "not available" / "available but offline" / "available and online"?

@christophfriedrich
Copy link
Collaborator Author

For now, I removed the "only" in "This collection is only available through the following" (see above for why).

But I just noticed this v-if that I didn't touch:

<section v-if="unsupported.length > 0" class="vue-component message-block federation federation-backends">

That's somewhat inconsistent now. Should I remove the v-if or put the "only" back in? In other words: What should be the communication line regarding federations?

@m-mohr
Copy link
Member

m-mohr commented Apr 10, 2025

Good question, I had to remember the details myself...

So the following is defined per specification:

  • You define federation backends in the landing page.
  • All resources that derive from this, i.e. are only available on a subset of backends shall report this. This is why the federation notice reports it with "only" and uses the condition.

The federation notice and the missing notice are somewhat independant of each other and should both be shown if the backends report it.

@m-mohr m-mohr linked a pull request Apr 10, 2025 that will close this issue
@christophfriedrich
Copy link
Collaborator Author

All resources that derive from this, i.e. are only available on a subset of backends shall report this.

I get that this was the intention, but that's not what is written in the federation extension spec. It says:

Every discoverable resource [...] CAN list the back-ends that support or host [it].

(capitalisation mine)

So we can't assume that the resource is available everywhere just because federation:backends is not present.

@m-mohr
Copy link
Member

m-mohr commented Apr 10, 2025

Indeed, it's a bit implicit. The schema for federation:backends says:

If not given, all back-ends support the resource.

Also, the header of the whole chapter for that property is:

Resources supported only by a subset of back-ends

Of course backends could always return the full list of backends, which makes it very repetitive and is not needed. I'll open a PR to clarify it.

@christophfriedrich
Copy link
Collaborator Author

Hm okay, indeed the schema does say it.

Then I think the text should be "In case not all back-ends of the federation support it, every discoverable resource [...] MUST list the back-ends that do support or host [it]." (bold to mark changes) Maybe even with the additional explanation "because otherwise clients will assume that all backends support or host it."

To be honest I would even prefer to rename the property to federation:only, in direct analogy to federation:missing, but I guess that would be too breaking? Both are lists of backends, but one gets the title federation:backends...

And as you mention the headings: Indeed they felt off to me when I first read the file. The 'restricting' nature of the term "supported only by" sounded like that section would be about cases where some things are missing, but the spec for federation:missing is actually the other section. Maybe "Lists of resources" should be extended to "Incomplete lists of resources" or "Lists of resources missing a subset of back-ends", as it's not really about how resources are listed, but how such a list is extended in case of problems.

Maybe this shouldn't be a comment here but a new issue in openeo-api.

@m-mohr
Copy link
Member

m-mohr commented Apr 11, 2025

I moved the issue to Open-EO/openeo-api#562
There's no intent to change the naming of the properties though, we can just clarify the documentation.

m-mohr added a commit that referenced this issue Apr 15, 2025
* Fix typos causing code to fail

* Apply same logic to fed:missing as to fed:backends

* Hide notice if missing backend is irrelevant

* Prevent FedMissingNotice in non-federation context

I returned `true` too eagerly :D When it's not a federation context, of course supportedBy is undefined, so affectedByMissing became true. The Notice didn't render anyway because of further checks in the component itself, but it was added to the DOM and that should be avoided too.

* Hide notice if `missing` is empty array

* Unify fed notice layouts and improve their texts (see #100, #101)

* Apply suggestions from code review (cleanup and style)

Co-authored-by: Matthias Mohr <webmaster@mamo-net.de>

* Change texts of federation notices (see #100, #101, #102)

---------

Co-authored-by: Matthias Mohr <webmaster@mamo-net.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants