---
# System prepended metadata

title: 'Client-side room discoverability: federation edition'

---

# Client-side room discoverability: federation edition

## Solution 1: Pushing newly published rooms to multiple servers

👍️

* Straightforward to implement

👎️

* Manual process to add existing rooms to a new server
* (moderation) Difficult to figure out for sure which user is doing the remote publication

## Solution 2: Server-side aggregation from multiple servers when querying the room directory

👍️

* Can be flexible about which homeservers to request the directory from
* Homeservers can have an admin-defined list of servers to query

👎️

* Blocks room directory requests on federation traffic
	* Can be improved by caching (unclear when to clear/refresh a server's cache)
* Pagination might be complicated(?)
* (moderation) Impossible to know which user published a room

## Solution 3: Room directory as room

👍️

* Re-uses existing pub-sub primitives
* Comes with federation for free
* Standard permission management

👎️

* Unclear how to discover a server's room directory room (reserved alias?)
* Possible complexity around user management:
	* who's the room's creator/admin
	* if the room is created automatically how does one get perms
	* how does one server subscribe to another's directory without all of their users joining (which would cause increased load because state res)?
		* peeking?
		* server user?
		* pick the first user that asked for that server's directory and join them forever? (deactivation would need special handling)

## Solution 4: State event dictating whether a room should be listed

👍️

* All servers in the room can pick up the information
* Clearer to users/clients who can publish

👎️

* Local moderation rules can cause the event and the state to get out of sync (eg a server that didn't emit the event decides the room should not be listed)
* Large amount of spec and implementation work as this would fully replace the existing `/directory/list` APIs
* Unclear how to deal with existing published rooms
* Unclear how to deal with published rooms in which all admins/mods leave
* A server can list a room only if it's in it