  To alleviate the burdens on the fronthaul and reduce the transmit latency,
the device-to-device (D2D) communication is presented in cloud radio access
networks (C-RANs). Considering dynamic traffic arrivals and time-varying
channel conditions, the resource allocation in C-RANs with D2D is formulated
into a stochastic optimization problem, which is aimed at maximizing the
overall throughput subject to network stability, interference, and fronthaul
capacity constraints. Leveraging on the Lyapunov optimization technique, the
stochastic optimization problem is transformed into a delay-aware optimization
problem, which is a mixed-integer nonlinear programming problem and can be
decomposed into three subproblems: mode selection, uplink beamforming design,
and power control. An optimization solution that consists of a modified branch
and bound method as well as a weighted minimum mean square error approach has
been developed to obtain the close-to-optimal solution. Simulation results
validate that the D2D can improve throughput, decrease latency, and alleviate
the burdens of the constrained fronthaul in C-RANs. Furthermore, an average
throughput-delay tradeoff can be achieved by the proposed solution.
