As increasingly advanced data collection and computing abilities are equipped by devices at the network edge, accompanying the vigorous development of machine learning, edge devices become both the consumer and provider of data. Due to the timeliness of some learning demands and the necessity of learning results, learning resources such as data collection, transmission, and learning should be unified and converged to meet timely learning needs. In this paper, we propose a framework to implement a distributed Learning-as-a-Service function by edge-cloud collaboratively integrating resources required by a learning task. First, the architecture of RALaaS and underlying information interaction are proposed. We then formulate the learning-resource allocation problem and propose a deep reinforcement learning based solution to minimize the required learning resource and achieve better accuracy. More precisely, an A3C algorithm is presented to schedule tasks among smart connected communities and aggregate models. Finally, evaluation results show that our proposed framework can improve the accuracy by 10% compared with conventional algorithms and save about 50% edge resources when 30 nodes participate in the learning task.