<?xml version="1.0" encoding="utf-8"?>
<?xml-model href="rfc7991bis.rnc"?>  <!-- Required for schema validation and schema-aware editing -->

<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<!-- If further character entities are required then they should be added to the DOCTYPE above.
     Use of an external entity file is not recommended. -->
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-li-cats-task-segmentation-framework-01" category="info" consensus="true" submissionType="IETF" tocInclude="true" version="3">
  <front>
    <title abbrev="Task Segmentation Framework">A Task Segmentation Framework for Computing-Aware Traffic Steering</title>
    <seriesInfo name="Internet-Draft"
                value="draft-li-cats-task-segmentation-framework-01"/>

    <author fullname="Chuanhuang Li" initials="C." surname="Li">
    <organization>Zhejiang Gongshang University</organization>
    <address>
        <postal>
          <city>Zhejiang</city>

          <country>China</country>
        </postal>
        <email>chuanhuang_li@zjgsu.edu.cn</email>
    </address>
    </author>

    <author fullname="Yingjie Yu" initials="Y." surname="Yu">
    <organization>Zhejiang Gongshang University</organization>
    <address>
        <postal>
          <city>Zhejiang</city>

          <country>China</country>
        </postal>
        <email>1912190128@pop.zjgsu.edu.cn</email>
    </address>
    </author>
    <author fullname="Shicong Zhang" initials="S." surname="Zhang">
    <organization>China Mobile</organization>
    <address>
      <postal>
        <country>China</country>
      </postal>
      <email>zhangshicong@cmhi.chinamobile.com</email>
    </address>
    </author>
    <author fullname="Bo Ma" initials="B." surname="Ma">
    <organization>Zhejiang Gongshang University</organization>
    <address>
      <postal>
        <city>Zhejiang</city>
        <country>China</country>
      </postal>
      <email>mabo@zjgsu.edu.cn</email>
    </address>
    </author>

    <date day="22" month="December" year="2024"/>
    <area>routing</area>

    <workgroup>cats</workgroup>
    <keyword>Internet-Draft</keyword>
    <abstract>
      <t>This document proposes an extension to the Computing-Aware Traffic Steering (CATS) framework by introducing a task segmentation module. This extension enables the CATS framework to handle divisible computing requests by breaking them down into smaller computational units, referred to as "Task". The document focuses on two primary task segmentation modes: the distributed mode and the stepwise mode, providing detailed workflows for each.</t>
    </abstract>
   </front>
  
  <middle>
    <section anchor="introduction">
      <name>Introduction</name>
      <t>With the growing demand for efficient and scalable network services, segmenting computational tasks for distributed processing has become increasingly important. This document extends the existing CATS framework by introducing a "Task Segmentation Module" (TSM), which collaborates with the CATS Service Metric Agent (C-SMA) and the CATS Network Metric Agent (C-NMA) to optimize task allocation and execution.</t>
    </section>
    <section anchor="requirements-language">
      <name>Requirements Language</name>
      <t>
        The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>",
        "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL NOT</bcp14>", 
        "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>",
        "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
        "<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document
        are to be interpreted as described in BCP 14 <xref target="RFC2119"/>
        <xref target="RFC8174"/> when, and only when, they appear in all
        capitals, as shown here.
      </t>
    </section>
    <section anchor="terminology">
       <name>Terminology</name>
        <t>This document makes use of the terms defined in <xref target="I-D.ietf-cats-framework"/>.  In addition, the following terms are defined below: </t>
        <dl>
        <dt>CATS Service Metric Agent (C-SMA):</dt>
        <dd>
          <t>A functional entity that is responsible for collecting service capabilities and status, and for reporting them to a CATS Path Selector (C-PS). (From <xref target="I-D.ietf-cats-framework"/>)</t>
        </dd>
        <dt>CATS Network Metric Agent (C-NMA):</dt>
        <dd>
          <t>A functional entity that is responsible for collecting network capabilities and status, and for reporting them to a C-PS. (From <xref target="I-D.ietf-cats-framework"/>)</t>
        </dd>
        <dt>CATS Path Selector (C-PS):</dt>
        <dd>
          <t>A functional entity that selects pathstowards service locations and instances and which accommodates therequirements of service requests.  Such a path selection engine takes into account the service and network status information. (From <xref target="I-D.ietf-cats-framework"/>)</t>
        </dd>
          <dt>Task:</dt>
            <dd>
              <t>In this document, a Task refers to a logical computational unit within a service request that can be processed independently. Tasks may represent simple computational steps or form part of a complex computational process. The granularity of a task is smaller than that of a "service" and represents specific operations executed within a service instance. For detailed task classifications, see Sections <xref target="divisible-and-indivisible-tasks"/> and <xref target="classification-of-divisible-tasks"/>.</t>
            </dd>
          <dt>Computing Power Brain (CPB):</dt>
            <dd>
              <t>The Computing Power Brain (CPB) is responsible for coordinating the C-NMA and C-SMA to retrieve relevant data and determine the optimal task segmentation strategy.</t>
            </dd>
          <dt>CATS Task Execution Agent (C-TEA):</dt>
          <dd>
            <t>
              The CATS Task Execution Agent (C-TEA) is responsible for receiving instructions from the CPB and carrying out the actual segmentation and distribution of tasks. During the task segmentation process, the C-TEA transforms logical tasks into actionable task units and interacts with the CATS Path Selector (C-PS) and the CATS Forwarder to ensure tasks are correctly delivered to the appropriate service sites.
            </t>
          </dd>
          <dt>Task Segmentation Module (TSM):</dt>
          <dd>
            <t>The Task Segmentation Module (TSM), primarily composed of the CPB and C-TEA, is a functional component tasked with analyzing incoming requests and segmenting them into smaller task units based on their dependencies and independence. For further details, see <xref target="task-segmentation-module"/>.</t>
          </dd>
        </dl>
    </section>
    <section anchor="task-segmentation-module">
      <name>Task Segmentation Module (TSM)</name>
      <t>To enhance the utilization of computing and network resources, this document extends the CATS framework by introducing the concept of task segmentation. Task segmentation involves breaking down received service requests into smaller computational units to enable more efficient distribution and processing across network and computing resources. Tasks can be categorized into two types based on their characteristics: divisible tasks and indivisible tasks.</t>
      <section anchor="divisible-and-indivisible-tasks">
        <name>Divisible and Indivisible Tasks</name>
        <dl>
          <dt>Divisible Tasks:</dt>
          <dd>
            <t>These refer to computational requests that can be further broken down into multiple subtasks. Each subtask can either be processed Non-dependently or executed sequentially. Divisible tasks offer greater flexibility in allocation and processing, optimizing resource utilization.</t>
          </dd>
          <dt>Indivisible Tasks:</dt>
          <dd>
            <t>These are computational requests that must be processed as a whole and cannot be broken into subtasks. These tasks are typically handled by a single service site and often involve low-complexity operations that require consistent processing.</t>
          </dd>
        </dl>
      </section>
      <section anchor="classification-of-divisible-tasks">
        <name>Classification of Divisible Tasks</name>
        <t>Divisible tasks can be further divided into dependent tasks and Non-dependent tasks.</t>
        <dl>
        <dt>Dependent Tasks:</dt>
        <dd>
          <t>These tasks exhibit a defined sequence of execution and dependencies among subtasks. For example, the output of Task A serves as the input for Task B. Task allocation and resource scheduling must consider these dependencies to ensure tasks are processed in a specific order, meeting computational logic and data flow requirements.</t>
        </dd>
        <dt>Non-dependent Tasks:</dt>
        <dd>
          <t>These tasks can be divided into relatively autonomous atomic tasks, each of which can be completed Non-dependently without relying on the results of other tasks. Non-dependent tasks are suitable for parallel processing, significantly improving computational efficiency.</t>
        </dd>
        </dl>
      </section>
      <section>
        <name>Task Segmentation Process</name>
        <t>This section describes the process of task segmentation, as determined and executed by the CPB.</t>
        <dl>
          <dt>Task Reception:</dt>
          <dd>
            <t>The CPB receives computational requests from clients.</t>
          </dd>
          <dt>Task Analysis:</dt>
          <dd>
            <t>Based on the characteristics and requirements of the request, the CPB determines whether the task is divisible.</t>
          </dd>
          <dt>Task Classification:</dt>
          <dd>
            <t>If the task is divisible, the CPB further analyzes whether it involves task dependencies.If the task is indivisible, the request is allocated as a whole to an appropriate service instance for processing, as described in <xref target="I-D.ietf-cats-framework"/>.</t>
          </dd>
          <dt>Task Allocation and Execution:</dt>
          <dd>
            <t>When task is divisible, dependent tasks are sequentially allocated and processed across service sites based on their dependencies. Non-dependent tasks are divided into multiple subtasks and distributed to different service sites for parallel processing. Specific segmentation details (e.g., segmentation ratio and the number of subtasks) are beyond the scope of this document.</t>
          </dd>
        </dl>
      </section>
      <section>
        <name>Application Scenarios for Task Segmentation</name>
        <t>Task segmentation significantly optimizes traffic steering and resource utilization within the CATS framework.</t>
        <dl>
          <dt>Applications for Dependent Tasks:</dt>
          <dd>
            <t>These are suitable for scenarios requiring sequential execution, such as data stream computing or complex pipeline processing, e.g., multi-step encoding and compression in video processing.</t>
          </dd>
          <dt>Applications for Non-dependent Tasks:</dt>
          <dd>
            <t>These are ideal for large-scale parallel computing, such as batch image processing or distributed data analysis tasks. By classifying and segmenting tasks, the CATS framework can dynamically adjust and optimize resource scheduling strategies to meet the performance requirements and service quality needs of various application scenarios.</t>
          </dd>
        </dl>
      </section>
    </section>

    <section anchor="The-Role-of-Task-Segmentation-in-the-CATS-Framework">
      <name>The Role of Task Segmentation in the CATS Framework</name>
      <t>Tasks serve as the fundamental units for service request allocation and computing resource scheduling. By segmenting requests into tasks, the CATS framework can optimize resource utilization and path selection in a more granular manner based on the current state of network and computing resources. The introduction of tasks enables the CATS framework to achieve the following: </t>
      <dl>
          <dt>Optimizing Resource Allocation:</dt>
          <dd>
            <t>Through task segmentation and distribution, the network can dynamically select the most suitable paths and service instances, thereby enhancing the utilization of both computing and network resources.</t>
          </dd>
          <dt>Improving Concurrent Processing Capability:</dt>
          <dd>
            <t>For divisible tasks, parallel processing can be leveraged to boost overall computational efficiency.</t>
          </dd>
          <dt>Supporting Dependency Management:</dt>
          <dd>
            <t>In the stepwise task mode, inter-task dependencies can be maintained to ensure the correct order of computation.</t>
          </dd>
      </dl>
    </section>
    <section anchor="CATS-Workflow-under-Multi-Task-Segmentation">
      <name>CATS Workflow under Multi-Task Segmentation</name>
      <section anchor="Distributed-Mode">
          <name>Distributed Mode</name>
          <t>In the distributed mode, the task to be processed is intelligently segmented into Non-dependent subtasks and distributed across multiple service instances for parallel processing. This mode is suitable for tasks without dependencies.</t>
          <t>As shown in <xref target="Distributed-Framework"/>.The detailed workflow for distributed tasks is as follows:</t>
          <ol type="(%d)">
            <li>The client sends a service request, and the CPB receives the service request and determines that the task type is a Non-dependent task.</li>
            <li>The CPB evaluates the network and computing resource conditions using data from the C-SMA and C-NMA, then formulates an appropriate task allocation plan. The C-TEA executes the specific segmentation operations.</li>
            <li>The CPB collaborates with the C-PS to determine the optimal path for each subtask. The ingress CATS forwarder routes each subtask along its predetermined path to the corresponding egress CATS forwarder and service site.</li>
            <li>Each service site processes its assigned subtask in parallel, and the results are aggregated and returned to the client.</li>
          </ol>
          <figure anchor="Distributed-Framework">
            <name>Distributed Framework (assumes segmentation into 3 subtasks)</name>
            <artwork><![CDATA[
                                +-----+             
                              +------+|                         +-------+
                              |client|+------------------------>|  CPB  |
                              +---+--+                          +-------+
                                  |                             |   ^   ^
                                  |                             |   |   |
                              +---+---+                         |   |   |
                              | C-TEA |<------------------------+   |   |
                              +---+---+                             |   |
                                  |                                 |   |
                                  |                                 |   |
              +-------------------+---------------------+           |   |
              |                   |                     |           |   |  
              |                   |                     |           |   |
    +---------+------+  +---------+------+  +-----------+----+      |   |
    |         |C-PS#1|  |         |C-PS#2|  |         |C-PS#3|      |   |
....|         +------|..|         +------|..|         +------|....  |   |
:   |CATS-Forwarder 1|  |CATS-Forwarder 2|  |CATS-Forwarder 3|   :  |   |
:   +----------------+  +----------------+  +----------------+   :  |   |
:                                                                :  |   |
:                                                                :  |   |
:                            Underlay            +-------+       :  |   |
:                         Infrastructure         | C-NMA |----------+   | 
:                                                +-------+       :      |
:                                                                :      |
:                                                                :      |
:                                                                :      |
:   +----------------+  +----------------+  +----------------+   :      |
:   |CATS-Forwarder 4|  |CATS-Forwarder 5|  |CATS-Forwarder 6|   :  +-------+
....|                |..|                |..|                |....  | C-SMA |
    +------+---------+  +--------+-------+  +--------+-------+      +-------+
           |                     |                   |               ^  ^  ^
           |                     |                   |               |  |  |
           |                     |                   |               |  |  |
      +------------+         +------------+       +------------+     |  |  |
    +------------+ |       +------------+ |      +------------+ |    |  |  |
    |  Service   | |       |  Service   | |      |  Service   | |    |  |  |
    |  Contact   | |--+    |  Contact   | |--+   |  Contact   | |----+  |  |
    |  Instance  |-+  |    |  Instance  |-+  |   |  Instance  |-+       |  |
    +------------+    |    +------------+    |   +------------+         |  | 
      Service Site 1  |     Service Site 2   |    Service Site 3        |  |
                      |                      +--------------------------+  |
                      +----------------------------------------------------+         
              ]]></artwork>         
          </figure>
      </section>
      <section anchor="Stepwise-Mode">
        <name>Stepwise Mode</name>
        <t>The stepwise mode is applicable for tasks with interdependencies, where each subtask depends on the output of the previous subtask and must be routed sequentially between service sites.</t>
        <t>As shown in <xref target="Stepwise-Framework"/>. The detailed workflow for stepwise tasks is as follows:</t>
          <ol type="(%d)">
            <li>The client sends a service request, and the CPB receives the service request and determines that the task type is a dependent task.</li>
            <li>The CPB evaluates the network and computing resource conditions using data from the C-SMA and C-NMA, then formulates an appropriate task allocation plan. The C-TEA executes the specific segmentation operations.</li>
            <li>The CPB and C-PS determine the path for the first subtask using data from the C-SMA and C-NMA. After the first subtask is processed at the initial service site, its output is routed to the next service site for further processing. This process is repeated, with the C-PS selecting an appropriate path for each subtask, until all subtasks are completed.</li>
            <li>The final results are aggregated and returned to the client.</li>
          </ol>
        
        <figure anchor="Stepwise-Framework">
            <name>Stepwise Framework (assumes segmentation into 3 subtasks)</name>
            <artwork><![CDATA[
          +-----+                                         
        +------+|                         +-------+<------------------------+
        |client|+------------------------>|  CPB  |                         |
        +---+--+                          +-------+<----------------------+ |
            |                             |                               | |
            |                             |                               | |
        +---+---+<------------------------+                               | |
        | C-TEA |                                                         | |
        +---+---+                                                         | |
            |          +-----------+            +---------+               | |
            |          |           |            |         |               | |
  +---------+------+   |   +-------+--------+   |   +-----+----------+    | |  
  |         |C-PS#1|   |   |         |C-PS#2|   |   |         |C-PS#3|    | |   
..|          +-----|.. | ..|         +------|.. | ..|         +------|..  | |  
: |CATS-Forwarder 1| : | : |CATS-Forwarder 2| : | : |CATS-Forwarder 3| :  | |   
: +----------------+ : | : +----------------+ : | : +----------------+ :  | |   
:     Underlay       : | :     Underlay       : | :     Underlay       :  | |
:   Infrastructure   : | :   Infrastructure   : | :   Infrastructure   :  | |
:                    : | :                    : | :                    :  | |
:     +-------+      : | :     +-------+      : | :     +-------+      :  | |
:     | C-NMA |      : | :     | C-NMA |      : | :     | C-NMA |      :  | |
:     +---+---+      : | :     +---+---+      : | :     +---+---+      :  | |
:         |          : | :         |          : | :         |          :  | |
:         +----------:-|-:---------+----------:-|-:---------+----------:--|-+
: +----------------+ : | : +----------------+ : | : +----------------+ :  |
: |CATS-Forwarder 4| : | : |CATS-Forwarder 5| : | : |CATS-Forwarder 6| :  |
..|                |.. | ..|                |.. | ..|                |..  |
  +----------------+   |   +----------------+   |   +----------------+    |
         |             |          |             |         |               |
         |             |          |             |         |               |
   +------------+      |   +------------+       |  +------------+         | 
 +------------+ |      | +------------+ |       | +------------+ |        |  
 |  Service   | |------+ |  Service   | |-------+ |  Service   | |        | 
 |  Contact   | |--+     |  Contact   | |--+      |  Contact   | |----+   | 
 |  Instance  |-+  |     |  Instance  |-+  |      |  Instance  |-+    |   | 
 +------------+    |     +------------+    |      +------------+      |   |  
   Service Site 1  |       Service Site 2  |        Service Site 3    |   |    
                   |                       |                          |   |
                   |                       |                          |   |
                   +----------->+-------+<-+                          |   |
                                | C-SMA |                             |   |
                                +---+---+<----------------------------+   |
                                    |                                     |
                                    +-------------------------------------+                         
                                                                                           
              ]]></artwork>
          </figure>
      </section>
    </section>
    <section anchor="security-considerations">
      <name>Security Considerations</name>
      <t>TBD</t>
    </section>
    <section anchor="IANA-Considerations">
      <name>IANA Considerations</name>
      <t>TBD</t>
    </section>
  </middle>

  <back>
    <references anchor="References">
      <name>References</name>
    <references anchor="normative-references">
        <name>Normative References</name>

        <reference anchor="RFC2119"
                   target="https://www.rfc-editor.org/info/rfc2119"
                   xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml">
          <front>
            <title>Key words for use in RFCs to Indicate Requirement
            Levels</title>

            <author fullname="S. Bradner" initials="S." surname="Bradner"/>

            <date month="March" year="1997"/>

            <abstract>
              <t>In many standards track documents several words are used to
              signify the requirements in the specification. These words are
              often capitalized. This document defines these words as they
              should be interpreted in IETF documents. This document specifies
              an Internet Best Current Practices for the Internet Community,
              and requests discussion and suggestions for improvements.</t>
            </abstract>
          </front>

          <seriesInfo name="BCP" value="14"/>

          <seriesInfo name="RFC" value="2119"/>

          <seriesInfo name="DOI" value="10.17487/RFC2119"/>
        </reference>

        <reference anchor="RFC8174"
                   target="https://www.rfc-editor.org/info/rfc8174"
                   xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml">
          <front>
            <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key
            Words</title>

            <author fullname="B. Leiba" initials="B." surname="Leiba"/>

            <date month="May" year="2017"/>

            <abstract>
              <t>RFC 2119 specifies common key words that may be used in
              protocol specifications. This document aims to reduce the
              ambiguity by clarifying that only UPPERCASE usage of the key
              words have the defined special meanings.</t>
            </abstract>
          </front>

          <seriesInfo name="BCP" value="14"/>

          <seriesInfo name="RFC" value="8174"/>

          <seriesInfo name="DOI" value="10.17487/RFC8174"/>
        </reference>
      </references>

    <references anchor="informative-references">
        <name>Informative References</name>
      <reference anchor="I-D.ietf-cats-framework" target="https://datatracker.ietf.org/doc/html/draft-ietf-cats-framework-04">
      <front>
        <title>A Framework for Computing-Aware Traffic Steering (CATS)</title>
        <author initials="C." surname="Li" fullname="Cheng Li">
          <organization>Huawei Technologies</organization>
        </author>
        <author initials="Z." surname="Du" fullname="Zongpeng Du">
          <organization>China Mobile</organization>
        </author>
        <author initials="M." surname="Boucadair" fullname="Mohamed Boucadair">
          <organization>Orange</organization>
        </author>
        <author initials="L. M." surname="Contreras" fullname="Luis M. Contreras">
          <organization>Telefonica</organization>
        </author>
        <author initials="J." surname="Drake" fullname="John Drake">
          <organization>Juniper Networks, Inc.</organization>
        </author>
        <date month="October" day="17" year="2024"/>
        <abstract>
          <t> This document describes a framework for Computing-Aware Traffic Steering (CATS). Particularly, the document identifies a set of CATS components, describes their interactions, and exemplifies the workflow of the control and data planes. </t>
        </abstract>
      </front>
      <seriesInfo name="Internet-Draft" value="draft-ietf-cats-framework-04"/>
      </reference>
    </references>

    </references>
    <section anchor="acknowledgements" numbered="false">
      <name>Acknowledgements</name>
      <t>TBD</t>
    </section>
 </back>
</rfc>