# Mobility-Enabled Edge Server Selection for Multi-User Composite Services
## 3 System Model
### Prerequisite Definitions  
The basic concepts including the definitions of the mobile service, the edge server, the mobile path, and the user's moving are formally introduced. **Definition 1** (Mobile service): _A mobile service is represented by a four-tuple \((I,O,C,QoS)\), where:_  
1. _I is the input parameters;_
2. \(O\) _is the output parameters;_
3. \(C\) _represents the resources required by the service, which is an_ \(n\)_-tuple_ \(<c_{1},c_{2},\cdots,c_{n}>\)_, where each_ \(c_{i}\) _is the resource type, including CPU, RAM, VRAM, etc. ;_
4. \(QoS\) _is an_ \(n\)_-tuple_ \(<q_{1},q_{2},\cdots,q_{n}>\)_, where each_ \(q_{i}\) _denotes a QoS property of a service, including execution cost, response time, throughput, reputation, etc._  
In this paper, we only consider one QoS property (i.e., response time). This is because the response time of the service is a part of the total waiting time. Users' mobility only affects the variation of the data transmission bandwidth between users and different edge servers, which will affect the data transmission time. The reason is that due to edge server's limited coverage, if the mobile user leaves the one edge server's coverage and goes into another edge server's coverage, the mobile user must connect to the new edge server to get sources. The data transmission rate between the mobile user and the new edge server may be different from the data transmission rate between the mobile user and the source edge server. The upload data size and download data size can be obtained from \(I\) and \(O\), respectively. **Definition 2** (Edge server): _An edge server is represented by a four-tuple \(((x,y),radius,C,r)\), where:_  
1. \((x,y)\) _is the longitude and latitude of the edge server;_
2. \(radius\) _is coverage radius of the edge server;_  
Figure 3: The examples of multi-user edge server selection with service composition in MEC. _C represents the capacity of an edge server and is an n-tuple \(<c_{1},c_{2},c_{i},\cdots,c_{n}>\), where each \(c_{i}\) is the resource type of an edge server, including CPU, RAM, VRAM, etc. ;_
4. \(r\) _is the average data transmission rate between the user and the edge server._  
Edge servers are deployed in a distributed fashion (usually near a cellular base station), and because each edge server only covers a specific geographical area, the proximity constraint should be considered. Only the users located within the coverage of an edge server can connect to the edge server [7]. Meanwhile, each edge server has a limited computing capacity [17] denoted as \(C\). Therefore, the aggregate workload generated by services on a server must not exceed the remaining capacity of that server. At the same time, we assume that the remote cloud servers have sufficient computing resources and the user can connect to them anytime from anywhere [18]. **Definition 3** (Mobile path). : _The mobile path is modeled as a triple \((P,Se,F)\), where:_  
1. \(P=\{p_{i}\}_{i=1}^{i=n}\) _is the set of discrete location points (the mobile path is composed of lines between two adjacent points);_
2. \(Se=\{se_{i}\}_{i=1}^{i=m}\) _is a set of discrete path segments of the mobile path (the mobile path is composed of all path segments);_
3. \(F\) _is a mapping function between the set of location points and path segments:_ \(F(p_{k},p_{k+1},\cdots,p_{k+\tau})\to se_{i}\)__  
To avoid blank areas, the coverages of adjacent edge servers usually partially overlap. Therefore, we divide the mobile path into many segments, and each segment \(se_{i}\) is covered by the same edge servers. According to function \(F\), the adjacent points covered by the same edge servers are chosen as a set; thereby, all the lines between two adjacent points are connected to form a segment. In the process of edge server selection, when the user is in a path segment, the corresponding candidate edge servers can be selected. **Definition 4** (User's moving). : _The process of user's moving can be denoted by a tuple \((Sp,T,L,G)\), where:_  
1.