Use 'room' or 'room ID' instead of 'context' when describing federation protocol

This commit is contained in:
Paul "LeoNerd" Evans 2015-10-28 14:49:50 +00:00
parent 3dd212e53b
commit 745e607577

View file

@ -15,9 +15,9 @@ There are three main kinds of communication that occur between home servers:
Persisted Data Units (PDUs): Persisted Data Units (PDUs):
These events are broadcast from one home server to any others that have These events are broadcast from one home server to any others that have
joined the same "context" (namely, a Room ID). They are persisted in joined the same room (identified by Room ID). They are persisted in
long-term storage and record the history of messages and state for a long-term storage and record the history of messages and state for a
context. room.
Like email, it is the responsibility of the originating server of a PDU Like email, it is the responsibility of the originating server of a PDU
to deliver that event to its recipient servers. However PDUs are signed to deliver that event to its recipient servers. However PDUs are signed
@ -26,7 +26,7 @@ Persisted Data Units (PDUs):
Ephemeral Data Units (EDUs): Ephemeral Data Units (EDUs):
These events are pushed between pairs of home servers. They are not These events are pushed between pairs of home servers. They are not
persisted and are not part of the history of a "context", nor does the persisted and are not part of the history of a room, nor does the
receiving home server have to reply to them. receiving home server have to reply to them.
Queries: Queries:
@ -338,11 +338,11 @@ PDUs
All PDUs have: All PDUs have:
- An ID - An ID to identify the PDU itself
- A context - A room ID that it relates to
- A declaration of their type - A declaration of their type
- A list of other PDU IDs that have been seen recently on that context - A list of other PDU IDs that have been seen recently in that room (regardless
(regardless of which origin sent them) of which origin sent them)
Required PDU Fields Required PDU Fields
@ -351,7 +351,7 @@ Required PDU Fields
==================== ================== ======================================= ==================== ================== =======================================
Key Type Description Key Type Description
==================== ================== ======================================= ==================== ================== =======================================
``context`` String Event context identifier ``context`` String Room identifier
``user_id`` String The ID of the user sending the PDU ``user_id`` String The ID of the user sending the PDU
``origin`` String DNS name of homeserver that created ``origin`` String DNS name of homeserver that created
this PDU this PDU
@ -363,7 +363,7 @@ Required PDU Fields
``content`` Object The content of the PDU. ``content`` Object The content of the PDU.
``prev_pdus`` List of (String, The originating homeserver, PDU ids and ``prev_pdus`` List of (String, The originating homeserver, PDU ids and
String, Object) hashes of the most recent PDUs the String, Object) hashes of the most recent PDUs the
Triplets homeserver was aware of for the context Triplets homeserver was aware of for the room
when it made this PDU when it made this PDU
``depth`` Integer The maximum depth of the previous PDUs ``depth`` Integer The maximum depth of the previous PDUs
plus one plus one
@ -440,7 +440,7 @@ keys exist to support this:
EDUs EDUs
---- ----
EDUs, by comparison to PDUs, do not have an ID, a context, or a list of EDUs, by comparison to PDUs, do not have an ID, a room ID, or a list of
"previous" IDs. The only mandatory fields for these are the type, origin and "previous" IDs. The only mandatory fields for these are the type, origin and
destination home server names, and the actual nested content. destination home server names, and the actual nested content.
@ -491,23 +491,23 @@ Retrieves a given PDU from the server. The response will contain a single new
Transaction, inside which will be the requested PDU. Transaction, inside which will be the requested PDU.
To fetch all the state of a given context:: To fetch all the state of a given room::
GET .../state/<context>/ GET .../state/<room_id>/
Response: JSON encoding of a single Transaction containing multiple PDUs Response: JSON encoding of a single Transaction containing multiple PDUs
Retrieves a snapshot of the entire current state of the given context. The Retrieves a snapshot of the entire current state of the given room. The
response will contain a single Transaction, inside which will be a list of PDUs response will contain a single Transaction, inside which will be a list of PDUs
that encode the state. that encode the state.
To backfill events on a given context:: To backfill events on a given room::
GET .../backfill/<context>/ GET .../backfill/<room_id>/
Query args: v, limit Query args: v, limit
Response: JSON encoding of a single Transaction containing multiple PDUs Response: JSON encoding of a single Transaction containing multiple PDUs
Retrieves a sliding-window history of previous PDUs that occurred on the given Retrieves a sliding-window history of previous PDUs that occurred on the given
context. Starting from the PDU ID(s) given in the "v" argument, the PDUs that room. Starting from the PDU ID(s) given in the "v" argument, the PDUs that
preceded it are retrieved, up to a total number given by the "limit" argument. preceded it are retrieved, up to a total number given by the "limit" argument.
These are then returned in a new Transaction containing all of the PDUs. These are then returned in a new Transaction containing all of the PDUs.