In a typical Wireless Sensor Network (WSN) application, the basic communication service is the transportation of the data collected from sensors to the base station. For prolonging the network lifetime, energy efficiency should be one of the primary attributes of such a service. The amount of data transmitted by a node usually depends on how much local processing is performed. As an example, in visual sensor networks the amount of image processing on the nodes affects the amount of data transmitted to the base station (i.e., the higher the computation, the lower the communication and vice versa). Hence in order to improve energy efficiency and prolong the network lifetime this communication/computation energy trade-off must be analyzed. This analysis may be performed at the network-level (i.e., all nodes in the network use the same strategy) or at a node level (i.e., sensor nodes do not necessarily have identical strategies). The latter is more fine-grained allowing different nodes to implement different solutions. To guide designers in effectively using these trade-offs to prolong network lifetime, we develop a novel Mixed Integer Programming (MIP) framework. We show that the optimal node level strategy can extend network lifetime more than 20% as compared to a network-level optimal strategy. We also develop a computationally efficient heuristic to overcome the very high computational requirements of the proposed MIP model. (C) 2015 Elsevier B.V. All rights reserved.