The task of distribution function is carried out to distribute workload between computing nodes as even as possible. Formally, it may be specified as follows.

Let us denote executable task by *J* and its step by *k*, such as *J* = {*k*_{1}, *k*_{2},…, *k*_{n}}, where all steps are performed by a set of computing nodes *A* = {*a*_{1}, *a*_{2}, *a*_{3},…, *a,*_{n}}. *k* in this case is an uninterrupted process which is performed according to its specification. If step *k*_{n} may be performed by node am, denoted here as a mapping function *k*_{n} → *a*_{m}.

Workload distribution means that mappings between different nodes in *A* should be distributed as even, as possible. Let us use *price* as a derivative of available resources, workload and other parameters, which reflects comparative workload of individual device. As a result, every successful mapping *k*_{i} → *a*_{j}(1 ≤ *i* ≤ *n*, 1 ≤ *j* ≤ *m*) gets computing price *p*_{ijk} assigned by an accepting computing node. Following is the price function:

$$\begin{array}{}{p}_{ijk}=f({\omega}_{k},{p}_{b},{b}_{l})\end{array}$$(1)

Here, *p*_{b} denotes basic resource price, which is set by device owner; *b*_{l} denotes battery load; and *w*_{k} denotes resources availability at the time, when step *k* arrives. *w*_{k} has following descrete values:

$$\begin{array}{}{\omega}_{k}\left\{\begin{array}{}1& \text{device free, can map and reduce}\\ 0.6& \text{device busy, can map and reduce}\\ 0.3& \text{device can map only}\\ 0& \text{otherwise}\end{array}\right.\end{array}$$(2)

Computed price for different mappings may not be the same *p*_{ijk} ≠ _{pik} where *i* ≠ *l* and 1 ≤ *i*, *l* < *m*. If they are equal, the conflict is resolved on the first come first served basis. ((*p*(*ω*_{ijk})), *p*_{ijk}) is return to initiator node, where p_{ijk} is computer price and *p*_{ijk}) is determined as follows:

$$\begin{array}{}\rho {\omega}_{k}=\left\{\begin{array}{}1& {\omega}_{ijk}>0,\text{\hspace{0.17em}want to supply services}\\ 0& \text{otherwise}\end{array}\right.\end{array}$$

Then, issuer returns result of function *φ*(*p*_{ijk}), which determines executor node.

$$\begin{array}{}\phi ({\omega}_{ijk})=\left\{\begin{array}{}1& {\omega}_{ijk}=1,{p}_{ijk}\text{\hspace{0.17em}of\hspace{0.17em}}k\to {a}_{i}\text{\hspace{0.17em}lowest}\\ 0& \text{otherwise}\end{array}\right.\end{array}$$

also, includes client balance *cb* value in order to represent the amount of money user can spend on services.

Using values stated above distribution function is formulated as follows:

$$\begin{array}{}{\displaystyle {}_{p}^{min}\sum _{n=1}^{n}p({\omega}_{ijk})\phi ({p}_{ijk})}\end{array}$$(3)

Subject to:
$$\begin{array}{}{\displaystyle \sum _{n=1}^{n}p({\omega}_{ijk})\phi ({p}_{ijk})\le cb}\end{array}$$(4)
$$\begin{array}{}{\displaystyle \sum _{n=1}^{n}p({\omega}_{ijk})\phi ({p}_{ijk})>0}\end{array}$$(5)

The objective function (2) minimizes overall cost of performing MapReduce job by choosing the lowest price at each step. Constraints ensure that overall solution cost is always lower than client balance (3) and at least one path of job execution exists (4). The objective function is implemented as an aim of every agent to choose cheapest offer available. In its turn, offer is a derivative of unused physical resources of the host device. In such a way it is ensured that next step performer is the one, who has bigger proportion of free resources.

## Comments (0)

General note:By using the comment function on degruyter.com you agree to our Privacy Statement. A respectful treatment of one another is important to us. Therefore we would like to draw your attention to our House Rules.