Nowadays notable computing is shifted away from the cloud and performed onto the Internet of Things (IoT) devices. This necessity emerges due to the growing needs not only for real-time decision support but also for real-time data processing. When used in critical applications such as search and rescue missions or monitoring and control of critical infrastructure, the overall reliable operation of the application running on these devices becomes a major challenge, especially as system reliability is an application-and h/w-dependent measure. Moreover, performance and energy are typically constrained and vary depending on where the computation takes place, as well as, on the communication channels between the devices. Hence, the problem of task allocation under reliabilityperformance-energy constraints becomes even more complex in such cloud/hub/edge computing paradigms. In this work, we use a mathematical programming based framework to derive an optimal task allocation based on multiple operational constraints (latency and energy in both computation and communication), while taking into consideration the reliability demands of the application. We consider an architecture consisting of an edge node, an intermediate node (hub), and the cloud infrastructure, and evaluate our approach using a real-life use-case where the proposed framework minimizes the overall latency of the application while considering the reliability demands of each executed task. Configuration B Configuration C Configuration D Latency (ms) Edge Hub Cloud Edge-> Hub Hub-> Edge Hub-> Cloud Cloud-> Hub