<?xml version="1.0" encoding="US-ASCII"?>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<?rfc toc="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc compact="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc linkmailto="no" ?>
<?rfc rfcedstyle="yes"?>
<?rfc-ext allow-markup-in-artwork="yes" ?>
<?rfc-ext include-references-in-index="yes" ?>
<rfc category="exp" docName="draft-gundogan-icnrg-pub-iot-00"
     ipr="trust200902" submissionType="IRTF">
  <front>
    <title abbrev="NDN Pub-Sub in the IoT">Publish-Subscribe Deployment Option
    for NDN in the Constrained Internet of Things</title>

    <author fullname="Cenk Gundogan" initials="C." surname="Gundogan">
      <organization abbrev="HAW Hamburg">HAW Hamburg</organization>

      <address>
        <postal>
          <street>Berliner Tor 7</street>

          <city>Hamburg</city>

          <code>D-20099</code>

          <country>Germany</country>
        </postal>

        <phone>+4940428758067</phone>

        <email>Cenk.Guendogan@haw-hamburg.de</email>

        <uri></uri>
      </address>
    </author>

    <author fullname="Thomas C. Schmidt" initials="T C." surname="Schmidt">
      <organization abbrev="HAW Hamburg">HAW Hamburg</organization>

      <address>
        <postal>
          <street>Berliner Tor 7</street>

          <city>Hamburg</city>

          <code>D-20099</code>

          <country>Germany</country>
        </postal>

        <email>t.schmidt@haw-hamburg.de</email>

        <uri>http://inet.haw-hamburg.de/members/schmidt</uri>
      </address>
    </author>

    <author fullname="Matthias Waehlisch" initials="M." surname="Waehlisch">
      <organization abbrev="link-lab &amp; FU Berlin">link-lab &amp; FU
      Berlin</organization>

      <address>
        <postal>
          <street>Hoenower Str. 35</street>

          <city>Berlin</city>

          <code>D-10318</code>

          <country>Germany</country>
        </postal>

        <email>mw@link-lab.net</email>

        <uri>http://www.inf.fu-berlin.de/~waehl</uri>
      </address>
    </author>

    <date />

    <workgroup>ICN Research Group</workgroup>

    <abstract>
      <t>Constrained IoT devices often operate more efficiently in a loosely
      coupled environment without maintaining end-to-end connectivity between
      nodes. Information Centric Networking naturally supports this demand by
      replicated data distribution and hop wise forwarding. This document
      outlines a deployment option for NDN in low-power and lossy networks
      (LLNs) that follows a publish-subscribe pattern. The proposed protocol
      scheme simplifies name-based routing significantly and facilitates even
      large off-duty cycles for constrained nodes.</t>
    </abstract>
  </front>

  <middle>
    <section anchor="intro" title="Introduction">
      <t>In the emerging Internet of Things (IoT), it is expected that large
      quantities of very constrained sensors and actuators collect,
      communicate, and process massive amounts of machine data. Early
      experiments with constrained nodes show promising results for different
      deployments of ICN communication <xref target="NDN-EXP"></xref>.</t>

      <t>Characteristics of constrained nodes:</t>

      <t><list style="symbols">
          <t>Battery-powered with sleep cycles</t>

          <t>Failing nodes</t>

          <t>Low power lossy networks</t>
        </list></t>

      <t>Challenges of NDN deployment <xref target="RFC7927"></xref></t>

      <t><list style="symbols">
          <t>Complexity of name-based routing</t>

          <t>State management at nodes</t>

          <t>Clear separation between control and data plane</t>

          <t>Adaptation to constrained wireless transmission</t>

          <t>Mobility management</t>
        </list></t>

      <section anchor="intro.scenarios" title="Baseline Scenarios">
        <t>Multiple scenarios have been discussed in <xref
        target="RFC7476"></xref> and <xref target="IWMT"></xref> that evaluate
        the applicability of ICN in IoT.</t>

        <t>We consider two characteristic constrained IoT scenarios with the
        enumerated challenges: <list style="hanging">
            <t
            hangText="Stationary IoT nodes within reach of fixed uplinks">for
            home, building, and factory automation, stationary monitoring,
            ...<list style="symbols">
                <t>Reliability, resilience of operation</t>

                <t>Radio coordination, coverage</t>

                <t>Energy constraints, device lifetime</t>

                <t>Interference with rivaling appliances</t>
              </list></t>

            <t
            hangText="Mobile IoT nodes with sparse coverage or intermittent connectivity">for
            urban or rural mobility and sensing, industrial Internet in
            widespread environments, disaster recovery and rescue ...<list
                style="symbols">
                <t>Exploit connectivity when available</t>

                <t>Large off-duty cycles of nodes</t>

                <t>Partitioned networks</t>

                <t>Limited dependability </t>

                <t>Environmental impact and disturbance</t>
              </list></t>
          </list> IoT scenarios usually impose routing requirements to support
        mobile nodes, handle failing links and to be resilient against
        attacks. A secure and autonomous bootstrapping is essential,
        especially for large-scale IoT deployments.</t>
      </section>

      <section anchor="intro.pub_sub"
               title="Benefits of Loose Coupling in the IoT">
        <t>ICN decouples content consumers from data producers (decoupling in
        space). A more sophisticated decoupling can be provided with the
        publish-subscribe messaging pattern that further adds a decoupling in
        time and synchronization. Constrained devices in LLNs can leverage
        this loose coupling to increase sleep cycles and delegate the
        authority over as much information as possible to more powerful
        devices that act as content proxies. In <xref
        target="f:intro.pub_sub_topo"></xref>, once content is published to
        the content proxy (CP) by a producer (P), consumers (C) can retrieve
        this content from (CP) without interacting with the producer. This
        indirection when retrieving information allows (P) to align sleep
        cycles accordingly to the period of generating new sensor readings,
        instead of handling content requests from any consumers (C).</t>

        <figure anchor="f:intro.pub_sub_topo"
                title="Content Proxy (CP) - Producer (P) - Consumer (C)">
          <artwork align="center"><![CDATA[
     (CP)
    / | \
   /  |  `-----.
  /   |   |  |  \
(P)  (C) ...... (C)
                    ]]></artwork>
        </figure>

        <t></t>

        <t>TODO: The problem of PUSH</t>
      </section>
    </section>

    <section title="Terminology">
      <t>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 <xref
      target="RFC2119"></xref>. The use of the term, "silently ignore" is not
      defined in RFC 2119. However, the term is used in this document and can
      be similarly construed.</t>

      <t>This document uses the terminology of <xref target="RFC7476"></xref>,
      <xref target="RFC7927"></xref>, and <xref target="RFC7945"></xref> for
      ICN entities.</t>

      <t>The following terms are used in the document and defined as
      follows:</t>

      <t><list style="hanging">
          <t hangText="Content Proxy">Stable node for replicating content.</t>

          <t hangText="Cloud Gateway">A Gateway that enables content transfer
          to and from a remote cloud storage, possibly by performing some kind
          of protocol translation.</t>

          <t hangText="PAM">Prefix Advertisement Message.</t>

          <t hangText="NAM">Name Advertisement Message.</t>
        </list></t>
    </section>

    <section anchor="pub_sub" title="Publish-Subscribe in IoT Edge Networks">
      <t>The publish-subscribe system is centered around prefix-specific
      content proxies (CPs) that are deployed in IoT edge networks. Such proxy
      function can be hosted on the Cloud- or Internet Gateway, or may reside
      on a stable, less constrained node within the IoT infrastructure. It is
      assumed that a CP is present for each prefix covering publishable
      content.</t>

      <t>Implementing a pub-sub NDN involves several steps that are bound to
      the tight requirements of resource-constrained devices. These steps
      include: <list style="numbers">
          <t>Building the prefix-specific routing topology tailored to
          constrained networks</t>

          <t>Mapping <spanx>Publish</spanx> to NDN semantics</t>

          <t>Mapping <spanx>Subscribe</spanx> to NDN semantics</t>
        </list></t>

      <section anchor="pub_sub.topology"
               title="Topology Maintenance and Routing">
        <t>A (sensor) node that wants to publish a data item needs to rely on
        path information towards the Content Proxy. Following the approach of
        PANINI <xref target="PANINI"></xref>, default routes will be
        established as follows.</t>

        <t>Each CP in the local IoT sub-network advertises the prefix(es) it
        represents to the routing system. It does so by broadcasting Prefix
        Advertisement Messages (PAMs) on the link layer (see <xref
        target="messaging"></xref> for the corresponding protocol details).
        Nodes that newly receive PAM advertisements will add or refresh a
        prefix-specific default route in their FIB. Intermediate nodes in a
        multi-hop environment also re-broadcast PAMs, so that the entire
        sub-network is flooded and default route entries build a shortest path
        tree (SPT) towards the CP as shown in <xref
        target="t:pub_sub.topology.fib"></xref> (alternatively, a DODAG w.r.t.
        a gateway for redundant CPs).</t>

        <figure anchor="f:pub_sub.topology.dodag"
                title="SPT building by Prefix Advertisement Messages (PAMs)">
          <artwork align="center"><![CDATA[
    (CP)
PAM /  \
   /    \ PAM
 (A)    (B)
 /|\    /|\
: : :  : : : PAM
                        ]]></artwork>
        </figure>

        <t>Information flowing from constrained sensor nodes towards a gateway
        is the prevalent communication pattern in the IoT (converge cast).
        The publish-subscribe system hence establishes a default routing (see
        sample FIB in <xref target="t:pub_sub.topology.fib"></xref>) and uses
        the tree (DODAG) topology with default routes towards the CP as a
        first step of content aggregation. Content replication towards other
        CPs, an Internet gateway, or into a cloud can follow subsequently.</t>

        <texttable anchor="t:pub_sub.topology.fib"
                   title="FIB with a default route">
          <ttcol>Prefix</ttcol>

          <ttcol align="center">Face</ttcol>

          <ttcol align="center">Lifetime</ttcol>

          <c>/</c>

          <c>Fx</c>

          <c>Ft</c>

          <c>...</c>

          <c>...</c>

          <c>...</c>
        </texttable>

        <t>It is noteworthy that the role of the new PAM message remains
        orthogonal to the existing Interest or Data semantics. A PAM never
        carries data nor requests, but persists on the control plane of
        name-based routing. User applications stay unaffected, and continue to
        rely on the NDN-specific request-response paradigm.</t>
      </section>

      <section anchor="pub_sub.publish" title="Mapping Publish to NDN">
        <t>In classical publish-subscribe systems, a <spanx>Publish</spanx> is
        typically implemented as a push mechanism on the data plane. However,
        this contradicts the request-response paradigm employed by NDN. To
        adapt the <spanx>Publish</spanx> operation to NDN semantics, it is
        split into two phases and the required push mechanism is moved into
        the control plane. The two phases consist of: <list style="numbers">
            <t>Announcing names of Named Data Objects (NDO) on the
            control plane</t>

            <t>Requesting NDOs on the data plane</t>
          </list></t>

        <t>The first phase is the actual announcement of names in the upwards
        direction towards the CP. Because of NDN's name-based routing
        approach, the announcement of names is subject of the routing protocol
        and therefore belongs to the control plane. For this purpose, the
        control message type Name Advertisement Message (NAM) is adapted from
        PANINI <xref target="PANINI"></xref>. Similarly to the PAM, a NAM
        message utilizes a push mechanism in the control plane without
        interfering with the request-response mechanism on the data plane.
        NAMs are directed towards the (prefix-specific) parent of a node and
        traverse hop-by-hop along the gradient towards the CP. Each
        intermediate hop on the gradient installs forwarding states in the
        downward direction by using the announced names in the NAM and the
        incoming face. Typically, states are short-lived for content
        replication, only. NAMs contain one or multiple names encoded as TLV
        elements in the payload.</t>

        <t><xref target="f:pub_sub.publish.phases"></xref> (a) depicts the
        propagation of the NAM towards the (CP). In this example, the name
        <spanx>/HAW/temp123</spanx> is announced by (C) via (A) to (CP).</t>

        <figure anchor="f:pub_sub.publish.phases" title="Publish">
          <artwork align="center"><![CDATA[
+-----------------------------------------------------------------+
|                                                                 |
|   +----------------------+  +-------------------------------+   |
|   |                      |  |                               |   |
|   |     Mt: /HAW/temp123 |  |   Mt: /HAW/temp123 = 23C      |   |
|   |     ,->(CP)          |  |          ,---(CP)<--,         |   |
|   | NAM |  /             |  |          |    /     |         |   |
|   |     | /              |  |          |   /    ,-'         |   |
|   |     (A)<-,           |  | Interest | (A)    | Data(23C) |   |
|   |       \  | NAM       |  |          |   \    `-,         |   |
|   |        \ |           |  |          |    \     |         |   |
|   |        (C)           |  |          `--->(C)---'         |   |
|   |     /HAW/temp123     |  |       /HAW/temp123 = 23C      |   |
|   |                      |  |                               |   |
|   +----------------------+  +-------------------------------+   |
|          (a) Phase 1                  (b) Phase 2               |
+-----------------------------------------------------------------+
                     ]]></artwork>
        </figure>

        <t>In addition to a FIB, the (CP) maintains another data structure
        <spanx>Mt</spanx> (Meta-Table) to store all announced names annotated
        with additional context information and a lifetime. Upon receipt of a
        NAM, the <spanx>Mt</spanx> is updated accordingly. Context information
        consists of generic properties attached to a name (e.g. topic names
        and content freshness indicators) and are out of scope of this
        document. The <spanx>Mt</spanx> has its own name and can be requested
        by other devices.</t>

        <t>In the second phase, the (CP) requests the content of newly learned
        names from the first phase. For content requests, the regular NDN
        Interest-Data exchange on the data plane is used and is depicted in
        <xref target="f:pub_sub.publish.phases"></xref> (b). Upon receipt, the
        content is cached on the (CP).</t>
      </section>

      <section anchor="pub_sub.subscribe" title="Mapping Subscribe to NDN">
        <t>In the proposed publish-subscribe system, the <spanx>Subscribe</spanx>
        operation is equivalent to an Interest-based request of previously
        learned content names. A device can learn about new content by (a)
        Name Advertisements of the CP via dedicated prefix path (TODO) or
        broadcast. It may as well poll the <spanx>Mt</spanx> in order to learn
        about general updates at the CP. Context information in the <spanx>Mt</spanx>
        may give indications about periodic sensor readings, so that a
        periodic polling of the <spanx>Mt</spanx> can be aligned with the
        sensor reading period.</t>

        <figure anchor="f:pub_sub.subscribe" title="Subscribe">
          <artwork align="center"><![CDATA[
+--------------------------------------------------------+
|                                                        |
|   +----------------------+  +----------------------+   |
|   |                      |  |                      |   |
|   |    Data (Mt)         |  |    Data (Nx)         |   |
|   |       ,-------->(S)  |  |       ,-------->(S)  |   |
|   |     (CP)<--------'   |  |     (CP)<--------'   |   |
|   |     /  \  Int. (Mt)  |  |     /  \  Int. (Nx)  |   |
|   |    /    \            |  |    /    \            |   |
|   |  (A)    (B)          |  |  (A)    (B)          |   |
|   |  /|\    /|\          |  |  /|\    /|\          |   |
|   | : : :  : : :         |  | : : :  : : :         |   |
|   |                      |  |                      |   |
|   +----------------------+  +----------------------+   |
|       (a) Request Mt          (b) Request Content      |
+--------------------------------------------------------+
                     ]]></artwork>
        </figure>

        <t>In <xref target="f:pub_sub.subscribe"></xref> (a), a subscriber (S)
        requests the <spanx>Mt</spanx> to learn about new names. A new name
        (Nx) is then requested via the regular Interest/Data request-response
        paradigm in <xref target="f:pub_sub.subscribe"></xref> (b).</t>

        <t>The majority of constrained devices at the IoT edge are mostly
        content producers, but not consumers. Subscribers do not necessarily
        need to be part of the distribution tree, but may reach the gateway
        (CP) by other means.</t>
      </section>

      <section title="Content Replication between Proxy Instances">
        <t>TODO</t>
      </section>
    </section>

    <section anchor="messaging" title="Control Plane Messaging ">
      <t>TODO</t>
    </section>

    <section anchor="security.considerations" title="Security Considerations">
      <t>TODO</t>
    </section>
  </middle>

  <back>
    <references title="Normative References">
      <?rfc include="reference.RFC.2119"?>
    </references>

    <references title="Informative References">
      <?rfc include="reference.RFC.7476"?>

      <?rfc include="reference.RFC.7927"?>

      <?rfc include="reference.RFC.7945"?>

      <reference anchor="NDN-EXP">
        <front>
          <title>Information Centric Networking in the IoT: Experiments with
          NDN in the Wild</title>

          <author initials="E." surname="Baccelli">
            <organization>INRIA</organization>
          </author>

          <author initials="C." surname="Mehlis">
            <organization>FU Berlin</organization>
          </author>

          <author initials="O." surname="Hahm">
            <organization>INRIA</organization>
          </author>

          <author initials="TC." surname="Schmidt">
            <organization>HAW Hamburg</organization>
          </author>

          <author initials="M." surname="Waehlisch">
            <organization>FU Berlin</organization>
          </author>

          <date month="September" year="2014" />
        </front>

        <seriesInfo name="Proc. of 1st ACM Conf. on Information-Centric Networking (ICN-2014)"
                    value="ACM DL, pp. 77-86" />

        <format target="http://dx.doi.org/10.1145/2660129.2660144" type="PDF" />
      </reference>

      <reference anchor="PANINI">
        <front>
          <title>Let's Collect Names: How PANINI Limits FIB Tables in Name
          Based Routing</title>

          <author initials="TC." surname="Schmidt">
            <organization>HAW Hamburg</organization>
          </author>

          <author initials="S." surname="Woelke">
            <organization>HAW Hamburg</organization>
          </author>

          <author initials="N." surname="Berg">
            <organization>HAW Hamburg</organization>
          </author>

          <author initials="M." surname="Waehlisch">
            <organization>FU Berlin</organization>
          </author>

          <date month="Mai" year="2016" />
        </front>

        <seriesInfo name="Proc. of 15th IFIP Networking Conference"
                    value="IEEE Press, pp. 458-466" />

        <format target="http://dx.doi.org/10.1109/IFIPNetworking.2016.7497240"
                type="PDF" />
      </reference>

      <reference anchor="IWMT">
        <front>
          <title>Towards an Information-Centric Internet with more
          Things</title>

          <author initials="D." surname="Kutscher"></author>

          <author initials="S." surname="Farrell"></author>

          <date year="2011" />
        </front>

        <seriesInfo name="Position Paper, Interconnecting Smart Objects with the Internet Workshop"
                    value="IAB" />
      </reference>
    </references>

    <section numbered="no" title="Acknowledgments">
      <t>This work was stimulated by fruitful discussions ... We would like to
      thank all active members for constructive thoughts and feedback. In
      particular, the authors would like to thank (in alphabetical order)
      Emmanuel Baccelli, Michael Frey, Oliver Hahm, Peter Kietzmann, Dirk
      Kutscher, Martine Lenders, Joerg Ott, Hauke Petersen, and Felix
      Shzu-Juraschek. This work was partly funded by the German Federal
      Ministry of Education and Research, project I3.</t>
    </section>
  </back>
</rfc>
