# An Integrated Platform for the Internet of Things Based on an Open Source Ecosystem
## 3 Architecture of the Integrated IoT Application Development Platform  
### The IoT Application Development Platform  
Figure 4 shows the proposed architecture of the integrated IoT application development platform. It includes the following functions.  
1. Heterogeneous devices supporting various sensing devices with different functions, operating systems, transmission protocols, power consumptions, and other characteristics. Current mainstream devices are supported, in order to meet the application requirements. Gateways are used to implement the management of heterogeneous devices. The gateway implements device interconnection, state management, and protocol conversion as well as unified description, storage, forwarding, and basic processing of data. It can also automatically produce the ID of the access device according to the device function, protocol, physical location, etc., for identifying and locating the device.
2. Application layer protocols. Data transmission is achieved by using standard application layer protocols, such as HTTP, CoAP, MQTT, or AMQP, to implement integration among different applications. The publish/subscribe mechanism is also supported to implement loose coupling systems and meet real-time application requirements.
3. Distributed resource management. Compared with traditional software development, IoT application development is based on specific sensing devices. During the development, it is necessary to use the functions and specific features provided by the existing devices. Therefore, it is necessary to provide a common public service or resource discovery mechanism to efficiently  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline  
and accurately find the available resources it needs. P2P (peer-to-peer) is a distributed computing technology that has been widely used in resource sharing and virtual currency trading. This platform utilizes P2P technology to realize the distributed storage and retrieval of IoT resources. IoT applications developed on P2P therefore have good scalability, flexibility, and high availability. However, these details are beyond the scope of this article.
4. API interface and security mechanism. The platform supports Web Service and RESTful style API interfaces. Network layer security mechanisms such as the DTLS and TLS mechanisms for the embedded environment are adopted to implement data encryption and identity authentication. The JWT is used in the application layer to implement secure transmission of compact and self-contained information. The transferred information is signed to ensure data integrity and non-repudiation.
5. Service delivery platform and development environment. The open source system Platform API is used to provide a cross-platform build system, and integrate a continuous development environment and a variety of development library. IoT applications can be developed and deployed through cloud platforms. The cloud platform stores the global information gathered by the sensors distributed in various places. It processes the data to obtain new knowledge by using intelligent technologies, such as data mining, machine learning, semantic web reasoning, and others. The Eclipse Kapua [80] cloud platform was used as a data processing platform for the IoT and combined with Apache Kafka, an open source real-time streaming processing technology.
6. Resource bill, based on blockchain technology, is used to ensure the safe, reliable, and efficient use of sensor resources. Using P2P resource management, blockchain and smart contract technology were combined to achieve resource management for the IoT. For example, when and where the owner of a resource can publish resource, and how the resource will be used and billed, which is a module that will be further studied at a later date.