Whether it is a business model derived from a business model or a technology development perspective, text tends to view the IoT technology architecture as an extension of the Internet technology architecture. Opposing this concept is the perspective of traditional embedded software development.
To put it simply, the current mainstream Internet technology architecture is the world of big front-end and back-end: the big front end includes Web JavaScript technology, Android and iOS technology, focusing on solving user interaction; the back end includes database, service architecture, operation and maintenance, etc. Focus on solving storage, business logic, security and efficiency. Of course, now the front-end technology is vying to update, such as business logic pre-processing, micro-service architecture, JavaScript full-stack and other new solutions are beginning to blur the difference between the front and the back.
The introduction of the IoT device side makes these technologies somewhat difficult to classify. From the nature of the business, the Internet of Things is another kind of front-end or front-end extension. For example, in the shared bicycle application, the application of the bicycle end is obviously another interaction with people. Business scenarios are also constantly providing data to the back end, but bicycles are not like web pages or apps that are completely solving the visual UI.
Moreover, the current device-side development technology is too different from the front-end technology. Because the development technology of the device-side is still at the bottom, in general, computing resources such as processing power and local storage are very limited, but resources are considered like the back-end. effectiveness.
Well, we have to name one end of the Internet of Things separately, so we call it the device side for the time being.
The core problem of the new back-end is to join the device-oriented access service. In fact, apart from the multimedia real-time channel like video intercom or security monitoring, this access service has basically been turned into MQTT.
The Message Queuing Remote Sensing Transport Protocol is based on the TCP/IP protocol, a publish/subscribe based "lightweight" messaging protocol and is currently the ISO standard (ISO/IEC PRF 20922). It is designed for lightweight and low-bandwidth remote connections, the publish/subscribe messaging mode requires a message broker, and the message broker is responsible for publishing messages to the required endpoint based on the subject of the message.
If there are no more than 100,000 devices to be connected, the cloud host using 8 GB of memory can run Mosquitto. If the device capacity is several hundred thousand, you can consider Mosquitto for cluster load balancing; if the device volume is hundreds of thousands or even hundreds More than 10,000 units, then you need a professional team or dedicated investment to maintain this matter, this details are beyond the scope of this article.
2.2 OTAThe online upgrade of the firmware component is a must. The MQTT file is not reliable. Therefore, the URL with Token is generally passed. The device can download it, HTTP or HTTPS. The business is relatively simple, and there is nothing special about hundreds of thousands of devices.
2.3 Data Storage and ServicesAs the engine of MQTT, Mosquitto needs the backend to be called according to the business logic. Here, the backend logic can be written according to the business requirements. Calling Mosquitto in a variety of backend languages ​​is very simple.
3. Device sideThe device side is the most diverse and evolving place in the Internet of Things. In other fields, back-ends or front-ends, after more than a decade of development, mainstream technologies of every detail have emerged, and there is basically no fragmentation. However, on the device side, fragmentation of development technology is insufficient performance of application development. .
For example, if you choose different chips, you need to use different operating systems, different C library packages, and different IDEs. The compiler tool chain is given from the original chip manufacturer. Developed, registers, memory allocation, hardware interrupts must go deep into it. This is the status quo of traditional embedded development, and it is also the status quo of IoT device development.
So far, the language used in the real production environment is C/C++, and very few will use Python on the device side, basically no other language. There are more than 50 operating systems and more than 10 mainstream ones. Among them, the share of embedded Linux is not large, and various real-time operating systems have their own characteristics, each with its own world.
To sum up briefly, compared to IoT development, the traditional embedded development methods mainly have the following problems:
Need to consider the underlying work of interrupts, registers, memory allocation, etc.;
Compile, burn, observe, and debug the development lifecycle with debug devices;
The difference between different SoCs and systems is too large;
Lack of code reuse and open source habits;
Developers spend too much time on development environments and firmware compilation.
So we see that the development of the device is based on chip selection. When a device-side product faces a demand, the existing process is to determine the technical parameters of the product, thereby determining a chip, and then using a complete set of development technologies of the chip. This is also determined by the chip's self-generated technology features used in early embedded scenarios: different core parameters such as computing resources (CPU frequency, storage), peripheral interfaces, operating temperature, and communication protocols lead to chip fragmentation, and chip fragmentation leads to embedded development. Fragmentation.
At present, the general trend in this field is that IoT chips are expected to move toward convergence, and the Internet of Things development environment and technology are expected to converge.
3.1 IoT chipIn the early days, due to cost constraints, the chips used in the Internet of Things field always showed a lack of resources. It is difficult to find a suitable chip (computing resources, peripheral interfaces, operating temperatures, communication protocols, etc.) to adapt to common scenarios. . With the gradual reduction of semiconductor thresholds, China's semiconductor manufacturing industry has gradually formed, and chip resources have begun to expand. The representative chips are MTK's MT7697, MT7688 and Lexin's ESP32.
The main parameters of MT7697 are: ARM Cortex M4 CPU with floating point unit, maximum frequency 192Mhz, memory 256KB SRAM, configurable 4MB or more storage space, embedded WiFi and BLE 4.2 on chip, enough peripheral interface, and can adapt Industrial grade operating temperature.
The main parameters of MT7688 are: MIPS 580Mhz CPU, the maximum memory is 256MB, configurable 16GB storage space, WiFi embedded in the chip, the interface is rich in digital interface except the analog interface, the price is tens of yuan, the power consumption is not suitable. The battery is used for a long time.
However, it is very advantageous that it provides a Linux development environment that allows developers to have a Linux CLI experience on a regular x86 machine. How to use Node.js, MySQL, OpenCV, Nginx, etc. on Alibaba Cloud, in this How to use dozens of IoT small modules. The stability is super strong, and it is normal to not crash for a few years.
The main parameters of ESP32 are: Tensilica LX6 CP, clocked at 240 MHz, memory is 520KB SRAM, can be configured with more than 4MB of storage space, embedded with WiFi and Bluetooth and BLE, has enough peripheral interfaces, and can adapt to industrial use. temperature.
The common feature of these chips is that computing resources and communication capabilities and interface resources have sufficient margin relative to traditional MCUs and remain at the same price. Therefore, on this type of chip, there are enough resources for abstraction encapsulation and development framework implementation. We have seen that in addition to the traditional embedded development kits provided by the original chips, the community and other vendors have accelerated the implementation of new development technologies on these chips.
3.2 Development TechnologyIoT device-side development technology currently has two relatively large development directions, one is the unified IoT operating system, and the other is the unified IoT development framework. Their common goal is to form a "software-defined Internet of Things", starting with the traditional chip selection and landing in the original SDK to complete the application development, the opposite of the process of demand and product design, hope to start with the demand and product design Through the open and unified software architecture to complete the development, and then based on the resources used in the development to land chips and peripherals. The main benefit of this is to increase development efficiency and form application code that can be reused.
operating system
Although there are dozens of device-side operating systems on the market, we see three active ones that are clearly moving toward the "software-defined Internet of Things":
ZephyrZephyr is the Internet of Things operating system released by the Linux Foundation in February 2016. The main supporting force behind it comes from ARM and Linaro. It has the common features of embedded small real-time operating systems, such as the smallest system from lightweight to KB. Memory footprint, support for a variety of chip architecture: from ARM Cortex-M, Intel x86, ARC (DSP core), NIOS II (FPGA soft core) to open source RISC V, etc., the same modular kernel organization as Linux, as shown 2 is shown.
Zephyr has now upgraded to version 1.7 and is moving closer to a system that can be used in production environments. Zephyr's biggest feature is not its completeness, but its development philosophy comes entirely from the "software-defined Internet of Things", and has good resources to support, and should have its own position in the future.
RTthreadRTthread is a purely domestic small operating system, rooted in various usage scenarios in China. It has established its position in the past 10 years and has its own place in many industries. The community is very active now, and the core team is promoting in the form of a startup company. Very focused. Technical Features As a mature system, there is nothing to spit. Zephyr has the technical advantages of RTT, and the installed capacity of RTT in the production environment is considerable.
Huawei LiteOSHuawei is one of the root causes of IoT technology in the world. LiteOS is a system used by many Huawei products. It is also being promoted in the form of open source. The biggest advantage of LiteOS is that many of Huawei's root technologies will use LiteOS for output. The largest example is the NB-IoT technology that will be fully commercialized. The device-side development kit will use LiteOS output.
The consistent features of the above systems include miniaturization, wide range of chip adaptation, and wide adaptability of communication protocols. They are also open source systems, and the R&D or driving force is relatively active. It is possible that the mainstream operating system like Linux in the field of Internet of Things will be one of them, and it may still exist all the time but it is more and more technically convergent.
Development FrameworkFirst explain the development framework, the development framework can be as small as a detailed tool, or as large as the full boundaries of the development. The most typical example is Android. In the pure operating system sense, Android is a branch of Linux. However, from the perspective of App development, there is no place to deal with Linux other than NDK, so Android is also called the operating system.
Broadly speaking, in addition to the development framework for mobile applications, Android also has an application distribution channel such as Google play, which is the developer's ecological construction. In the same way, we look at the various development modes of Node.js in the backend, and also encapsulate all the back-end resources into JavaScript. At the time of development, we can use npm install various packages to require, and solve the problem of code reuse.
So my point is that the development framework and the code reuse and developer ecosystem behind it are the real operating systems.
Currently in the field of Internet of Things, the development framework that is trying to evolve to the production environment is basically based on JavaScript, and the JavaScript runTIme used on small real-time operating systems is currently concentrated on JerryScript. JerryScript is a small resource-utilizing engine developed by Samsung and open source. It requires 64KB of memory and 200KB of storage. It can implement complete event-driven and conforms to ECMAScript 5.1.
As mentioned earlier, the development framework or operating system needs to include the developer ecology for code reuse, and even the application distribution, so we see that there are two jobs on the basis of JerryScript. The team deserves attention:
WRTnodeWRTnode is a Beijing open source hardware team that provides full process services from development to hardware delivery. Their recently opened node.system and noyun.io are focused on implementing the development framework and developer ecosystem of IoT JavaScript. In the implementation of WRTnode, the JavaScript development of the device side has become the same online development as cloud9.io, which shields the tedious compilation and burning of embedded development for developers.
RuffRuff is a startup company based in Shanghai. Since 2015, Ruff has been evolving the developer ecosystem based on IoT device-side JavaScript, providing a more viable code reuse framework. They are now starting to serve commercial customers, making it possible for the rapid implementation of IoT applications.
At the same time, Zephyr and Huawei LiteOS also have their own JavaScript runTIme release plans.
Above we have seen some new developments in device-side development, and these new device-side development technologies have gradually shifted to delivery. It is reasonable to believe that after a period of development, the IoT development technology driven by the efficiency-oriented business model will usher in a big wave of updates, which will lead to the real development of IoT applications.
Wall switch and socket ,Champagne wall switch and socket, 16A push switch and socket
Guangdong Shunde Langzhi Trading CO., Ltd , https://www.langzhielectrical.com