Movatterモバイル変換


[0]ホーム

URL:



Internet-DraftThe Series Transfer Pattern (STP)April 2020
Bormann & HartkeExpires 10 October 2020[Page]
Workgroup:
Network Working Group
Internet-Draft:
draft-bormann-t2trg-stp-03
Published:
Intended Status:
Informational
Expires:
Authors:
C. Bormann
Universität Bremen TZI
K. Hartke
Ericsson

The Series Transfer Pattern (STP)

Abstract

Many applications make use of Series of data items, i.e., an array ofdata items where new items can be added over time. Where such Seriesare to be made available using REST protocols such as CoAP or HTTP,the Series has to be mapped into a structure of one or more resourcesand a protocol for a client to obtain the Series and to learn aboutnew items.

Various protocols have been standardized that make Series-shaped dataavailable, with rather different properties and objectives. Thepresent document is an attempt to extract a common underlying patternand to define media types and an access scheme that can be used rightaway for further protocols that provide Series-shaped data.

Status of This Memo

This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.

Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is athttps://datatracker.ietf.org/drafts/current/.

Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."

This Internet-Draft will expire on 10 October 2020.

Copyright Notice

Copyright (c) 2020 IETF Trust and the persons identified as the document authors. All rights reserved.

This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.

Table of Contents

1.Introduction

(TO DO: Insert an extended form of the abstract first here, expandingthe reference to[RFC7230] and[RFC7252] in the process.)

Examples for protocols that provide Series-shaped data are:

  • The Atom Syndication Format[RFC4287] definesfeeds as Seriesofentries (links plus some metadata, which can often be much ofthe content of an entry), where a feed is represented by acollection resource that contains just a small number of the mostrecent entries. By polling a feed, a client can contain a freshview of the Series, with a focus on recent items. If the clientdoes not poll often enough, it willmiss items.
  • Messaging protocols such as XMPP or SIMPLE transfer series of whatis often called "Instant Messages". A publish/subscribe mechanismallows a client to select sequences of messages that it isinterested in.
  • Mail servers that provide interactive access to stored messagespresent a Series to their clients. Obviously, loss of messages isfrowned upon.
  • CoAP Observe allows a client to observe a resource as it changes;the client can collect the changes into a Series. Observe isfocused on eventual consistency: a fresher data items simplyoverwrites an older one. The present document uses the observepattern to build a more general Series Transfer Pattern.
  • Syslog is an interesting case of a Series Transfer.
  • [RFC8641],[I-D.voit-netmod-yang-notifications2],[RFC8639],[I-D.ietf-netconf-notification-messages],[RFC8650].
  • An RTP stream can be viewed as an (somewhat extreme) case of aSeries; new items are just sent inside separate UDP packets. Asequence number allows to detect (but not normally ask forretransmission of) missing items. A timestamp as well as sourcedata (SSRC, CSRC) provide further common metadata that aid in theprocessing of the Series items.
  • An example of an ad-hoc design of a series transfer protocol is[I-D.ietf-netconf-udp-pub-channel].
  • Server-sent events[sse] are a somewhat bizarre version of a seriestransfer protocol.
  • The Interface for Metadata Access Points (IF-MAP) specified by theTrusted Computing Group and emerging derivatives of that protocolcreate a series of updates to a graph representation of relatednetwork-related security information. The requests created byIF-MAP clients are bundled operations of updates to aMAP Graph, which compose a Series Transfer Pattern of bundled atomicoperations that ensure the integrity of the MAP Graph. [Henk Birkholz]
  • netflow/IPFIX was defined to transfer a series of data items about flows.Information about PDU flows accounted by network interfaces ofendpoints is emitted in a series of counter bundles via the IPFIXprotocol. Only a series of these continuous Flow Records creates ameaningful bigger picture about the current traffic in the networktopology of an administrative domain. Depending on the characteristicsmeasured, loss of a Flow Record can range from harmless to missing theonly vital counter measurement. [Henk Birkholz]
  • TO DO: Add more items.

[I-D.birkholz-yang-push-coap-problemstatement] is a problemstatement that will require the design of another scheme to transferSeries-shaped data.

2.Objectives

Series transfer applications may have rather different objectives.

  • The completeness of the Series transfer may be of utmost importance(e.g., if each item represents a sale), it may be desirable but canbe jettisoned in an overload situation, or it may just be a likelyoutcome with a very active client (e.g., with Atom). Note thatthere is never a way toguarantee completeness unless all of therate and size of incoming new items, the transfer capacityavailable, and the processing capabilities of the client arecontrolled; however, system designs may want to give the illusion of"reliability".
  • Minimizing the latency of the transfer may be important, as may belimiting it below a defined maximum (note that these are differentobjectives). The latter can be supported in a polling system bypolling at least as often as that maximum latency; this may beconsidered inefficient and "push" mechanisms may be developed. Mailenvironments have developed "push" services to enable minimizing thelatency. Where latency requirements go below the time that might beneeded for an end-to-end retransmission, error concealment mayprovide an acceptable user experience (e.g., in RTP).

In general, minimizing latency and ensuring completeness are competingobjectives.

Series transfer environments sometimes centralize informationdistribution functions, leading to "broker" architectures (oftencombined with the "publish/subscribe" pattern). With brokers, Seriespublishers may use an entirely different interface to the brokers fromthat used by the receiving clients, or the interfaces can be designedso they are similar for all the forwarding steps.

3.A REST Series Transfer Pattern (STP)

3.1.Basic collections

A series of items can be represented by a single collection resource:

While this is adequate in many cases, it has a number of limitations:

  • Each retrieval fetches the entire collection

    • As long as the collection does not change, this can be mitigatedwith ETags (Section 5.10.6 of[RFC7252], Section 2.3 of[RFC7232]).
  • When the collection becomes too large, the server has to prune olderitems. These then no longer can be retrieved, and there is even noway for the server to indicate that there used to be older items.

3.2.Pagination and Observing linked lists

In the Browser Web, it is usual to providePagination for collectionresources that can grow large (e.g., search results):

:tiitiea:kt1lleanmmie9mgagm::2ek1etepp1inp1eem8Mi10egmt:i2it
Figure 2:A paginated collection of items

Without modification, this does not work well for resources thatactually change by themselves: Once a new page needs to be added,what previously was page 1 now becomes page 2. Obviously, the namingof pages better remains unchanged with new pages added a the front.

8pmi:ige2e:tal1g1tteMieke2i0kemmat:ln:ppm9nmeiae11:i1egititm
Figure 3:Pagination with stable names

However, now the client has no idea what initial page to request toget the freshest items and the head of the list. It is easy to add alink to the freshest page:

m1anne2ie::gkieiat:em:emaimpekdp11Mlh1liet0:itg1t
Figure 4:Pagination with stable names

The head of the linked list can now be simply observed; the additionof pages will then be notified to the observer.

As usual in series transfer, the following considerations remain:

  • When can the server decide to no longer retain older items?

    • There may be a desire for an observer to be able to catch allitems in the series.

      • How does the server know who are the observers? E.g., what todo with newly joining observers?
      • How does an observer signal that it has caught up (to a specificitem)?
  • What to do when the decision to remove items from the list cannot bemade and there is no room for new items?

The link head can also include items that have so far not been addedto pages; this can be used to fill up pages evenly without them everchanging. Obviously, the best number of items to prenotify in thisway as well as the best time to open a new page are different fordifferent applications.

3.3.The "cursor" pattern

A GET on a resource representing a Series may return a collection itemthat contains the following pieces of information

  • An array of Series items, either as an array of media-typed objectsin a suitable representation format (e.g., CBOR, MIME) or by usingan array-like media type (e.g., SenML).

    • Items may be full items or limit themselves to some metadata anda link; the client can then follow that link if it is interestedin the data (possibly basing that decision on the metadata and/ora measure of load).
  • A "cursor" that can then be used as a parameter in further GETrequests (see below) in order to receive only newer items than thosereceived with this transfer.
  • A "more bit" that indicates whether such further items already existbut could not be returned in the present response.

InFigure 5, the cursor is implemented as a URI that can be usedas a link to the next page.

eg0ntiteei1la1::mpekt:Mkam1i:iemiltt1m1:2aieiglnp
Figure 5:Cursor pattern pictured as pagination

A GET may be enhanced with additional parameters (possibly turning itinto a FETCH):

  • The cursor.
  • A "wait bit" that indicates whether a (possibly empty) reply shouldbe given right away or the server should wait for new items tobecome available. (To avoid the equivalence of the "silly windowsyndrome", the wait bit may be enhanced by a minimum number of itemsand a timeout after which even a smaller number is made available.)In effect, this requests a form of "long polling"; see[RFC6202] for some considerations for this in HTTP.

A server may implement a form of custody transfer by interpreting thecursor as an acknowledgement that the client has received all data upto the cursor. This is not necessarily acting as an unsafe request("destructive GET"), as other clients may be active that have not yetreceived all these data. To implement a full custody semantics, theserver needs to be aware of all the clients that expect a full SeriesTransfer (a classical group management problem).

(Explain how Observe can help. Can it?)

4.IANA considerations

This memo registers a number of media types: TO DO.

  • A media type for FETCH selectors (Section 3):

    • An alternative way to encode this information into the URIof a GET should also be available.
  • A Series media type as alluded to inSection 3.

5.Security considerations

TO DO

6.Informative References

[I-D.birkholz-yang-push-coap-problemstatement]
Birkholz, H., Zhou, T., Liu, X., and E. Voit,"YANG Push Operations for CoMI",Work in Progress,Internet-Draft, draft-birkholz-yang-push-coap-problemstatement-00,,<http://www.ietf.org/internet-drafts/draft-birkholz-yang-push-coap-problemstatement-00.txt>.
[I-D.ietf-netconf-notification-messages]
Voit, E., Jenkins, T., Birkholz, H., Bierman, A., and A. Clemm,"Notification Message Headers and Bundles",Work in Progress,Internet-Draft, draft-ietf-netconf-notification-messages-08,,<http://www.ietf.org/internet-drafts/draft-ietf-netconf-notification-messages-08.txt>.
[I-D.ietf-netconf-udp-pub-channel]
Zheng, G., Zhou, T., and A. Clemm,"UDP based Publication Channel for Streaming Telemetry",Work in Progress,Internet-Draft, draft-ietf-netconf-udp-pub-channel-05,,<http://www.ietf.org/internet-drafts/draft-ietf-netconf-udp-pub-channel-05.txt>.
[I-D.voit-netmod-yang-notifications2]
Voit, E., Bierman, A., Clemm, A., and T. Jenkins,"YANG Notification Headers and Bundles",Work in Progress,Internet-Draft, draft-voit-netmod-yang-notifications2-00,,<http://www.ietf.org/internet-drafts/draft-voit-netmod-yang-notifications2-00.txt>.
[RFC4287]
Nottingham, M., Ed. and R. Sayre, Ed.,"The Atom Syndication Format",RFC 4287,DOI 10.17487/RFC4287,,<https://www.rfc-editor.org/info/rfc4287>.
[RFC6202]
Loreto, S., Saint-Andre, P., Salsano, S., and G. Wilkins,"Known Issues and Best Practices for the Use of Long Polling and Streaming in Bidirectional HTTP",RFC 6202,DOI 10.17487/RFC6202,,<https://www.rfc-editor.org/info/rfc6202>.
[RFC7230]
Fielding, R., Ed. and J. Reschke, Ed.,"Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing",RFC 7230,DOI 10.17487/RFC7230,,<https://www.rfc-editor.org/info/rfc7230>.
[RFC7232]
Fielding, R., Ed. and J. Reschke, Ed.,"Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests",RFC 7232,DOI 10.17487/RFC7232,,<https://www.rfc-editor.org/info/rfc7232>.
[RFC7252]
Shelby, Z., Hartke, K., and C. Bormann,"The Constrained Application Protocol (CoAP)",RFC 7252,DOI 10.17487/RFC7252,,<https://www.rfc-editor.org/info/rfc7252>.
[RFC8639]
Voit, E., Clemm, A., Gonzalez Prieto, A., Nilsen-Nygaard, E., and A. Tripathy,"Subscription to YANG Notifications",RFC 8639,DOI 10.17487/RFC8639,,<https://www.rfc-editor.org/info/rfc8639>.
[RFC8641]
Clemm, A. and E. Voit,"Subscription to YANG Notifications for Datastore Updates",RFC 8641,DOI 10.17487/RFC8641,,<https://www.rfc-editor.org/info/rfc8641>.
[RFC8650]
Voit, E., Rahman, R., Nilsen-Nygaard, E., Clemm, A., and A. Bierman,"Dynamic Subscription to YANG Events and Datastores over RESTCONF",RFC 8650,DOI 10.17487/RFC8650,,<https://www.rfc-editor.org/info/rfc8650>.
[sse]
WHATWG,"HTML Living Standard -- 9.2 Server-sent events",,<https://html.spec.whatwg.org/multipage/server-sent-events.html#server-sent-events>.

Acknowledgements

The need for a Series Transfer Pattern has been made clear by a numberof people that contribute to the IRTF Thing-to-Thing Research Group(T2TRG), e.g. Matthias Kovatsch and Henk Birkholz (both of whom alsoprovided feedback on an early draft). Henk also contributed furtherexamples for the use of Series Transfers in protocols.

Authors' Addresses

Carsten Bormann
Universität Bremen TZI
Postfach 330440
D-28359Bremen
Germany
Klaus Hartke
Ericsson
Torshamnsgatan 23
16483Stockholm
Sweden
Datatracker

draft-bormann-t2trg-stp-03
Expired Internet-Draft (individual)

DocumentDocument typeExpired Internet-Draft (individual)
Expired & archived
This document is an Internet-Draft (I-D). Anyone may submit an I-D to the IETF. This I-D isnot endorsed by the IETF and hasno formal standing in theIETF standards process.
Select version
Compare versions
AuthorsCarsten Bormann,Klaus Hartke
Email authors
RFC stream (None)
Intended RFC status (None)
Other formats
Report a datatracker bug

[8]ページ先頭

©2009-2026 Movatter.jp