In Internet of Things (IoT), numerous nodes produce huge volumes of data that are subject of various processing tasks. Tasks execution on top of the collected data can be realized either at the edge of the network or at the Fog/Cloud. Their management at the network edge may limit the required time for concluding responses and return the final outcome/analytics to endusers or applications. IoT nodes, due to their limited computational and resource capabilities, can execute a limited number of tasks over the collected contextual data. A challenging decision is related to which tasks IoT nodes should execute locally. Each node should carefully select such tasks to maximize the performance based on the current contextual information, e.g., tasks' characteristics, nodes' load and energy capacity. In this paper, we propose an intelligent decision making scheme for selecting the tasks that will be locally executed. The remaining tasks will be transferred to peer nodes in the network or the Fog/Cloud. Our focus is to limit the time required for initiating the execution of each task by introducing a two-step decision process. The first step is to decide whether a task can be executed locally; if not, the second step involves the sophisticated selection of the most appropriate peer to allocate it. When, in the entire network, no node is capable of executing the task, it is, then, sent to the Fog/Cloud facing the maximum latency. We comprehensively evaluate the proposed scheme demonstrating its applicability and optimality at the network edge.