From a66750cf5b32d6b78e0e3fa9a184d8e62743bb25 Mon Sep 17 00:00:00 2001 From: Ajay Bura <32841439+ajbura@users.noreply.github.com> Date: Mon, 2 Dec 2024 20:33:22 +0530 Subject: [PATCH 1/7] add server name query param for hierarchy endpoint proposal --- ...XX-servername-query-param-for-hierarchy.md | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 proposals/XXXX-servername-query-param-for-hierarchy.md diff --git a/proposals/XXXX-servername-query-param-for-hierarchy.md b/proposals/XXXX-servername-query-param-for-hierarchy.md new file mode 100644 index 00000000000..28f8b0b52a1 --- /dev/null +++ b/proposals/XXXX-servername-query-param-for-hierarchy.md @@ -0,0 +1,36 @@ +# MSCXXXX: `server_name` query param for /hierarchy endpoint + +To request the hierarchy of a space, clients need to call the +[/hierarchy](https://spec.matrix.org/v1.9/client-server-api/#get_matrixclientv1roomsroomidhierarchy) endpoint. This +endpoint does not require user to join the room before responding with hierarchy details. It instead check whether the +room is potentially joinable (per [MSC3173](https://github.com/matrix-org/matrix-spec-proposals/pull/3173)) before +responding. + +Because it doesn't not require space room to be joined before calling this endpoint, It is possible that the requested +room is not locally available on the server and server need to request over federation to respond. In that case this +endpoint does not provide client to express the server name's which server need to request over federation. + +## Proposal + +The [/hierarchy](https://spec.matrix.org/v1.9/client-server-api/#get_matrixclientv1roomsroomidhierarchy) endpoint should +include `server_name` as query parameter which server can use in case requested room in not locally available on the +server. + +Following change will allow clients to use this endpoint in more efficient manner, like: +1. Requesting the only part of sub-spaces hierarchy which is unknown the the client. +2. Rendering the preview of space and it's children before joining the space. +3. Since server does not respect [order](https://spec.matrix.org/v1.9/client-server-api/#mspacechild) of the children in + response, client can divide the work of loading child spaces and figuring out order and re-ordering instead of + relying on the long paginated response for those action. + +## Potential issues +Unknown + +## Alternative +Unknown + +## Security considerations +Unknown + +## Unstable prefix +None \ No newline at end of file From 0cbd27ece57b6791c1a1b82a4e540904006e8f83 Mon Sep 17 00:00:00 2001 From: Ajay Bura <32841439+ajbura@users.noreply.github.com> Date: Mon, 2 Dec 2024 20:38:07 +0530 Subject: [PATCH 2/7] add msc number --- ...ierarchy.md => 4235-servername-query-param-for-hierarchy.md} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename proposals/{XXXX-servername-query-param-for-hierarchy.md => 4235-servername-query-param-for-hierarchy.md} (96%) diff --git a/proposals/XXXX-servername-query-param-for-hierarchy.md b/proposals/4235-servername-query-param-for-hierarchy.md similarity index 96% rename from proposals/XXXX-servername-query-param-for-hierarchy.md rename to proposals/4235-servername-query-param-for-hierarchy.md index 28f8b0b52a1..53d37c665fb 100644 --- a/proposals/XXXX-servername-query-param-for-hierarchy.md +++ b/proposals/4235-servername-query-param-for-hierarchy.md @@ -1,4 +1,4 @@ -# MSCXXXX: `server_name` query param for /hierarchy endpoint +# MSC4235: `server_name` query param for /hierarchy endpoint To request the hierarchy of a space, clients need to call the [/hierarchy](https://spec.matrix.org/v1.9/client-server-api/#get_matrixclientv1roomsroomidhierarchy) endpoint. This From ac419f8881003ad15c21bf9ec4bb4ae48595b276 Mon Sep 17 00:00:00 2001 From: Ajay Bura <32841439+ajbura@users.noreply.github.com> Date: Wed, 4 Dec 2024 08:46:17 +0530 Subject: [PATCH 3/7] change param name to via --- ...or-hierarchy.md => 4235-via-query-param-for-hierarchy.md} | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) rename proposals/{4235-servername-query-param-for-hierarchy.md => 4235-via-query-param-for-hierarchy.md} (89%) diff --git a/proposals/4235-servername-query-param-for-hierarchy.md b/proposals/4235-via-query-param-for-hierarchy.md similarity index 89% rename from proposals/4235-servername-query-param-for-hierarchy.md rename to proposals/4235-via-query-param-for-hierarchy.md index 53d37c665fb..ad6fdbe72e1 100644 --- a/proposals/4235-servername-query-param-for-hierarchy.md +++ b/proposals/4235-via-query-param-for-hierarchy.md @@ -1,4 +1,4 @@ -# MSC4235: `server_name` query param for /hierarchy endpoint +# MSC4235: `via` query param for /hierarchy endpoint To request the hierarchy of a space, clients need to call the [/hierarchy](https://spec.matrix.org/v1.9/client-server-api/#get_matrixclientv1roomsroomidhierarchy) endpoint. This @@ -13,8 +13,7 @@ endpoint does not provide client to express the server name's which server need ## Proposal The [/hierarchy](https://spec.matrix.org/v1.9/client-server-api/#get_matrixclientv1roomsroomidhierarchy) endpoint should -include `server_name` as query parameter which server can use in case requested room in not locally available on the -server. +include `via` as query parameter which server can use in case requested room in not locally available on the server. Following change will allow clients to use this endpoint in more efficient manner, like: 1. Requesting the only part of sub-spaces hierarchy which is unknown the the client. From e4822ae329c734142fed5aecaf96868475ac1fa6 Mon Sep 17 00:00:00 2001 From: Ajay Bura <32841439+ajbura@users.noreply.github.com> Date: Wed, 4 Dec 2024 20:01:54 +0530 Subject: [PATCH 4/7] fix typos and add link to space summary msc --- proposals/4235-via-query-param-for-hierarchy.md | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/proposals/4235-via-query-param-for-hierarchy.md b/proposals/4235-via-query-param-for-hierarchy.md index ad6fdbe72e1..ba74bf3cd7f 100644 --- a/proposals/4235-via-query-param-for-hierarchy.md +++ b/proposals/4235-via-query-param-for-hierarchy.md @@ -1,14 +1,15 @@ # MSC4235: `via` query param for /hierarchy endpoint To request the hierarchy of a space, clients need to call the -[/hierarchy](https://spec.matrix.org/v1.9/client-server-api/#get_matrixclientv1roomsroomidhierarchy) endpoint. This -endpoint does not require user to join the room before responding with hierarchy details. It instead check whether the -room is potentially joinable (per [MSC3173](https://github.com/matrix-org/matrix-spec-proposals/pull/3173)) before -responding. - -Because it doesn't not require space room to be joined before calling this endpoint, It is possible that the requested -room is not locally available on the server and server need to request over federation to respond. In that case this -endpoint does not provide client to express the server name's which server need to request over federation. +[/hierarchy](https://spec.matrix.org/v1.9/client-server-api/#get_matrixclientv1roomsroomidhierarchy) endpoint introduced +in [MSC2946](https://github.com/matrix-org/matrix-spec-proposals/pull/2946). This endpoint does not require user to join +the room before responding with hierarchy details. It instead check whether the room is potentially joinable (per +[MSC3173](https://github.com/matrix-org/matrix-spec-proposals/pull/3173)) before responding. + +Because it does not require a space room to be joined before calling this endpoint, it's possible that the requested +room may not be locally available on the server. The server might need to request information over federation to +respond. In such a case, this endpoint doesn't provide a mechanism for the client to specify the server name from which +the server should request information. ## Proposal From 120f6a27c6d87b779d2baa52d02aea7a64adb751 Mon Sep 17 00:00:00 2001 From: Ajay Bura <32841439+ajbura@users.noreply.github.com> Date: Wed, 4 Dec 2024 20:19:59 +0530 Subject: [PATCH 5/7] remove server specific issues and improve benefits --- proposals/4235-via-query-param-for-hierarchy.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/proposals/4235-via-query-param-for-hierarchy.md b/proposals/4235-via-query-param-for-hierarchy.md index ba74bf3cd7f..02ca142a384 100644 --- a/proposals/4235-via-query-param-for-hierarchy.md +++ b/proposals/4235-via-query-param-for-hierarchy.md @@ -16,12 +16,12 @@ the server should request information. The [/hierarchy](https://spec.matrix.org/v1.9/client-server-api/#get_matrixclientv1roomsroomidhierarchy) endpoint should include `via` as query parameter which server can use in case requested room in not locally available on the server. -Following change will allow clients to use this endpoint in more efficient manner, like: +Following change will stable the endpoint and allows clients to use this endpoint in more efficient manner, like: 1. Requesting the only part of sub-spaces hierarchy which is unknown the the client. 2. Rendering the preview of space and it's children before joining the space. -3. Since server does not respect [order](https://spec.matrix.org/v1.9/client-server-api/#mspacechild) of the children in - response, client can divide the work of loading child spaces and figuring out order and re-ordering instead of - relying on the long paginated response for those action. +3. Since depth-first hierarchy responses can be costly, especially when reaching the end of the hierarchy, clients can + optimize the process by loading subspaces independently. This approach can improve efficiency by loading the + hierarchy of individual subspaces only when the user views them. ## Potential issues Unknown From 9fd3b7c362c239bbab0da1ab1cb13cdf93cea675 Mon Sep 17 00:00:00 2001 From: Ajay Bura <32841439+ajbura@users.noreply.github.com> Date: Thu, 5 Dec 2024 15:38:43 +0530 Subject: [PATCH 6/7] fix typo --- proposals/4235-via-query-param-for-hierarchy.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proposals/4235-via-query-param-for-hierarchy.md b/proposals/4235-via-query-param-for-hierarchy.md index 02ca142a384..b8280af9f13 100644 --- a/proposals/4235-via-query-param-for-hierarchy.md +++ b/proposals/4235-via-query-param-for-hierarchy.md @@ -16,7 +16,7 @@ the server should request information. The [/hierarchy](https://spec.matrix.org/v1.9/client-server-api/#get_matrixclientv1roomsroomidhierarchy) endpoint should include `via` as query parameter which server can use in case requested room in not locally available on the server. -Following change will stable the endpoint and allows clients to use this endpoint in more efficient manner, like: +Following change will stabilize the endpoint and allows clients to use this endpoint in more efficient manner, like: 1. Requesting the only part of sub-spaces hierarchy which is unknown the the client. 2. Rendering the preview of space and it's children before joining the space. 3. Since depth-first hierarchy responses can be costly, especially when reaching the end of the hierarchy, clients can From a9933d20cd1c3bd513a629f59b7904f6e166ab32 Mon Sep 17 00:00:00 2001 From: Ajay Bura <32841439+ajbura@users.noreply.github.com> Date: Tue, 14 Jan 2025 13:21:36 +0530 Subject: [PATCH 7/7] fix typo --- proposals/4235-via-query-param-for-hierarchy.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/proposals/4235-via-query-param-for-hierarchy.md b/proposals/4235-via-query-param-for-hierarchy.md index b8280af9f13..0d532f31b99 100644 --- a/proposals/4235-via-query-param-for-hierarchy.md +++ b/proposals/4235-via-query-param-for-hierarchy.md @@ -16,7 +16,7 @@ the server should request information. The [/hierarchy](https://spec.matrix.org/v1.9/client-server-api/#get_matrixclientv1roomsroomidhierarchy) endpoint should include `via` as query parameter which server can use in case requested room in not locally available on the server. -Following change will stabilize the endpoint and allows clients to use this endpoint in more efficient manner, like: +This change will stabilize the endpoint and allows clients to use this endpoint in more efficient manner, like: 1. Requesting the only part of sub-spaces hierarchy which is unknown the the client. 2. Rendering the preview of space and it's children before joining the space. 3. Since depth-first hierarchy responses can be costly, especially when reaching the end of the hierarchy, clients can @@ -33,4 +33,4 @@ Unknown Unknown ## Unstable prefix -None \ No newline at end of file +None