  The rise of the Internet of Things and edge computing has shifted computing
resources closer to end-users, benefiting numerous delay-sensitive,
computation-intensive applications. To speed up computation, distributed
computing is a promising technique that allows parallel execution of tasks
across multiple compute nodes. However, current research predominantly revolves
around the master-worker paradigm, limiting resource sharing within one-hop
neighborhoods. This limitation can render distributed computing ineffective in
scenarios with limited nearby resources or constrained/dynamic connectivity. In
this paper, we address this limitation by introducing a new distributed
computing framework that extends resource sharing beyond one-hop neighborhoods
through exploring layered network structures and multi-hop routing. Our
framework involves transforming the network graph into a sink tree and
formulating a joint optimization problem based on the layered tree structure
for task allocation and scheduling. To solve this problem, we propose two exact
methods that find optimal solutions and three heuristic strategies to improve
efficiency and scalability. The performances of these methods are analyzed and
evaluated through theoretical analyses and comprehensive simulation studies.
The results demonstrate their promising performances over the traditional
distributed computing and computation offloading strategies.
