Fog computing in 5G networks has played a significant role in increasing the number of users in a given network. However, Internet-of-Things (IoT) has driven system designers towards designing heterogeneous networks to support diverse demands (tasks with different priority values) with different latency and data rate constraints. In this paper, our goal is to maximize the total number of tasks served by a heterogeneous network, labeled task throughput, in the presence of data rate and latency constraints and device preferences regarding computational needs. Since our original problem is intractable, we propose an efficient solution based on graph-coloring techniques. We demonstrate the effectiveness of our proposed algorithm using numerical results, real-world experiments on a laboratory testbed and comparing with the state-of-the-art algorithm.