A Demand-driven, Proactive Tasks Management Model at the Edge

Tasks management is a very interesting research topic for various application domains. Tasks may have the form of analytics or any other processing activities over the available data. One of the main concerns is to efficiently allocate and execute tasks to produce meaningful results that will facilitate any decision making. The advent of the Internet of Things (IoT) and Edge Computing (EC) defines new requirements for tasks management. Such requirements are related to the dynamic environment where IoT devices and EC nodes act and process the collected data. The statistics of data and the status of IoT/EC nodes are continuously updated. In this paper, we propose a demand- and uncertainty-driven tasks management scheme with the target to allocate the computational burden to the appropriate places. As the proper place, we consider the local execution of a task in an EC node or its offloading to a peer node. We provide the description of the problem and give details for its solution. The proposed mechanism models the demand for each task and efficiently selects the place where it will be executed. We adopt statistical learning and fuzzy logic to support the appropriate decision when tasks’ execution is requested by EC nodes. Our experimental evaluation involves extensive simulations for a set of parameters defined in our model. We provide numerical results and reveal that the proposed scheme is capable of deciding on the fly while concluding the most efficient allocation.


I. INTRODUCTION
Tasks offloading is a key research topic in Edge Computing (EC) and Internet of Things (IoT) if we consider the dynamic environment where nodes act and their heterogeneity. Efficient solutions should be provided that will allocate tasks to the available processing nodes to conclude the desired analytics. This becomes more important if we consider that any processing at the EC will limit the latency that end users enjoy. Hence, time sensitive applications can be easily served increasing the performance and the quality of services provided to end users. In addition, tasks processing at the edge can reduce the network traffic [30], driving data analytics towards geo-distributed processing, known as edge analytics [23], [27], [36], [41].
It becomes obvious that an efficient tasks management scheme can facilitate the delivery of analytics at the edge and the respective decision making. Tasks offloading was first applied to Mobile Cloud Computing (MCC) [11], [24], i.e., we can offload the computing tasks of mobile terminals to traditional cloud data centers where centralized computing and storage are the main features. However, in such cases there are some obstacles related to the experienced delay especially when communications are realized over a Wide Area Network (WAN). Additionally, the intense variability of the contextual information around the status of EC nodes, tasks and the collected data impose strict requirements for the effective conclusion of tasks allocation. For instance, heterogeneity heavily affects the decision making. These requirements should be met by any model trying to manage task at the edge of the network. In the relevant literature (see next Section), task allocation and scheduling originates in the management of a group of nodes. The allocation is, then, adopted to determine the assignment of each task to a node while scheduling mainly aims to the sequence of the execution for each task. The challenges are to (C1) maximize the performance and (C2) minimize the energy consumption, thus, maximizing the lifetime of the network. Multiple research efforts deal with centralized approaches, thus, the allocation and scheduling models suffer from the drawbacks reported in the literature for Cloud computing [14].
In this paper, we focus on the investigation of tasks offloading methodologies adopted to decide when a task should be executed locally or be offloaded to other peer nodes. We adopt a distributed approach, i.e., every EC node autonomously decides for tasks allocation reported to it. Users' mobility is taken into consideration to, eventually, support the decision making. Mobility affects the demand for the execution of tasks imposing spatio-temporal requirements in our model. Users' mobility also increases the complexity when trying to find out if a task will be kept locally and adds uncertainty in nodes' behaviour. Demand and contextual information is exchanged between nodes to support our mechanism. The contextual information is related to the status of nodes as well as the data present in them. Our strategic decision is to keep and execute locally tasks exhibiting a high demand and offload the remaining to nodes where also a high demand is observed for each of them. The intuition behind this is two fold: First, nodes save resources through the re-use of tasks execution framework and load balancing is conserved; Secondly, the latency experienced by users is minimized as highly demanded tasks are initiated to be executed immediately. Another source of complexity for the discussed problem is the need for a scalable approach. The number of users and tasks may be extensively high, thus, it would be difficult to apply any optimization model that requires increased time to produce outcomes. This, in combination with the need for real time responses, makes us to focus on a 'fast' technique that covers the uncertainty present into our problem, i.e., Fuzzy Logic (FL), together with incremental statistical learning that limits the required processing time. The following list depicts our contributions: • We propose a georeferenced task management scheme where computation offloading is decided based on data present at every node and tasks demand. • We adopt a Fuzzy Logic Controller (FLC) to indicate when a task should be offloaded or not, thus, we manage the uncertainty related to the discussed decision making. • We provide an extensive experimental evaluation that reveals the pros and cons of the proposed approach. Our evaluation is performed for a set of metrics adopting real and synthetic traces. Results indicate that our model is capable of supporting real time applications while exhibiting an increased performance for a large set of experimental scenarios.
The remaining paper is organized as follows. Section II reports on the related work and presents important research efforts in the field. In Section III, we discuss preliminary information and describe our problem while in Section IV, we present the proposed mechanism. Section V is devoted to the description of our experimental evaluation adopting a set of performance metrics. Finally, in Section VI, we conclude our paper giving our future research plans.

II. RELATED WORK
EC could involve numerous nodes capable of interacting with IoT devices and execute a set of tasks. Tasks are 'dictated' by applications or directly by end users and can have the form of a processing activity, a query over the collected data and so on and so forth. EC extends the Cloud infrastructure offering numerous processing nodes close to end users, thus, limiting the latency they enjoy [18]. This advantage leads to the trend of offloading tasks to the edge infrastructure. It becomes natural to have recent studies dealing with computation offloading, i.e., tasks partitioning, tasks allocation, resource management and distributed execution [18]. In general, tasks offloading could be performed in two modes, i.e., full offloading and partial offloading [33]. In the former model, tasks should be executed as a whole no matter the location. For instance, we could adopt a model that delivers the appropriate place to offload the desired tasks based on various characteristics (tasks and nodes) [25]. The latter mode builds on the parallel execution of a set of sub-tasks possibly offloaded in different places. Apart from the distributed nodes, we should not forget that every EC node serves a set of users/IoT devices/applications. To increase EC nodes' performance we could incorporate into their decision making mechanisms models for joint tasks allocation, i.e., the allocation of tasks requested by different users/devices/applications [7]. Joint allocations is also the subject of [41] where the target is to minimize a tradeoff between the task execution time and mobile energy consumption. Resource sharing is considered as early as in [30], in which a greedy task dissemination algorithm was developed to minimize the completion time. In [15], a polynomial-time task assignment scheme is proposed for allocating tasks with inter-dependency towards achieving guaranteed latency-energy trade-offs. Machine Learning (ML) can play a significant role through the powerful models that can be adopted on the needs of EC nodes, tasks and their environment. For instance, in [7], the authors propose a strategy based on a Q-Learning algorithm. Another option is to study the tasks allocation problem as an optimization problem [10]. For instance, in [32], data transfer and computation in terms of monetary and time costs, with task deadlines guaranteed are studied. The problem becomes a maximization problem over the two coupled phases: data transfer and computation. However, its increased (it is an NP-hard problem) complexity mandates the use of a set of assumptions before we proceed with the final solution.
Various other models have been proposed for supporting the efficient tasks allocation. In [9], a dynamic, decentralized resource-allocation strategy based on evolutionary game theory is presented. The matching theory is adopted in [12], i.e., the model does not take into consideration the central Cloud in the Mobile Edge Computing (MEC) platform considering the autonomous nature of edge nodes. One coalition-gamebased cooperative method to optimize the problem of task offloading is the subject of [37] while in [13], the authors present game-based strategies for the discussed problem to achieve the Nash equilibrium among mobile users. In [29], the authors discuss a model for computation offloading under a scenario of multi-user and multi-mobile edge servers that considers the performance of intelligent devices and server resources. The task scheduling part of the model is based on an auction algorithm by considering the time requirement of the computing tasks and the performance of the mobile edge server. In [35], the authors propose a device-to-device (D2D)-enabled multi-helper MEC system, in which a local user offloads its tasks to multiple helpers for cooperative computation. The model tries to minimize the latency by optimizing the local user's task assignment jointly with the time and rate for task offloading and results downloading, as well as the computation frequency for task execution.
The dynamicity of the environment also imposes requirements in the tasks offloading problem. For instance, to reduce energy while guaranteeing delay constraints for mobile applications, the authors of [38] propose an access control management architecture for a 5G heterogeneous network. Two algorithms are considered, i.e., an optimal static algorithm based on dynamic programming to get the exact solution and a two-stage online algorithm to adaptively obtain the current optimal solution in real time. In the majority of the relevant research efforts, the rarely changing network is treated as a stable environment, thus, 'static' algorithms are adopted e.g., integer linear programming approach [6], dynamic programming [34] and so on and so forth. Enhancements can increase the performance being adapted to the variations of the environment. For instance, a dynamic programming solution with randomization is presented in [26]. Hence, we are able to get an approximate solution and early formulate a time constrained offloading policy.
In [22], the authors propose the cooperation of Cloud computing and MEC in IoT. The offloading problem is solved through a branch and bound algorithm, a Mixed Integer Linear Programming (MILP) scheme and an Iterative Heuristic MEC Resource Allocation (IHRA) algorithm to make the offloading decision dynamically. The authors of [16] consider an estimator for predicting the total processing duration of each task on each candidate node using linear regression. Another estimator is proposed in [20]. It is responsible to predict the round trip time (RTT) based on the network's characteristics. Then, the estimated RTT is 'bounded' with other parameters (e.g., energy consumption) to decide when and where to offload tasks.
Tasks offloading is studied with the presence of Software Defined Networking (SDN) and virtualized resources [21]. The optimality of the decision is related to the local or remote task computation, the selection of the appropriate node and the selection of the appropriate path for the offloading. In [19], the authors study the flexible compute-intensive task offloading to a local cloud trying to optimize energy consumption, operation speed, and cost. In [1], a model based on the Optimal Stopping Theory is adopted to deliver the appropriate time to offload data and tasks to an edge server. The challenge is to to determine the best offloading strategy that minimizes the expected total delay. Finally, in [5], the authors consider unmanned vehicles (i.e., Unmanned Aerial Vehicles -UAVs) and propose a framework enabling optimal offloading decisions as a function of network and computation load parameters and current state. The optimization is formulated as an optimal stopping time problem over a Markov process.

III. PRELIMINARIES & PROBLEM FORMULATION
We consider an EC scenario where a set of N nodes, N = {n 1 , n 2 , . . . , n N }, are available. EC nodes are 'connected' with a number of IoT devices being responsible to collect and store data while performing the requested tasks. Nodes are also connected with the Cloud to transfer data for 'long-term' processing. They act between the IoT and Cloud infrastructures being capable of hosting and executing various tasks for limiting the latency that end users enjoy. Locally, at every node, a dataset is formulated over the data reported by IoT devices. These data become the subject of various processing activities that may requested by end users or applications. Due to the limited computational resources of EC nodes (compared to the Cloud infrastructure), only a part of the collected data should be locally stored. The remaining data are transferred to the Cloud for further processing. We have to notice that the study of the methodology adopted to select the data that will be locally stored is beyond the scope of this paper. Furthermore, EC nodes are able to execute a set of tasks. Tasks may have the form of queries over the available data, the calculation of statistical metrics or the execution of various processing activities like the delivery of a local ML model. In any case, one can define before hand the categories of tasks that can be executed in every EC node. The execution of tasks aims at generating knowledge locally, thus, to make EC nodes capable of efficiently reacting in users' requests. Without loss of generality, we consider that nodes may support the same number of tasks, i.e., E. At a time instance t, a node may have to execute a subset of the predefined tasks. Tasks are placed in a queue and wait for their execution. The throughput of each node depends on its computational capabilities and affects the size of the queue. In this effort, we consider that the corresponding queue can host as many tasks as we want without any limit. We have to notice that a task may be requested by multiple users/applications, thus, every node should execute it repeatedly in no consecutive time instances. We also consider that tasks exhibit specific characteristics like their complexity (the steps and resources required to be spent for their execution), priority (depending on the critically of the application asking the execution of the task) or their sub-tasks (if the task is separated based on an appropriate algorithm). These characteristics may be adopted to build more complex tasks management mechanisms applying a strategical decision making. For instance, high priority tasks may be executed first, however, securing that starvation effects are eliminated. We have to notice that the study of these research issues is beyond the scope of this work.
Tasks demand is realized by the number of users/devices asking for their execution. Requests are delivered to EC nodes through specific interfaces and affect the demand. For simplicity, we consider that the demand for a task is realized by the number of users asking for its execution in a specific node at a specific time instance (i.e., at t). In addition, users (IoT devices) may move while requesting for services/applications, thus, their mobility affects tasks demand in 'neighbour' EC nodes. Every node maintains a vector, i.e., the Tasks Demand Vector (TDV), T DV = {e t 1 , e t 2 , . . . , e t M } which depicts the demand for each task at time instance t. EC nodes at specific epochs, i.e., t = 1, 2, . . ., update the corresponding TDV as users are moving in an area. EC nodes should decide which tasks will be locally executed or offloaded to another peer node. The aim is to keep the execution locally for popular tasks eliminating the time required for their conclusion. No popular tasks can be offloaded to other nodes. In addition, when executing popular tasks, EC nodes may adopt techniques like incremental models or caching to facilitate their execution. By offloading non popular tasks, nodes may save resources as they are not benefited from re-using previous outcomes. For instance, consider the case of a task waiting for execution in the queue. At t, the hosting EC node updates the TDV and sees that there is limited demand for this task. Hence, it may decide to offload the task to another node that may have increased demand for it (incremental models and caching may be adopted to deliver the final result) paying the communication cost (for sending the task and getting the response) and the time for waiting the final outcome. In this paper, we focus on the study on how we can decide which tasks will be kept locally to be executed based on the TDVs. The important is that our model takes into consideration not only the demand for tasks locally at an EC node but also in its peers concluding a complete georeferenced tasks management scheme. The study on the decision on where (peer selection) we can offload a task is available in [17]. For this decision, the data present at peers, the load, etc can be adopted to secure the efficient execution of the task.

IV. GEOREFERENCED TASKS DEMAND MANAGEMENT A. Tasks Demand Indicator
EC nodes, at predefined intervals, exchange their TDVs to spread the demand information for the available tasks. The incoming TDVs could exhibit different information, e.g., the ith task may be requested at n j but not at n k . In our work, we are interested in the 'locality' of the demand, i.e., the demand in neighbour nodes. The rationale is that mobile users will not be capable of performing distant hand overs in consecutive time instances. Hence, EC nodes keep the TDVs only for peers being in a distance ρ. The limitation of the approach (for local demand modelling) is that nodes should monitor a high number of users/devices to be able to calculate the local demand for the available tasks. This could lead to a complicated processing and increase the complexity of nodes' 'reasoning' when the number of users is very high. However, a solution to alleviate the complexity of the required processing could be the grouping of users in the range of each node as proposed in [2].
Let TDVs be {T DV . This way, they can have a view on the 'trends' of tasks demand at each peer. Our aim is to define a decision making mechanism that at each epoch t will result the tasks that will be kept locally while the remaining will be offloaded in peer nodes. For this, we define a function f () being responsible to deliver a ranked list of the tasks waiting for execution in the corresponding queue. f () gets as input the local and the incoming TDVs and delivers the ranked {e i }.
Let us focus on a specific EC node n j . n j applies a monitoring scheme for updating the local TDV and receives TDVs from its peers. It tries to estimate the demand for each task locally and in peers. When receiving the incoming TDVs, n j detects the common tasks for which it should estimate the demand. n j concludes the Local Demand Indicator (LDI) and the Group Demand Indicator (GDI). LDI and GDI are metrics that will affect the final ranking as delivered by f (). Formally, LDI and GDI are defined as the number of users requesting a specific task, i.e., LDI i = e nj i & GDI i = e n k i , ∀k, k = j. We adopt a simple scheme and 'connect' LDI and GDI with the probability of having the demand for a task over a pre-defined threshold T . The LDI is based on the local observations while the GDI is concluded over D nodes.
As mobility patterns are unknown and we are not aware of the distribution of the demand in each node, n j applies the widely known Kernel Density Estimator (KDE) [31] to derive the demand distribution. Our intention, when applying a statistical learning process (i.e., the KDE), is to detect the hidden statistics of the mobility patterns as exposed by the demand for each task. The KDE can be adopted to deliver the probability density function (pdf) of the unknown distribution of the demand for a task d ∈ T DV i . The statistical learning process is applied on top of d 1 , d 2 , . . . , d W which represent the historical demand values. We adopt an incremental estimation of g(d i ) to derive the hidden statistics of the unknown distribution. The estimation of the expected value E[d] = R dg(d)dd gives an insight of current demand observations. E[d] is estimated through the adoption of an approximation applied over a set of measurements and, also, over g(d)'s approximation [4]. If we consider d [1], d [2], . . . , d[W ], as the demand values, our problem is to estimate g(d) on-thefly. This requires the estimation of E[d] in limited time. We define the cumulative KDE through the following equation: . h > 0 represents the bandwidth of the adopted Kernel function K(·) that is is symmetric and integrates to unity. For K(·), we adopt the Gaussian kernel, (K(z) = 1 √ 2π exp (− 1 2 z 2 )). Additionally,ĝ(d; k) is incrementally estimated through its previous estimationĝ(d; k − 1) and the current distance h |, we take through calculations that,ĝ . LDI is concluded over the local observations for each task, i.e., LDI ei . Based on the KDE, we get a single probability, i.e., LDI ei = P (d ei > T ) where d ei depicts the random variable depicting the demand for task e i .
GDI is calculated for all peers, i.e., we consider D GDI realizations (D realizations of the above described statistical learning process), i.e., p i = GDI nj ei = P (d nj ei > T ). In this case, we face the problem of combining multiple probabilities reported by different sources. For combining them, we adopt the geometric mean [8], i.e., a geometric opinion pool; this metric does not increase by orders of magnitude affected by a single data point and performs better with small samples. The geometric mean combines our values with a product instead of a sum and sees each data point as a scaling factor. Actually, this is the strong assumption behind the use of the geometric mean, i.e., data can be interpreted as scaling factors. The following equation stands true: where w k are weights usually taken as w k = 1 D . In our case, weights are affected by p k , i.e., w k = p k p k . This means that the node exhibiting the highest probability of exceeding affects more the corresponding weight. This strategy makes us to be more 'sensitive' in scenarios where there is an increased probability of facing a high demand for a task. As explained, in these cases, we try to host popular tasks to specific nodes (at nodes where the increased demand is observed), thus, to gain benefits from their 'repetitive' execution. We have to notice that the adoption of the specific strategy for weights definition is not contradictory with the use of the geometric mean as we target to smoothly 'aggregate' all the available probabilities considering them as scaling factors. In general, the presence of a few extremely low or high values has no considerable effect on the geometric mean, thus, we can easily incorporate into the envisioned processing the desired focus on the probabilities that exhibit a high weight without resulting extreme outcomes.

B. Our Uncertainty Driven Decision Making Model
For each task, as described above, we calculate two probabilities of having the demand over the threshold, i.e., the LDI ei and the GDI ei . Both of them depict EC nodes' local knowledge about the estimation of the demand of a task. As it is difficult to be aware and define specific thresholds for both metrics to support efficient decision making and aiming at the management of the ambient uncertainty, we adopt an FLC to deliver a value over which the final decision is made. In FL systems, the objects of discourse are associated with information which is, or is allowed to be, incomplete, partially true or partially possible. FL deals with incomplete information and provides knowledge representation models (i.e., Fuzzy Set Theory) through which an entity can automatically take decisions. FL principles express human expert knowledge and enable the automated interpretation of the results. The local execution of a task or the offloading is based on our FLC that is a non-linear mapping between l inputs u i ∈ U i, i = 1, . . . , l and m outputs y i ∈ Y i , i = 1, . . . , m. In this paper, we adopt two inputs, i.e., LDI ei , GDI ei and a single output, i.e., the Task Offloading Indicator (TOI) T OI ej . The knowledge base of our FLC consists of a set of rules defined in the following form: R j : IF u 1j is A 1j AND/OR u 2j is A 2j AND/OR . . . AND/OR u lj is A lj THEN y 1j is B 1j AND . . . AND y mj is B mj , where R j is the jth fuzzy rule, u ij (i = 1, . . . , l) are the inputs of the jth rule, y kj (k = 1, . . . , m) are the outputs and A ij , B kj are membership functions usually associated by linguistic terms. Without loss of generality, we assume that inputs and output are in the unity interval. When LDI ei → 1 means that there is an increased demand for the task e i while LDI ei → 0 depicts the case where a limited number of users express interest for the specific task. GDI ei → 1 depicts an increased demand for the ith task as exposed by peer nodes (the opposite stands for GDI ei → 0). Concerning the output T OI ei , a value close to zero depicts a 'keep locally' decision in contrast when a value close to unity is met. For inputs and the output, we consider three linguistic values: Low, Medium, High. A Low value represents that the fuzzy variable takes values close to the lower limit while a High value depicts the case where the variable takes values close to the upper level. In addition, we consider triangular membership functions as they are widely adopted in the literature. The proposed FLC receives values for the two inputs, it fuzzifies them and, accordingly, proceeds with the inference process. The inference process involves a set of fuzzy rules that result the best possible value for the output T OI ej . These rules are defined by experts and incorporate a human view on the described decision process. In Table I, we present the adopted FL rule base. The final step is the de-fuzzification process to derive the final T OI ej . n j produces a sorted list of T OI ej s and the 'lastk' tasks are offloaded to peer nodes as described in [17].

V. EXPERIMENTAL EVALUATION A. Performance Indicators & Setup
We report on the performance of our model concerning its ability of making correct decisions when deciding the execution of an incoming task. We also focus on the time requirements to perform the final allocation in order to reveal if our model is capable of deciding in real time, thus, supporting time critical applications. We evaluate our scheme through an extensive set of simulations involving a high number of tasks. We consider that such tasks are 'generated' in various nodes into our network. To simulate users' activity, we use the dataset provide by [39]. This dataset describes real-world QoS evaluation results from 142 users on 4500 Web services over 64 different time slices.
The performance of the proposed mechanism is evaluated by a set of metrics. We adopt metrics in the following axes: (i) the number of correct decisions ∆. To measure the number of correct decisions, we assume a loss function λ (C, R s ) that measures the cost of executing a task s locally and the cost of offloading a task to another peer node. The binary variable C is equal to unity when the task is executed locally otherwise is equal to zero. Three different metrics are adopted as elements to set the final value of R s . The initiation time (IT s ), i.e., task's execution starting time, the response time (RT s ), i.e., the time spent to deliver the result of task t from a node to a specific user and the demand indicator When a user requests a task s from a specific node, the cumulative cost is calculated for both C = 1 and C = 0 as imposed by Eq(4). A decision is considered as correct when one of the equations Eq(5), Eq(6) holds true. For instance, Eq (6) indicates that a decision is correct when the overall cost of executing a task locally is higher than offloading a task to another peer node and at the same time the FLC decides that the node should offload the task.
Cost s (C = 1) > cost s (C = 0)&& FLC → offloading action (6) (ii) the average time τ required to take a decision. τ is measured for every task as the time spent (CPU time) by the system deciding if a task should be offloaded or not. For this reason, τ is calculated as the sum of (a) the time spent to estimate KDE and (b) the time spent for FLC to produce the final TOI. We perform a set of experiments for different N , W , E and T . The number of EC nodes is set to N ∈ {50, 100, 500, 1000}. We adopt W ∈ {10%, 50%, 100%}, i.e., different sliding window sizes to measure the effect on ∆ and τ . The total number of tasks requested by the users is set to E ∈ {5000, 10000, 50000, 100000}. The probability of having the demand for a task over a pre-defined threshold is set to T ∈ {0.5, 0.7}. In total, we conduct 100 iterations for each experiment and report our results for the aforementioned metrics. Experiments where conducted on a Linux server with two 6-core Intel Xeon E5-2630 CPUs running at 2.3GHz.

B. Performance Assessment
Initially, we evaluate of our model in terms of ∆. The number of tasks increases from a baseline value equal to 5000 up to 2x, 10x and 20x. Having as a base the realistic dataset presented in [39], we extend it and create additional datasets to experiment with different number of tasks and nodes. In Fig. 1, we plot the average number of correct decisions ∆ for various combinations of and W . In this set of experiments, we assume that our model offloads the top k = 10% of the incoming tasks. As the number of tasks increases, the same stands for ∆ as well. When we focus on an extreme value for the number of tasks, i.e., 100000, the number of correct decisions is close to 90% in all the experimental scenarios. This is significant for our model as it is capable of correctly allocating the requested tasks, thus, it increases the performance of nodes. It is worth mentioning that a small performance degradation is observed as the sliding window size increases. This stems from the fact that the solidity of the data located in a node is affected by the time. The demand of a task may significantly vary in different time units.  Fig. 2 & Fig. 3 plot the average number of correct decisions for different values of the threshold T . It should be noted for T = 0.7, the average ∆ ranges from 90% to 99% which is very close to the maximum possible outcome. As demonstrated in both figures, our model produces a low number of correct decisions as the number of nodes increases. This performance degradation is explained due to the high number of peer nodes available to be selected by our model. Comparing the results for the T values, we can observe that when T = 0.7, we have a considerable higher number of correct decisions up to 20%. The reason behind this is that a low number of tasks are offloaded being kept for execution locally. Comparing the results from above described figures, we observe that a threshold close to T = 0.7 archives the best performance instead of using a threshold close to T = 0.5. Additionally, it is preferred to offload the top k = 10% tasks than to keep them locally. This is reasonable since a small threshold indicates that the majority of tasks should be offloaded. In Fig. 4, we present our evaluation results related to τ . Recall that τ depicts the time required by our model to deliver the final decision. We observe that our scheme is efficient managing to derive the final decision in short time, i.e., below 0.18 ms in the worst case. This leads to a throughput of the management of (approx.) 5500 tasks per second. If we focus on the average case, the throughput increases. The reason is that the mean required time is around 0.05 ms. The mean time is similar for scenarios where N increases form 50 to 1000. However, we observe a significant difference in the statistical deviation of the realized time values. In any case, the proposed approach is characterized by scalability as the increased number of tasks does not add a high amount of time to conclude the desired processing. Hence, the proposed model can be adopted to respond in real time to the requests for the execution of tasks at the edge infrastructure.
We compare the performance of our model with the scheme presented in [3] where the authors propose a task scheduling algorithm (ETSI) that is based on a heuristic. This heuristic delivers the final outcome based on the remaining energy, the distance from the edge of the network and the number of neighbours calculating the rank of each node. The node with the lowest ranking is selected for the final allocation. Fig. 5 presents our comparison results for ∆. We observe that our model clearly outperforms ETSI no matter the experimental scenario we adopt. ETSI manages to result a limited number of correct decisions related to the offloading of tasks. The highest realization of ∆ is 45% (approximately) with the mean and median be around 25%. The lowest value for ∆ in our evaluation scenarios is around 80%. In this paper, we tackle the problem of task allocation/offloading in the presence of a heterogeneous IoT environment. IoT devices are connected with EC reporting the collected data for further processing. Over these data hosted at the EC nodes, multiple users can request the execution of tasks. The demand for each task may be altered over time affected not only by the desires of end users but also by their mobility. For this reason, we propose a georeferenced task management scheme that decides when a task should be offloaded or not. This scheme incorporates a FLC that delivers the realization of an indicator over which the final decision is made. The discussed indicator shows the efficiency of the allocation either decided to be locally or offloaded to peer nodes. Through simulations and using a real dataset, it is concluded that our scheme can achieve a high amount of correct decisions (up to 98%) while it is efficient to derive the final solution in short term. In the first places of our future agenda is to conduct our experiments in a real world IoT environment and to apply Optimal Stopping Theory to identify the appropriate time to offload a task. Furthermore, we will enhance our model with a scheduling component in order to minimize tasks execution time, maximize throughput and satisfy QoS constraints defined by end users.