UserPreferences

PaceServerIdGeneration


Abstract

Address the assignment of atom ids when clients are creating new entries. Allow clients to request a batch of new ids for the clients use.

Status

Open

Rationale

Clients should send valid Atom content when creating new entries which requires the inclusion of an atom id element. APP clients should be able to either generate their own ids or use one generated by the server. It is suggested that generated ids are requested in batches to reduce overheads.

Proposal

Renumber section 5.5 Success and Failure to 5.6

Add a new section:

5.5 Requesting Atom id Values for Client Use

To request a set of id values for use in creating new entries 
the client sends a POST to the server's id generation service.
The IRI for this service is found from information in the 
introspection document. An id list document is returned with 10 
id values for use by the client.

  Client                                       Server
    |                                            |
    | 1.) POST to ID Generator IRI                |
    |------------------------------------------->|
    |                                            |
    | 2.) 200 OK, List of id values              |
    |<-------------------------------------------|
    |                                            |

Remove the following text from from 8.1 Creating resources with POST:

Clients MAY POST invalid Atom for initial resource creation - 
specifically the id and link elements MAY be omitted

Change section 7.3.2 The 'app:workspace' Element

Replace

appWorkspace = 
  element app:workspace {
    appCommonAttributes,
    attribute title { text },
    ( appCollection+
      & extensionElement* )
  }

with

appWorkspace = 
  element app:workspace {
    appCommonAttributes,
    attribute title { text },
    attribute idgenerator { text },
    ( appCollection+
      & extensionElement* )
  }

Add a new section:

7.2.2.2 The 'idgenerator' Attribute

The app:workspace element MUST contain an 'idgenerator' attribute, whose value conveys the IRI of the workspace's ID generation service.

Add the following new sections:

8.1.2 Server Generation of id Values

To assist clients in assigning ids for new entries servers MUST 
be able to generate ids on behalf of the client. The server 
MUST provide an id generation service for each workspace. The 
IRI of this service is specified in the introspection document.

To obtain a list of ids for use in creating new entries the 
client performs a POST on the appropriate id generation service. 
The server responds with an id list document containing 10 ids.

The server MUST NOT issue any id value more than once to either 
the same or different clients. The server MUST NOT issue any id 
value already assigned to an entry held by the server.

The client MUST NOT anticipate any pattern or sequence in the 
generated list of ids. If a client requests a list of id values 
from a server the client SHOULD use all the returned id values 
before issuing any subsequent request for additional id values.

8.1.3 id List Documents

id List Documents are identified with the 
"application/atomidlist+xml" media type (See Section 14)

8.1.3.1
<idlist xmlns="http://purl.org/atom/app#">
  <id>urn:uuid:ce61592c-14e2-4557-978e-dfbd444aefa6</id>
  <id>urn:uuid:ce61592c-14e2-4557-978e-dfbd444aefa7</id>
  <id>urn:uuid:ce61592c-14e2-4557-978e-dfbd444aefa8</id>
  <id>urn:uuid:ce61592c-14e2-4557-978e-dfbd444aefa9</id>
  <id>urn:uuid:ce61592c-14e2-4557-978e-dfbd444aefaa</id>
  <id>urn:uuid:ce61592c-14e2-4557-978e-dfbd444aefab</id>
  <id>urn:uuid:ce61592c-14e2-4557-978e-dfbd444aefac</id>
  <id>urn:uuid:ce61592c-14e2-4557-978e-dfbd444aefad</id>
  <id>urn:uuid:ce61592c-14e2-4557-978e-dfbd444aefae</id>
  <id>urn:uuid:ce61592c-14e2-4557-978e-dfbd444aefaf</id>
</idlist>

8.1.3.2 The 'app:idlist' Element

The root of an id List Document is the "app:idlist" element.

namespace app = "http://purl.org/atom/app#"
start = appIdList

The "app:idlist" is a container for a list of id values 
generated by the server

appIdList = 
  element app:idlist {
    appCommonAttributes,
    ( appId+ )
  }

8.1.3.3 The 'app:id' Element

The "app:idlist" element MUST contain ten "app:id" elements. 
The element content of an "app:id" is a valid value for a new 
Atom entry.

appId =
  element app:id {
    appCommonAttributes,
    ( atomId )
  }

atomId = xsd:string

Impacts

draft06

Notes


CategoryProposals