LoginSignup
3
2

More than 1 year has passed since last update.

[Joke-RFC] RFC7168 給茶機のためのハイパーテキストコーヒーポット制御プロトコル

Last updated at Posted at 2019-03-12

はじめに

The Hyper Text Coffee Pot Control Protocol for Tea Efflux Appliances (HTCPCP-TEA)(給茶機のためのハイパーテキストコーヒーポット制御プロトコル)

  • Independent Submission
  • Request for Comments: 7168
  • Updates: 2324
  • Category: Informational
  • ISSN: 2070-1721
  • I. Nazar
  • 1 April 2014

Abstract

The Hyper Text Coffee Pot Control Protocol (HTCPCP) specification
does not allow for the brewing of tea, in all its variety and
complexity. This paper outlines an extension to HTCPCP to allow for
pots to provide networked tea-brewing facilities.

ハイパーテキストコーヒーポットコントロールプロトコル(HTCPCP)仕様は、その多様性と複雑さのすべてにおいて、給茶を許可していない。
本文書では、ネットワーク接続された給湯設備のために、ポットを利用可能にする HTCPCP 拡張について概説する。

Status of This Memo

This document is not an Internet Standards Track specification; it is
published for informational purposes.

この文書はインターネット標準ではありません。 情報提供を目的として公開されています。

This is a contribution to the RFC Series, independently of any other
RFC stream. The RFC Editor has chosen to publish this document at
its discretion and makes no statement about its value for
implementation or deployment. Documents approved for publication by
the RFC Editor are not a candidate for any level of Internet
Standard; see Section 2 of RFC 5741.

Information about the current status of this document, any errata,
and how to provide feedback on it may be obtained at
http://www.rfc-editor.org/info/rfc7168.

(略)

Copyright Notice

Copyright (c) 2014 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
(http://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.

(略)

Table of Contents

   1. Introduction  . . . . . . . . . . . . . . . . . . . . . . . . .  2
     1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . .  3
   2. HTCPCP-TEA Protocol Additions . . . . . . . . . . . . . . . . .  3
     2.1. BREW and POST Methods . . . . . . . . . . . . . . . . . . .  3
       2.1.1. The "/" URI . . . . . . . . . . . . . . . . . . . . . .  3
       2.1.2. Variety-Specific URIs . . . . . . . . . . . . . . . . .  4
     2.2. Modified Header Fields  . . . . . . . . . . . . . . . . . .  4
       2.2.1. The Accept-Additions Header Field . . . . . . . . . . .  4
     2.3. Response Codes  . . . . . . . . . . . . . . . . . . . . . .  5
       2.3.1. 300 Multiple Options  . . . . . . . . . . . . . . . . .  5
       2.3.2. 403 Forbidden . . . . . . . . . . . . . . . . . . . . .  5
       2.3.3. 418 I'm a Teapot  . . . . . . . . . . . . . . . . . . .  5
   3. The "message/teapot" Media Type . . . . . . . . . . . . . . . .  6
   4. Environmental Considerations  . . . . . . . . . . . . . . . . .  6
   5. Security Considerations . . . . . . . . . . . . . . . . . . . .  6
   6. Acknowledgements  . . . . . . . . . . . . . . . . . . . . . . .  7
   7. References  . . . . . . . . . . . . . . . . . . . . . . . . . .  7
     7.1. Normative References  . . . . . . . . . . . . . . . . . . .  7
     7.2. Informative References  . . . . . . . . . . . . . . . . . .  7

1. Introduction

As noted in the Hyper Text Coffee Pot Control Protocol [HTCPCP],
coffee is renowned worldwide as an artfully brewed caffeinated
beverage, but coffee shares this quality with many other varied
preparations based on the filtration of plant material. Foremost,
among these are the category of brews based on the straining of water
through prepared leaves from a tea tree: the lineage and history of
the tea genus will not be recounted as part of this paper, but
evidence shows that the production of tea existed many thousands of
years ago.

ハイパーテキストコーヒーポット制御プロトコル [HTCPCP] に記載されているように、コーヒーは巧みに淹れられたカフェイン入り飲料として世界的に有名だが、コーヒーは植物材料から抽出する飲み物の一種である。
これらの中には、お茶の木の葉から淹れるカテゴリがある:お茶の由緒と歴史ついて詳しく説明はしないが、何千年も前から作らている証拠がある。

The deficiency of HTCPCP in addressing the networked production of
such a venerable beverage as tea is noteworthy: indeed, the only
provision given for networked teapots is that they not respond to
requests for the production of coffee, which, while eminently
reasonable, does not allow for communication with the teapot for its
intended purpose.

紅茶のような由緒ある飲料をネットワーク経由で作ることができない HTCPCP の欠陥は注目に値する。
実際、ネットワーク・ティーポットに与えられた唯一の規定は、それらがコーヒー生産の要求にたいして応えないことだけであり、それは明らかに合理的ではあるが、本来の意図された目的のためのティーポットとのコミュニケーションは許されていない。

This paper specifies an extension to HTCPCP to allow communication
with networked tea production devices and teapots. The additions to
the protocol specified herein permit the requests and responses
necessary to control all devices capable of making, arguably, the
most popular caffeinated hot beverage.

本文書はネットワーク化された給茶機とティーポットとのコミュニケーションを可能にするために HTCPCP の拡張を示す。
ここに規定された追加プロトコルは、議論の余地なく最も人気のあるカフェイン入りホット飲料を作れるすべての装置を制御するのに必要な要求および応答を可能とする。

1.1. Terminology

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in RFC 2119 [KEYWORDS].

(省略)

2. HTCPCP-TEA Protocol Additions

The TEA extension to HTCPCP adapts the operation of certain HTCPCP
methods.

HTCPCP の TEA 拡張は、特定の HTCPCP メソッドのオペレーションを変更する。

2.1. BREW and POST Methods

Control of a TEA-capable pot is performed, as described in the base
HTCPCP specification, through the sending of BREW requests. POST
requests are treated equivalently, but they remain deprecated. Tea
production differs from coffee, however, in that a choice of teas is
often provided for client selection before the tea is brewed. To
this end, a TEA-capable pot that receives a BREW message of content
type "message/teapot" MUST respond in accordance with the URI
requested, as below.

基本 HTCPCP 仕様で説明されているように、BREW リクエストを送信することによって、TEA 対応ポットを制御する。
POST リクエストも同等に扱うが、非推奨である。
しかしながら、コーヒーとは異なり、紅茶を入れる前に、お茶の種類を選ぶことがよくある。
このため、コンテンツタイプ "message/teapot" の BREW メッセージを受信した TEA 対応ポットは、以下のように、要求された URI に従って応答しなければならない(MUST)。

2.1.1. The "/" URI

For the URI "/", brewing will not commence. Instead, an Alternates
header as defined in RFC 2295 [RFC2295] MUST be sent, with the
available tea bags and/or leaf varieties as entries. An example of
such a response is as follows:

URIが "/" の場合、給茶は開始されない。
代わりに、利用可能なティーバッグや茶葉の種類をエントリとして、RFC 2295 [RFC 2295] で定義されている Alternates ヘッダを送信しなければならない(MUST)。
応答の例は次のとおり。

      Alternates: {"/darjeeling" {type message/teapot}},
                  {"/earl-grey" {type message/teapot}},
                  {"/peppermint" {type message/teapot}}

The following example demonstrates the possibility of
interoperability of a TEA-capable pot that also complies with the
base HTCPCP specification:

次の例は、HTCPCP の基本仕様にも準拠している TEA 対応ポットの相互運用性の可能性を示している。

      Alternates: {"/" {type message/coffeepot}},
                  {"/pot-0/darjeeling" {type message/teapot}},
                  {"/pot-0/earl-grey" {type message/teapot}},
                  {"/pot-1/peppermint" {type message/teapot}}

TEA-capable HTCPCP clients MUST check the contents of the Alternates
header returned by a BREW request, and provide a specific URI for
subsequent requests of the "message/teapot" type.

TEA対応の HTCPCP クライアントは、BREW リクエストによって返された Alternates ヘッダの内容をチェックし、"message/teapot" タイプの URI を提供しなければならない(MUST)。

A request to the "/" URI with a Content-Type header of
"message/coffeepot" SHOULD also be responded to with an Alternates
header in the above format, to allow TEA-capable clients the
opportunity to present the selection of teas to the user if inferior
caffeinated beverages have initially been requested.

"message/coffeepot" の Content-Type ヘッダを持つ "/" URI への要求もまた、
上記のフォーマットの Alternates ヘッダを使って応答されるべきである。
なぜなら、もし下等なカフェイン入り飲料が最初に要求された場合であっても、TEA対応クライアントがユーザーにお茶の選択を提示する機会を得るために。

2.1.2. Variety-Specific URIs

TEA-capable pots follow the base HTCPCP specification when presented
with a BREW request for a specific variety of tea. Pots SHOULD
follow the recommendations for brewing strength given by each
variety, and stop brewing when this strength is reached; it is
suggested that the strength be measured by detection of the opacity
of the beverage currently under brew by the pot.

特定の種類のお茶を BREW で要求された場合、TEA 対応ポットは HTCPCP の基本仕様に従う。
ポットは各種類によって与えられた濃さについての勧告に従うべきであり、そしてこの濃さに達したら給茶を停止する。
濃さは、ポットによって現在淹れている飲料の不透明度を検出することによって測定されるだろう。

TEA-capable clients SHOULD indicate the end of brewing by sending a
BREW request with an entity body containing "stop"; the pot MAY
continue brewing beyond the recommended strength until this is
received. If the "stop" request is not sent by the client, this may
result in a state inversion in the proportion of tea to water in the
brewing pot, which may be reported by some pots as a negative
strength.

TEA 対応クライアントは、エンティティ本体に "stop" を含む BREW リクエストを送信して、給茶の終了を示す必要があります。
これが受け取られるまでポットは推奨された濃さを超えて淹れ続けるかもしれない。
もし "stop" 要求がクライアントによって送信されない場合、これは、ポット中のお茶と水の比率の状態反転をもたらす可能性があり、これはいくつかのポットによってマイナスの濃さとして報告される可能性がある。

If a BREW command with an entity body containing "stop" is received
before the recommended strength is achieved, the pot MUST abort
brewing and serve the resultant beverage at lesser strength. Finding
the preferred strength of beverage when using this override is a
function of the time between the TEA-capable pot receiving a "start"
request and the subsequent "stop". Clients SHOULD be prepared to
make multiple attempts to reach the preferred strength.

推奨の濃さに達する前に "stop" を含む BREW コマンドを受信した場合、ポットは給茶を中止し、飲料を薄いまま提供しなければならない。
この方法を使用する場合、飲料の濃さは TEA 対応ポットが "start" を受け取ってから "stop" を受け取るまでの間の時間の関数となる。
クライアントは、望みの濃さを得るために、何度か試すべきである。

2.2. Modified Header Fields

HTCPCP-TEA modifies the definition of one header field from the base
HTCPCP specification.

HTCPCP-TEAは、基本HTCPCP仕様から1つのヘッダーフィールドの定義を変更する。

2.2.1. The Accept-Additions Header Field

It has been observed that some users of blended teas have an
occasional preference for teas brewed as an emulsion of cane sugar
with hints of water. To allow for this circumstance, the Accept-
Additions header field defined in the base HTCPCP specification is
updated to allow the following options:

一部のユーザーは、砂糖やミルクを入れたお茶を好む場合がある。
そのため、基本 HTCPCP 仕様で定義されている Accept-Additions ヘッダーフィールドを更新し、次のオプションを許可する。

      addition-type   = ( "*"
                        | milk-type
                        | syrup-type
                        | sweetener-type
                        | spice-type
                        | alcohol-type
                        | sugar-type
                        ) *( ";" parameter )
      sugar-type      = ( "Sugar" | "Xylitol" | "Stevia" )

Implementers should be aware that excessive use of the Sugar addition
may cause the BREW request to exceed the segment size allowed by the
transport layer, causing fragmentation and a delay in brewing.

実装者は、砂糖の追加を過度に使用すると BREW 要求がトランスポート層で許可されているセグメントサイズを超え、断片化や抽出の遅延を引き起こす可能性があることに注意する必要がある。

2.3. Response Codes

HTCPCP-TEA makes use of normal HTTP error codes and those defined in
the base HTCPCP specification.

HTCPCP-TEA は、通常の HTTP エラーコードと基本 HTCPCP 仕様で定義されているエラーコードを利用する。

2.3.1. 300 Multiple Options

A BREW request to the "/" URI, as defined in Section 2.1.1, will
return an Alternates header indicating the URIs of the available
varieties of tea to brew. It is RECOMMENDED that this response be
served with a status code of 300, to indicate that brewing has not
commenced and further options must be chosen by the client.

セクション 2.1.1 で定義されているように、"/" URIへの BREW 要求は、利用可能な種類のお茶の URI を示す Alternates ヘッダを返す。
給茶が開始されていないことを示すために、この回答はステータスコード 300 で提供されることが推奨され、さらなる選択肢はクライアントによって選択されなければならない。

2.3.2. 403 Forbidden

Services that implement the Accept-Additions header field MAY return
a 403 status code for a BREW request of a given variety of tea, if
the service deems the combination of additions requested to be
contrary to the sensibilities of a consensus of drinkers regarding
the variety in question.

Accept-Additions ヘッダフィールドを実装するサービスは、要求された茶の BREW リクエストに対して添加物の組み合わせに疑問の余地がある場合には、403 ステータスコードを返すことがある。

A method of garnering and collating consensus indicators of the most
viable combinations of additions for each variety to be served is
outside the scope of this document.

提供される各茶葉のための添加物の実行可能な組み合わせについては、この文書の範囲外である。

2.3.3. 418 I'm a Teapot

TEA-capable pots that are not provisioned to brew coffee may return
either a status code of 503, indicating temporary unavailability of
coffee, or a code of 418 as defined in the base HTCPCP specification
to denote a more permanent indication that the pot is a teapot.

コーヒーを淹れるように準備されていない TEA 対応ポットは、コーヒーが一時的に利用できないことを示すステータスコード 503、または基本 HTCPCP 仕様で定義されている 418 のコードのいずれかを返す。

3. The "message/teapot" Media Type

To distinguish messages destined for TEA-capable HTCPCP services from
pots compliant with the base HTCPCP specification, a new MIME media
type is defined by this document. The Content-Type header of a POST
or BREW request sent to a TEA-capable pot MUST be "message/teapot" if
tea is to be requested.

TEA 対応の HTCPCP サービス宛てのメッセージを基本 HTCPCP 仕様に準拠したポットと区別するために、この文書では新しい MIME メディアタイプを定義します。 お茶を要求する場合は、TEA 対応ポットに送信される POST または BREW 要求の Content-Type ヘッダーは "message/teapot" でなければならない。

4. Environmental Considerations

As noted in Section 2.1, a BREW request with a Content-Type header
field of "message/teapot" to a TEA-capable pot will result in an
Alternates header being sent with the response, and a pot will not be
brewed. However, if the BREW request has a Content-Type of
"message/coffeepot", and the pot is capable of brewing coffee, the
service's behavior will fall back to the base HTCPCP specification
and a pot will be brewed.

2.1 節で述べたように、TEA 対応ポットへの "message/teapot" の Content-Type ヘッダフィールドを持つ BREW リクエストは、レスポンスと共に Alternates ヘッダを送信することになり、ポットは淹れ始めない。
ただし、BREW 要求のコンテンツタイプが "message/coffeepot" で、ポットがコーヒーを淹れることができる場合、サービスの動作は基本の HTCPCP 仕様にフォールバックし、ポットはコーヒーを淹れる。

If the entity returned by the server when brewing commences contains
a TEA-compliant Alternates header indicating "message/coffeepot" and
the client does not want coffee, the client SHOULD then send a BREW
request with an entity body containing "stop". This will result in
wasted coffee; whether this is regarded as a bad thing is user-
defined.

給茶開始時にサーバから返されたエンティティに "message/coffeepot" を示す TEA 準拠の Alternates ヘッダが含まれていて、クライアントがコーヒーを飲みたくない場合、クライアントはエンティティボディに "stop" を含めて BREW リクエストを送信する必要がある。
これはコーヒーの無駄使いになる。
これが悪いことと見なされるかどうかはユーザー定義となる。

Such waste can be prevented by TEA-capable clients, by first
requesting a BREW of type "message/teapot" and then allowing
selection of an available beverage.

そのような無駄は、TEA 対応クライアントの場合には、最初に "message/teapot" タイプの BREW を要求し、次に利用可能な飲料の選択を可能にすることによって防止することができる。

5. Security Considerations

As with the base HTCPCP specification, most TEA-capable pots are
expected to heat water through the use of electric elements, and as
such will not be in proximity to fire. Therefore, no firewalls are
necessary for communication with these pots to proceed.

基本 HTCPCP 仕様と同様に、ほとんどの TEA 対応ポットは電気要素を使用して水を加熱することが期待されているので、火のそばにはない。
したがって、これらのポットとの通信をするのにファイアウォールは必要ない。

This extension does support communication with fired pots, however,
which may require heat retention and control policies. Care should
be taken so that coal-fired pots and electrically heated kettles are
not connected to the same network, to prevent pots from referring to
any kettles on the network as darkened or otherwise smoke driven.

この拡張は、火を使うポットとのコミュニケーションもサポートする。
ポットがネットワーク上で暗くなったり煙のように運転されていると見なすのを防ぐために、石炭ポットと電気やかんが同じネットワークに接続しないように注意する必要がある。

6. Acknowledgements

This extension to the HTCPCP specification would not be possible
without the base specification, and research on networked beverage
production leading up thereto. In that vein, the author wishes to
acknowledge the sterling work of Larry Masinter in the development of
the leading protocol for coffee pot communication.

HTCPCP仕様へのこの拡張は、基本仕様、およびそれに至るまでのネットワーク飲料製造に関する研究なしには不可能であろう。
その点で、著者は、コーヒーポット通信のための主要なプロトコルの開発における Larry Masinter のスターリングワークを認めたいと思う。

Many thanks also to Kevin Waterson and Pete Davis, for providing
guidance and suggestions during the drafting of this document.

この文書の草稿作成中にガイダンスと提案を提供してくれた Kevin Waterson と Pete Davis にも感謝します。

7. References

7.1. Normative References

   [KEYWORDS] Bradner, S., "Key words for use in RFCs to Indicate
              Requirement Levels", BCP 14, RFC 2119, March 1997.

7.2. Informative References

   [HTCPCP]   Masinter, L., "Hyper Text Coffee Pot Control Protocol
              (HTCPCP/1.0)", RFC 2324, April 1 1998.

   [RFC2295]  Holtman, K. and A. Mutz, "Transparent Content Negotiation
              in HTTP", RFC 2295, March 1998.

Author's Address

   Imran Nazar
   deviantART Inc.
   7095 Hollywood Blvd
   Hollywood, CA 90028

   EMail: inazar@deviantart.com
3
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
2