I Introduction
The past few years have witnessed significant growth in the use of distributed network analytics involving agile code, data and computational resources. In many such networked systems, for example, Internet of Things [5], a large number of computational and storage resources are widely distributed in the physical world. These resources are accessed by various end users/applications that are also distributed over the physical space. Assigning users or applications to resources efficiently is key to the sustained highperformance operation of the system.
In some systems, requests are transferred over a network to a server that provides a needed resource. In other systems, servers are mobile and physically move to the user making a request. Examples of the former type of service include accessing storage resources over a wireless network to store files and requesting computational resources to run image processing tasks; whereas an example of the latter type of service is the arrival of ridesharing vehicles to the user’s location over a road transportation network.
Not surprisingly, the spatial distribution of resources and users^{1}^{1}1We use the terms “users” and “requesters” interchangeably and same holds true for the terms “resources” and “servers”. in the network is an important factor in determining the overall performance of the service. A key measure of performance is average request distance, that is average distance between a user and its allocated resource/server (where distance is measured on the network). This directly translates to latency incurred by a user when accessing the service, which is arguably among the most important criteria in distributed service applications. For example, in wireless networks, signal attenuation is strongly coupled to request distance, therefore developing allocation policies to minimize request distance can help reduce energy consumption, an important concern in batteryoperated wireless networks. Another important practical constraint in distributed service networks is service capacity. For example, in network analytics applications, a networked storage device can only support a finite number of concurrent users; similarly, a computational resource can only support a finite number of concurrent processing tasks. Likewise, in physical service applications like ridesharing, a vehicle can pick up a finite number of passengers at once.
Therefore, a primary problem in such distributed service networks is to efficiently assign each user to a suitable resource so as to minimize average request distance and ensure no resource serves more users than its capacity. If the entire system is being managed by a single administrative entity such as a ride sharing service, or a datacenter network where analytics tasks are being assigned to available CPUs, there are economic benefits in minimizing the average request distance across all (user, resource) pairs, which is tantamount to minimizing the average delay in the system.
The general version of this capacitated assignment problem can be solved by modeling it as a minimum cost flow problem on graphs [4] and running the network simplex algorithm [17]. However, if the network has a lowdimensional structure and some assumptions about the spatial distributions of users and resources hold, more efficient methods can be developed.
In this paper, we consider two onedimensional network scenarios that motivate the study of this special case of the usertoresource assignment problem.
The first scenario is ridehailing on a oneway street where vehicles move right to left. If the vehicles of a ridesharing company are distributed along the street at a certain time, and users equipped with smartphone ridehailing apps request service, the system attempts to assign vehicles with spare capacity located towards the right of the users so as to minimize average “pick up” distance. Abadi et al. [1] introduced this problem and presented a policy known as Unidirectional GaleShapley^{2}^{2}2We rename queue matching defined in [1] as Unidirectional GaleShapley Matching to avoid overloading the term queue. matching (UGS) minimize average pick up distance. In this policy, all users concurrently emit rays of light toward their right and each user is matched with the vehicle that first receives the emitted ray. While the wellknown GaleShapley matching algorithm [8] matches userresource pairs that are mutually nearest to each other, its unidirectional variant, UGS, matches a user to the nearest resource on its right. Note that, this onedimensional network setting also applies to vehicular wireless adhoc networks on a onelane roadway [11, 15]^{3}^{3}3Furthermore, [11]
confirms that vehicle location distribution on the streets in Central London can be closely approximated by a Poisson distribution.
, where users are in vehicles and servers are attached to fixed infrastructure such as lamp posts. Users attempt to allocate their computation tasks over the wireless network to servers located to their right so that they can retrieve the results with little effort while driving by.In this paper, we propose another policy “Move to Right” policy (or MTR) which has the same “expected distance traveled by a request” (request distance
) as UGS but has a lower variance.
MTR sequentially allocates users to the geographically nearest available vehicle located to his/her right. When user and resource locations are modeled by statistical point processes the onedimensional unidirectional space behaves similar to time and notions from queueing theory can be applied. In particular, when user and vehicle locations are modeled by independent Poisson processes, average request distance can be characterized in closed form by considering interuser and interserver distances as parameters of a bulk service M/M/1 queue where the bulk service capacity denotes the maximum number of users that can be handled by a server. We equate request distance in the spatial system to the expected sojourn time in the corresponding queuing model^{4}^{4}4Sojourn time is the sum of waiting and service times in a queue.. This natural mapping allows us to use wellknown results from queueing theory and in some cases to propose new queueing theoretic models to characterize request distances for a number of interesting situations beyond M/M/1 queues.The second scenario involves a convoy of vehicles traveling on a onedimensional space, for example, trucks on a highway or boats on a river. Some vehicles have expensive camera sensors (image/video) but have inadequate computational storage or processing power. On the other hand, cheap storage and processing is easily available on several other vehicles. The cameras periodically take photos/videos as they move through space and want them processed / stored. In such case, bidirectional assignment schemes are more suitable. Since no directionality restrictions are imposed on the allocation algorithms, computing the optimal assignment is not as simple as in the unidirectional case.
We explore the special structure of the onedimensional topology to develop an optimal algorithm that assigns a set of requesters to a set of resources such that the total assignment cost is minimized. This problem has been recently solved for [7]. However, we are interested in the case when . We propose a dynamic Programming based algorithm which solves this case with time complexity . Note that other assignment algorithms in literature such as the Hungarian primaldual algorithm and Agarwal’s variant [3] have time complexities and respectively and assume for general and Euclidean distance measures.
Our contributions are summarized below:

Analysis of simple unidirectional allocation policies MTR and UGS yielding closed form expressions for mean request distance.

When interrequester and interresource distances are exponentially distributed, we model unidirectional policies as a bulk service M/M/1 queue.

When interrequester distances are generally distributed but the interresource distances are exponentially distributed, we model the situation using an accessible batch service G/M/1 queue.

When interrequester distances are exponentially distributed but interresource distances are generally distributed, we model the spatial system as an accessible batch service M/G/1 queue with the first batch having exceptional service time. To the best of our knowledge this system has not been studied previously in the queueing theory literature.

We include several generalizations of our framework. In the first place we discuss a simulation driven conjecture for evaluating request distance for general distance distributions under heavy traffic. We also investigate the heterogeneous server capacity scenario where server capacity is a random variable and to the best of our knowledge this system has not been studied previously in the queueing theory literature. We derive expressions for expected request distance when servers have infinite capacity.


A novel algorithm for optimal (bidirectional) assignment with time complexity .

A numerical and simulation study of different assignment policies: UGS , MTR, a bidirectional heuristic allocation policy (GaleShapley) and the optimal policy.
The paper is organized as follows. The next section discusses related work. Section III contains technical preliminaries. We show the equivalence of UGS and MTR w.r.t expected request distance in Section IV, and present results associated with the case when servers are Poisson distributed in Section V. In Section VI, we develop formulations for expected request distance when either user or server placements are described by Poisson processes. We include some generalizations of our framework such as analysis under general distance distributions, results for heterogeneous server capacity and uncapacitated allocation in Section VII. The optimal bidirectional allocation strategy is presented in Section VIII. We compare the performance of various local allocation strategies in Section IX. We conclude the paper in Section X.
Ii Related Work
Poisson Matching: Holroyd et al. [12] first studied translation invariant matchings between two dimensional Poisson processes with equal densities. Their primary focus was obtaining upper and lower bounds on expected matching distance for stable matchings. Abadi et al. [1] introduced “Unidirectional GaleShapley” matching (UGS) and derived bounds on the expected matching distance for stable matchings between two onedimensional Poisson processes with different densities. In this paper, we propose another unidirectional allocation policy: “Move To Right” policy (MTR) and provide explicit expressions for the expected matching distance for both MTR and UGS when either requesters or servers are distributed according to a renewal process and the according to a Poisson process.
Exceptional Queueing Systems and Accessible Batches: Welch et al. [20] first studied an M/G/1 queue where a customer arriving when the server is idle has a different service time than the others. Bulk service M/G/1 queues has been studied in [6]. Authors in [9] analyzed a bulk service G/M/1 queue with accessible or nonaccessible batches where an accessible batch is considered to be a batch in service allowing subsequent arrivals, while the service is on. In this work, we model the spatial system using an accessible batch service queue with the first batch having exceptional service time. To the best of our knowledge this system has not been studied previously in queueing theory literature.
Euclidean Bipartite Matching: The optimal userserver assignment problem can be modeled as a minimumweight matching on a weighted bipartite graph where weights on edges are given by the Euclidean distances between the corresponding vertices [16]. Wellknown polynomial time solutions exist for this problem, such as the modified Hungarian algorithm proposed by Agarwal et al. [3] with a running time of , where is the total number of users. In the case of an equal number of users and servers, the optimal userserver assignment on a real line is known [7]. In this paper, we consider the case when there are fewer users than servers.
Iii Technical Preliminaries
Consider a set of users and a set of servers . Each user makes a request that can be satisfied by any server. Assume that each server has capacity corresponding to the maximum number of requests that it can process. Suppose users and servers are located on a line . Formally, let and be the location functions for users and servers, respectively, such that a distance is well defined for all pairs . Initially we assume that all servers have equal capacities i.e. Later in Section VIIB we extend our analysis to a case in which server capacities are integer random variables.
Iiia User and server spatial distributions
Let represent user locations and be the server locations. Let denote the interserver distances and the interuser distances. We assume
to be a renewal process with cumulative distribution function (cdf)
(1) 
We also assume to be a renewal process with cdf , i.e.,
(2) 
We denote and to be the mean and variance associated with . Similarly let and be the mean and variance associated with . We let and assume that . Denote by and the LaplaceStieltjes transform (LST) of and with
In our paper, we consider various interserver and interuser distance distributions, including exponential, deterministic, uniform and hyperexponential.
IiiB Allocation policies
One of our goals is to analyze the performance of various request allocation policies using expected request distance as a performance metric. We define various allocation policies as follows.

Unidirectional GaleShapley (UGS): In UGS, each user simultaneously emits a ray to their right. Once the ray hits an unallocated server , the user is allocated to .

Move To Right (MTR): In MTR, starting from the left, each user is allocated sequentially to the nearest available server to its right.

GaleShapley (GS) [8]: In this matching, each user selects the nearest server and each server selects its nearest user. Remove reciprocating pairs, and continue.

Optimal Matching: This matching minimizes average request distance among all feasible allocation policies.
Iv Unidirectional Allocation Policies
In this Section, we establish the equivalence of UGS and MTR w.r.t number of requests that traverse a point and expected request distance. Define and to be random variables for the number of requests that traverse point and distance between user and its allocated server under policy , respectively. Thus and denote the number of requests that traverse point under UGS and MTR, respectively, as shown in Figure 1. Consider the following definition of busy cycle in a service network.
Definition 1.
A busy cycle for a policy P is an interval such that with for which and for and with being an infinitesimal positive value.
We have the following theorem.
Theorem 1.
Proof.
Due to the unidirectional nature of matching, both UGS and MTR have the same set of busy cycles. Denote as the set of all busy cycles in the service network. In the case when we already have Let us now consider a busy cycle under UGS policy. Let Let and Similarly define and for MTR policy. Clearly As both policies have the same set of busy cycles we have and Thus we get
(3) 
∎
Corollary 1.
i.e. the expected request distances are the same for both UGS and MTR under steady state.
Proof.
Under steady state both and converge to a random variable. Applying Little’s law we have ∎
Remark 1.
Note that Theorem 1 applies to any interserver or interuser distance distribution. It also applies to the case where servers have capacity
Remark 2.
Although MTR and UGS are equivalent w.r.t. the expected request distance, MTR tends to be fairer, i.e., has low variance^{5}^{5}5It is well known in queueing theory that among all service disciplines the variance of the waiting time is minimized under FCFS policy [13]. In Section V we show that MTR maps to a temporal FCFS queue. for expected request distance.
V Unidirectional Poisson Matching
Distribution  Parameters  

Exponential  : rate  
Uniform  maximum value  
Deterministic  constant  
Hyper  : order  
exponential 
phase probability 

phase rate 
In this section, we characterize request distance statistics under unidirectional policies when both users and servers are distributed according to two independent Poisson processes. We first analyze MTR as follows.
Va Mtr
Under this allocation policy, the service network can be modeled as a bulk service M/M/1 queue. A bulk service M/M/1 queue provides service to a group of or fewer customers. The server serves a bulk of at most customers whenever it becomes free. Also customers can join an existing service if there is room which is an example of accessible batch. In Section VI we describe the notion of accessible batches in greater detail. The service time for the group is exponentially distributed and customer arrivals are described by a Poisson process. The distance between two consecutive users in the service network can be thought of as interarrival time between customers in the bulk service M/M/1 queue. The distance between two consecutive servers maps to a bulk service time.
Having established an analogy between the service network and the bulk service M/M/1 queue, we now define the state space for the service network. Consider the definition of as the number of requests^{6}^{6}6We drop the superscript for brevity. that traverse point under MTR. In steady state, converges to a random variable provided . Let denote with .
Following the procedure in [14]
, we obtain the steady state probability vector
In the service network, request distance corresponds to the sojourn time in the bulk service M/M/1 queue. By applying Little’s formula, we obtain the following expression for the expected request distance(4) 
where is the only root in the interval of the following equation (with as the variable)
(5) 
VA1 When server capacity:
VB Ugs
When both users and servers are Poisson distributed and servers have unit capacity, the request distance in UGS has the same distribution as the busy cycle in the corresponding LastComeFirstServed PreemptiveResume (LCFSPR) queue having the density function [1]
(7) 
where and is the modified Bessel function of the first kind. Thus the expected request distance is equivalent to the average busy cycle duration in a LCFSPR queue given by [1].
Vi Unidirectional General Matching
We now derive expressions for the expected request distance when either users or servers are distributed according to a Poisson process and the other by renewal process.
Via Notion of exceptional service and accessible batches
We discuss the notion of exceptional service and accessible batches applicable to our service network as follows. Consider a service network with as shown in Figure 2. Consider a user . Let be the server immediately to the left of We assume all users prior to have already been allocated to servers . MTR allocates both and to and allocates to We denote as a busy cycle of the service network. We have the following queueing theory analogy.
User can be thought of as the first customer in a queueing system that initiates a busy period while sees the system busy when it arrives. Because only is in service at the arrival of , enters service with and the two customers form a batch of size 2. and depart at time . This is an example of an accessible batch [9]. An accessible batch admits subsequent arrivals, while the service is on, until the server capacity is reached.
The service time for the batch, , is described by the random variable which is different or exceptional when compared to service times of successive batches such as the one consisting of . The service time for the second batch is Note that, only depends on and Thus when either or is described by a Poisson process and the other by renewal process, converges to a random variable under steady state conditions. Denote and as the distribution and density functions for the random variable . Thus the service network can be mapped to an exceptional service with accessible batches queueing (ESABQ) model. We formally define ESABQ as follows.
ESABQ: Consider a queueing system where customers are served in batches of maximum size . A customer entering the queue and finding fewer than customers in the system joins the current batch and enters service at once, otherwise it joins a queue. After a batch departs leaving customers in the buffer, customers form a batch and enter service immediately. There are two different service times cdfs, (exceptional batch) with mean and (ordinary batch) with mean . A batch is exceptional if its oldest customer entered an empty system, otherwise it is a regular batch. When the service time expires, all customers in the server depart at once, regardless of the nature of the batch (exceptional or regular).
ViA1 Evaluation of the distribution function:
In this Section, we compute explicit expressions for the distribution function applicable to our service network.
When : In this case, we invoke the memoryless property of the exponential distribution . Thus the exceptional distribution, , is
(8) 
When : Using the memoryless property of , can be computed as
(9) 
where is the distribution of the random variable (also known as difference distribution). can be expressed as
(10) 
where is the Laplace Transform operator on the function and is denoted by
(11)  
(12)  
(13) 
ViB General requests and Poisson distributed servers (GRPS)
From our discussion in Section VIA1, it is clear that when servers are distributed according to a Poisson process, the exceptional service time distribution equals the regular batch service time distribution. In such a case we have the following queueing model.
Under GRPS, interarrival times and batch service times are, respectively, arbitrarily and exponentially distributed. Before initiating a service, a server finds the system in any of the following conditions. (i) and (ii) Here is the number of customers in the waiting buffer. For case (i) the server provides service to all customers and admits subsequent arrivals until is reached. For case (ii) the server takes customers with no admission for subsequent customers arriving within its service time.
In such a case ESABQ can directly be modeled as a special case of a renewal input bulk service queue with accessible and nonaccessible batches proposed in [9] with parameter values and Let and denote random variables for numbers of customers in the system and in the waiting buffer respectively for ESABQ under GRPS. We borrow the following definitions from [9].
(14) 
Using results from [9] we obtain the following expressions for equilibrium queue length probabilities.
(15) 
where is the real root of the equation and is the normalization constant^{7}^{7}7The normalization constant derived in [9] is incorrect. The correct constant for our case is given in (16). given by
(16) 
with . We then derive the expected queue length as
(17) 
Applying Little’s law and considering the analogy between our service network and ESABQ we obtain the following expression for the expected request distance.
(18) 
ViC Poisson distributed requests and general distributed servers (PRGS)
As discussed in Section VIA1, if servers are placed on a d line according to a renewal process with requests being Poisson distributed, the service time distribution for the first batch in a busy period differs from those of subsequent batches. Below we derive expressions for queue length distribution and expected request distance for ESABQ under PRGS.
ViC1 Queue length distribution
We use a supplementary variable technique to derive the queue length distribution for ESABQ under PRGS as follows.
Let be the number of customers at time , the residual service time at time (with if ), and the type of service at time with (resp. ) if exceptional (resp. ordinary) service time.
Let us write the ChapmanKolmorogov equations for the Markov chain
.For , , , define
Also, define for , ,
By analogy with the analysis for the M/G/1 queue we get
so that, by letting ,
(19) 
With further simplification (See Appendix XIB1), for we get
(20) 
where for , . Introduce
Denote by the LST of for . Note that
Multiplying both sides of (20) by , integrating over and summing over all , yields
(21) 
where from (19). We have
(22) 
where with for . Introducing the above into (21) gives
(23) 
where . Since is welldefined for and , the r.h.s. of (23) must vanish when . This gives the relation
with and . Introducing the above in (23) gives
(24) 
Let be the transform of the stationary number of customers in the system. Note that . Letting in (24) gives
(25) 
By noting that (cf. (19)), Eq. (25) can be rewritten as
(26) 
The r.h.s. of (26) contains unknown constants yet to be determined. Define . It can be shown that has zeros inside and one on the unit circle, (See Appendix XIB3). Denote by the distinct zeros of in , with multiplicity , respectively, with . Hence,
Since vanishes when and that , we conclude that has one zero of multiplicity one at .
Without loss of generality assume that and let us now focus on the zeros . When , , the term in (26) must have a zero of multiplicity (at least) since is well defined. This gives linear equations to be satisfied by . In the particular case where all zeros have multiplicity one (see Appendix XIB2), namely , these equations are
(27) 
With (27) is equivalent to
(28) 
since for ( implies that =0 which contradicts that a zero of since ). Eq. (26) can be rewritten as
(29) 
A th equation is provided by the normalizing condition . Since the numerator and denominator in (29) have a zero of order at , differentiating twice the numerator and the denominator w.r.t and letting gives
(30) 
where We consider few special cases of the model in Appendix XIB4 and verify with the expressions of queue length distribution available in the literature.
ViC2 Expected request distance
From (29) the expected queue length is
(31) 
where and
are the second order moments of distributions
and respectively. Again by applying Little’s law and considering the analogy between our service network with ESABQ we get the following expression for the expected request distance.(32) 
Vii Discussion of Unidirectional Allocation Policies
In this section we describe generalizations of models and results for unidirectional allocation policies. We first consider the case when interuser and interserver distances both have general distributions.
Viia Heavy traffic limit for general request and server spatial distributions
Consider the case when the interuser and interserver distances each are described by general distributions. We assume server capacity, . As , we conjecture that the behavior of MTR approaches that of the G/G/1 queue. One argument in favor of our conjecture is the following. As , the busy cycle duration tends to infinity. Consequently, the impact of the exceptional service for the first customer of the busy period on all other customers diminishes to zero as there is an unbounded increasing number of customers served in the busy period.
It is known that in heavy traffic waiting times in a G/G/1 queue are exponential distributed and the mean sojourn time is given by [10]. We expect the expected request distance to exhibit similar behavior. Thus we have the following conjecture.
Conjecture 1.
At heavy traffic i.e. as , the expected request distance for the G/G/1 spatial system with is given by
(33) 
Denote by the average request distance as obtained from simulation. We plot the ratio across various interrequest and interserver distance distributions in Figure 3. It is evident that as the ratio converges to across different interserver distance distributions.
ViiB Heterogeneous server capacities under PRGS
We now proceed to analyze a setting where server capacity is a random variable. Assume server capacity takes values from with distribution , s.t. and We also assume the stability condition where is the average server capacity. Denote as the random variable associated with number of requests that traverse through a point just after a server location^{8}^{8}8An analysis for the distribution of number of requests that traverse through any random location would involve the notions of exceptional service and accessible batches..
ViiB1 Distribution of
Let denote the number of new requests generated during a service period with
According to the law of total probability, it holds that
(34) 
Then the corresponding generating function is denoted by
(35) 
We now consider an embedded Markov chain generated by . Denote the corresponding transition matrix as Then we have
(36) 
where and Let and denote the steady state distribution and its transform respectively. is obtained out by solving
(37) 
Thus we have for
Comments
There are no comments yet.