## 1 Introduction
General Packet Radio Service (GPRS) [13, 14] allows users to send and receive data at end-to-end packettransfer mode, without requiring the use of circuit-switched mode network resources, thus providing an efficient, low-cost wireless packet data services. Especially suitable for intermittent, sudden and frequent, small amounts of data transmission, but also for the occasional large amount of data transmission. The theoretical bandwidth of GPRS is up to 171.2 Kbit/s, and the practical bandwidth is about 40-100 Kbit/s, GPRS provides TCP/IP connection, can be used for Internet access, data transmission and other applications. Machine-to-machine (M2M) [15,16] communications is a new concept, wherein effective application devices and problem-solving solutions for the communication of humans, mobile devices, or machines with machines are developed to achieve remote monitoring. For example, for data transfer from M2M, data that are distributed over many places can be collected through a data collection terminal and then delivered through a wireless transfer. The data control center terminal is configured with a dedicated module to unify the data collection and process the data. Then, using wireless transfer, control commands are sent to each data terminal. The M2M technique does not require manual intervention and can automatically upload data, improving the efficiency of information processing. Using Web technology, the Web of Things (WoT) [17,18] implements the abstraction, the integration, and the availability of all types of resources, such as data and applications, located at various sensor nodes in the web environment. Web-based access to resources and services is provided through the WoT. Representational State Transfer (REST) [19,20] is a series of guidelines to meet the Web standards presented in a distributed architecture software style. The RESTful M2M gateway provides the data driver and implements the Uniform Resource Identifier (URI) specification design for all the resources on the server. The external data service is provided with the REST interface, remote access and user control of the M2M gateway server, including the mapping relationship between the user access query and the M2M gateway server. The data exchange between the M2M gateway server system and the sensor or wireless sensor networks includes the acquisition and control of the data in the sensor. In this paper, we present a RESTful M2M gateway for wireless remote monitoring of a district central heating network. The RESTful M2M gateway can monitor and control the physical sensor devices deployed in the heating exchange stations and boiler rooms. The innovation and contributions of this study are as follows:  
1. Propose a resource-oriented architecture for the RESTful M2M gateway. From the perspective of the structure, the RESTful M2M gateway is divided into three layers, _i.e._, the device resource abstraction layer, resource management and control layer, and open service interface layer. 2. Propose a uniform devices abstraction framework, which adopts the OSGi technology to create a uniform protocols management framework with the Dependence Inversion Principle to access the different physical devices. 3. Propose and implement the resource address mapping mechanism between RESTful resources and the physical sensor devices, also present the buffer queue combined with polling to implement the data traffic congestion and scheduling algorithm. 4. Design the RESTful M2M gateway open service API access interface, and define the API set for remote wireless monitoring and control for district central heating network. The rest of the paper is organized as follows: Section 2, describes the RESTful M2M gateway architecture. In Section 3, we describe the experiments and performance measurements. The conclusions and future work are given in Section 4.