  A communication network modelled by a directed acyclic graph (DAG) is
considered, over which a source wishes to send a specified number of bits to a
destination node. Each node of the DAG is powered by a separate renewable
energy source, and the harvested energy is used to facilitate the source
destination data flow. The challenge here is to find the optimal rate and power
allocations across time for each node on its outgoing edges so as to minimize
the time by which the destination receives a specified number of bits. An
online setting is considered where an algorithm only has causal information
about the energy arrivals. Using the competitive ratio as the performance
metric, i.e. the ratio of the cost of the online algorithm and the optimal
offline algorithm, maximized over all inputs, a {\it lazy} online algorithm
with a competitive ratio of $2+\delta$ for any $\delta>0$ is proposed.
Incidentally, $2$ is also a lower bound to the competitive ratio of any online
algorithm for this problem. Our lazy online algorithm is described and analyzed
via defining a novel max-flow problem over a DAG, where the rate on the subset
of outgoing edges of any node are related/constrained. An optimal algorithm to
find max-flow with these constraints is also provided, which may be of
independent interest.
