Ddpush-any portal push-Overview

Source: Internet
Author: User
Ddpush overview IM (instant messaging) instant messaging system and information push

Im (instant messaging) has profoundly influenced the Internet and even the changes of human society since the emergence of ICQ in 1996 and the delivery of data by international giants. Starting from the mobile Internet era, the instant messaging system has intensified its evolution. In addition to providing push notification services worldwide for iOS and Android, it has also formed various open cloud push platforms and services, it has become a battlefield for giants to fight and target land. In the foreseeable future of IOT, I believe that the IM instant messaging system will evolve further and become one of the IT infrastructure in the IOT smart age.

However, so far, instant messaging (including its derivative cloud push platforms and services) has been given a difficult and highly invested tag, and seems to be the exclusive of the strong, common developers and small and medium-sized IT companies rely on existing third-party products or services for most of their businesses. If you do not need to worry about high fees, you may be charged for information security, building our customers and businesses on the basis of third-party services also gives us a lot of concerns. Although there are also various popular open-source implementations in the industry, their popularity is still relatively low. In addition, the current open-source implementation is generally based on a relatively advanced application level (for example, XMPP), so its implementation is complicated, and it is difficult for common technical staff to control and perform secondary development, the more advanced the application, the lower its versatility.

Ddpush ideas

The starting point of ddpush is to bypass various existing thresholds and obstacles and seek another simple and effective method to try to achieve the requirements of IM and information push in the mobile Internet and IOT era in a compromise manner. The purpose of ddpush is to help small and medium-sized applications and individual developers easily cross the basic thresholds of IM and push systems, rather than challenging and replacing existing industry standards and products. Ddpush, any door push server, is just another door, may be able to open another world, but it does not include the whole world.

The idea of ddpush is a bit similar to mqtt. It redefined a set of simple and low-level network communication protocols to achieve lower traffic, higher efficiency, and better versatility. The difference between ddpush and mqtt is that ddpush is simpler, giving up QoS, and only implementing extremely simple real-time communication requirements. The rest is controlled by the application layer. In addition, ddpush implements and promotes UDP, greatly reducing network communication costs and server load costs, and improving capacity and efficiency.

This feature is a difference between ddpush and other solutions. Ddpush believes that reliability and integrity should be controlled by the application layer rather than the network communication layer. The reason is that in the mobile Internet and wireless Internet of Things environments, the network itself is a very unstable factor (at least for a long time), so we cannot expect it to work perfectly, the application layer is required. For example, when you receive an email, you should try to send a notification telling the email owner that a new email has been sent. Even if the notification fails, you will not be able to directly log on to your mailbox to view the new email, at the same time, the possibility of another notification should be kept. Imagine that if the real-time notification fails, even new emails will be lost, wouldn't it put the cart before the horse?

Ddpush Policy

Therefore, ddpush adopts the following strategy: instead of ensuring the real-time and inevitable arrival of a single packet, it may change to multiple notifications until the terminal actively confirms, to improve the final success rate of "notification. In other words, ddpush sacrifices part of the real-time performance in exchange for a higher success rate. The information may be instantly reached, or arrive in 10 minutes, or even a few days later (if the terminal is online several days later ), but it will always arrive. (Of course, it can still be implemented in real time, because the ddpush behavior is configurable and also supports the TCP Mode)

Because of this, the communication protocol format of ddpush is similar to the UDP protocol, which is based on the packet format rather than the stream format and does not depend on the packet sequence. However, ddpush also uses TCP to implement the same protocol. If necessary, you only need to enable the TCP mode. Here, we need to declare that the server capacity in UDP mode is dozens or even hundreds of times that of TCP. Please weigh it yourself.

Note: In the early stages of designing ddpush, the author also considered introducing some QoS functions, such as the number of resends and resending policies. However, the author finally decided to give up most of the QoS functions and leave these problems to the application layer for control, which will be more accurate and practical, and can greatly simplify the complexity of ddpush and increase the capacity and efficiency. After all, the business logic is controlled by the application layer, and the number of online terminals is ensured by ddpush. It is a more appropriate way to perform their respective duties. It is like whether the email has been read or not. It should be controlled by the mail system, rather than the new mail reminder function.

However, ddpush does not completely have QoS functions, but uses a simpler QoS function, which is different from those of mqtt: waiting for confirmation from the terminal; in addition, the application layer and terminal realize personalized cooperation means to achieve greater degrees of freedom.

General terminal support

Another advantage of using UDP protocol for ddpush is its general support for terminal devices. For common operating systems (such as windows and Android), network operation support is not a problem at all, but a problem of universal application. For many embedded Linux systems and general hardware devices, a complete network communication protocol, especially TCP, is required, it is a very difficult task, or sometimes a very unlikely task (related to the capabilities and costs of chips and boards), so it is essentially a general problem. For UDP, general hardware devices and embedded systems are well supported, because of their low complexity and difficulty, and the requirements for various aspects are also reduced. Ddpush uses the binary network communication protocol instead of the text protocol, which is more compatible with many hardware devices. These features are similar to those of mqtt, but currently the mqtt protocol is based on TCP rather than UDP.

Use ddpush

For other methods such as XMPP, many developers are used to directly transmit information content. Ddpush advocates transferring "control information", which is similar to the FTP working mode. That is, the command and control information are transmitted through ddpush. We recommend that you connect to the Application Server (instead of the ddpush server) using common http get or TCP connection creation methods to obtain the actual content information. Security Verification and content validity are also involved here, while ddpush is not dedicated to solving similar problems (mqtt includes security verification rules ). Ddpush focuses on the issue and confirmation of notifications.

It's actually very simple.

Ddpush, whether it is the protocol or code implementation, is actually very simple. Therefore, developers can easily perform transformation and secondary development, or rewrite as needed. The entire ddpush server has a small amount of Java code. Currently, it only has 200 kb and the compiled binary file is less than 100 kb. This is not difficult for most developers to understand. This is what ddpush hopes to achieve, making instant messaging and pushing a home dish, rather than a full banquet.

Ddpush-any portal push-Overview

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.