  Cooperative computation is a promising approach for localized data processing
at the edge, e.g. for Internet of Things (IoT). Cooperative computation
advocates that computationally intensive tasks in a device could be divided
into sub-tasks, and offloaded to other devices or servers in close proximity.
However, exploiting the potential of cooperative computation is challenging
mainly due to the heterogeneous and time-varying nature of edge devices. Coded
computation, which advocates mixing data in sub-tasks by employing erasure
codes and offloading these sub-tasks to other devices for computation, is
recently gaining interest, thanks to its higher reliability, smaller delay, and
lower communication costs. In this paper, we develop a coded cooperative
computation framework, which we name Coded Cooperative Computation Protocol
(C3P), by taking into account the heterogeneous resources of edge devices. C3P
dynamically offloads coded sub-tasks to helpers and is adaptive to time-varying
resources. We show that (i) task completion delay of C3P is very close to
optimal coded cooperative computation solutions, (ii) the efficiency of C3P in
terms of resource utilization is higher than $99\%$, and (iii) C3P improves
task completion delay significantly as compared to baselines via both
simulations and in a testbed consisting of real Android-based smartphones.
