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

Module or synapse option : [Room Visibility] Publish the federated public rooms on the local room directory #5

Open
jdauphant opened this issue Jul 25, 2022 · 11 comments
Assignees
Labels
enhancement New feature or request

Comments

@jdauphant
Copy link

Problem

Clients need to retrieve all rooms from all HS room directory

Solution

Each HS could have the room directories of all HS

Setting could be

- sync_room_directory_of_hs:
  - matrix.dinum.agent.tchap.gouv.fr

Notes

  • When room is removed from room directory, we should remove it too
@jdauphant jdauphant changed the title Module or synapse option : On each instance, register all rooms in other room directory Module or synapse option : [Room Visibility] Publish the federated public rooms on the local room directory Jul 25, 2022
@giomfo
Copy link

giomfo commented Jul 25, 2022

@babolivier, we would like to retrieve from the user's HS all the Tchap public rooms (created on the multiple federated instances)

We succeeded to add in the agent.dinum HS room directory a public room created on agent.interieur, by changing the room visibility settings from a room member hosted on agent.dinum (this user was a room member (admin))

image

  • the public room is now visible from both room directories (agent.interieur and agent.dinum)
  • no local alias /address was required to succeed

Can we plan to set up a optional module in Synapse to group all the existing public rooms in a closed federation by using this approach ?

@babolivier
Copy link

After some exploration and discussion we're going to implement this in the form of server-side aggregation of public rooms. The idea is that homeservers would be able to use a list of homeservers to query the room directory of (provided either by the client, the server's config, or both), and when receiving a request on the /publicRooms endpoint a homeserver would query those homeservers as well as its local database and send an aggregation of the results it's received. We're deciding to do this in Synapse's mainline rather than a module as this change would be useful to the wider ecosystem. I'm happy to discuss this further if more information is needed.

@giomfo
Copy link

giomfo commented Sep 6, 2022

Thank you @babolivier for your feedback. This sounds like a good plan.
@jdauphant can you please confirm we can go for it?

@giomfo giomfo added the enhancement New feature or request label Sep 6, 2022
@jdauphant
Copy link
Author

Looks good to me.

@giomfo We only be able to retrieve this feature when we will be in full mainline?

@giomfo
Copy link

giomfo commented Sep 8, 2022

We only be able to retrieve this feature when we will be in full mainline?

yes

@anoadragon453
Copy link

@giomfo is Tchap planning to allow clients to select from a list the remote homeservers to aggregate results from? And if so, will that work be merged into upstream mainline Element clients?

Or will you be relying on a static homeserver config to choose the homeservers to query public rooms from?

@giomfo
Copy link

giomfo commented Sep 26, 2022

@giomfo is Tchap planning to allow clients to select from a list the remote homeservers to aggregate results from? And if so, will that work be merged into upstream mainline Element clients?

Or will you be relying on a static homeserver config to choose the homeservers to query public rooms from?

Hi @anoadragon453, the plan is the second option: "a static homeserver config".
@jdauphant can you please confirm the homeservers selection is not expected on the client side?

@anoadragon453
Copy link

FYI, I'm going to be operating under the assumption that homeserver selection is not expected on the client side for now.

@giomfo
Copy link

giomfo commented Feb 23, 2023

@jdauphant can you confirm the homeserver selection is not expected on the client side for this feature?

@jdauphant
Copy link
Author

We will remove the switch on the web client.
If the switch is showe and selected, results from all HS will be served anyway on any selection.

@giomfo
Copy link

giomfo commented Feb 28, 2023

@jdauphant FYI here is the current status from @anoadragon453 :
"- A draft PR is up that will allow Synapse modules to make federation requests: Add a method for Synapse modules to make federation requests
I’m keeping this as a draft until everything is ready and I have tested it all works.

  • A PR for allowing Synapse modules to take over the response for /publicRooms is in progress.

  • A new Synapse module that implements both of the above new functionality is in progress.

I’m hoping to have a working implementation of the latter two done by the end of today, then it will just be waiting on review. It’s expected that the module API changes for this issue will also land in Synapse v1.79."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants