OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

odata message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: [OASIS Issue Tracker] Commented: (ODATA-538) Metadata-aware clients may prefer odata.type to odata.context (to avoid verbose encoding), but cannot request it


    [ http://tools.oasis-open.org/issues/browse/ODATA-538?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=34985#action_34985 ] 

Ralf Handl commented on ODATA-538:
----------------------------------

JSON section 4.5.3 defines that odata.type MUST appear if the type is derived from the type specified for the (collection of) entities or (collection of) complex type instances, so odata.metadata=none already does what Evan wants.

As for size in odata.metadata=minimal: the context URL can be relative to the request URL, so in the above example it could be

  "odata.context": "$metadata#BookingCollection"

> Metadata-aware clients may prefer odata.type to odata.context (to avoid verbose encoding), but cannot request it
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: ODATA-538
>                 URL: http://tools.oasis-open.org/issues/browse/ODATA-538
>             Project: OASIS Open Data Protocol (OData) TC
>          Issue Type: Improvement
>          Components: OData ATOM Format , OData JSON Format, OData Protocol 
>    Affects Versions: V4.0_WD01
>            Reporter: Evan Ireland
>             Fix For: V4.0_WD01
>
>
> Suppose a service supports the addressing conventions (so a client would be able to formulate read/edit links from entity set names and key properties), and the client, being meta-data aware, wants to receive a large set of results (of declared type A, with possible subtype B) that is fairly compactly encoded. By metadata-aware, that means the client has already fetched the meta-data document.
> Now the client will still need to receive odata.type for any entities of subtype B, as in the general case this cannot be determined from the returned properties (unless or more of the returned properties can be used as proxy type marker).
> The difficulty here is that such a client does not generally need to receive the context URL. And in the general case, odata.context URLs are going to be quite a bit larger than the odata.type, similar to the metadata uri in pre-V4 OData. For example, with this service:
>     https://sapes1.sapdevcenter.com/sap/opu/odata/IWFND/RMTSAMPLEFLIGHT/BookingCollection
> the metadata uri can chew up nearly one third of the total JSON encoding. The client then must receive and parse a lot of information it does not need (GZIP can help with the network size of bloated context URLs, but they still need to be parsed which can chew up valuable CPU, especially on mobile devices).
> There may be cases where a V4 context URI are somewhat more concise than a pre-V4 metadata uri, but odata.context is still generally "bloated" in comparison to odata.type.
> And none of the odata.metadata options are suitable to express the client requirements.
> (a) odata.metadata=minimal: the odata.type is not required to be present, and the odata.context URLmust be included in the response, even though the client does not need it
> (b) odata.metadata=full: the odata.type is present (when needed, e.g. for entities of subtype B) but odata.context URL must be included in the response, along with various links which the client does not need.
> (c) odata.metadata=none: the odata.type is not present

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://tools.oasis-open.org/issues/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]