  Collaborative edge computing (CEC) is an emerging paradigm where
heterogeneous edge devices (stakeholders) collaborate to fulfill computation
tasks, such as model training or video processing, by sharing communication and
computation resources. Nevertheless, the optimal data/result routing and
computation offloading strategy in CEC with arbitrary topology still remains an
open problem. In this paper, we formulate a partial-offloading and multi-hop
routing model for arbitrarily divisible tasks. Each node individually decides
the computation of the received data and the forwarding of data/result traffic.
In contrast to most existing works, our model applies to tasks with
non-negligible result size, and enables separable data sources and result
destinations. We propose a network-wide cost minimization problem with
congestion-aware cost to jointly optimize routing and computation offloading.
This problem covers various performance metrics and constraints, such as
average queueing delay with limited processor capacity. Although the problem is
non-convex, we provide non-trivial necessary and sufficient conditions for the
global-optimal solution, and devise a fully distributed algorithm that
converges to the optimum in polynomial time, allows asynchronous individual
updating, and is adaptive to changes in network topology or task pattern.
Numerical evaluation shows that our proposed method significantly outperforms
other baseline algorithms in multiple network instances, especially in
congested scenarios.
