【Free】Introduction to Xiaomi Instant Messaging Cloud MIMC

foreword

IM is an important component of Internet services, and instant and convenient communication is required in many scenarios. However, the implementation of IM is more complicated, and requires the backend to provide connection, delivery, storage, and statistical support, and the labor and machine costs are high. Therefore, many users currently choose not to implement the IM function themselves, or use mature apps such as QQ and WeChat to communicate, or use third-party IM cloud services to integrate their own applications.

Use existing apps: Free, no need to change user habits, full functional support. However, it lacks functions oriented to its own business needs, data security cannot be guaranteed, and statistical information cannot be obtained.

Use third-party IM cloud services: data security is guaranteed to a certain extent, more business functions can be supported, and statistical information such as user activity and registration numbers can be obtained. However, commercial use will be charged, and you still need to complete some work (interface design, SDK interface calling program), and may still be limited by the service functions provided by the third-party IM cloud.

introduce

1. Background of the message system:

The message system has always been one of the sexiest online architecture systems. It has the characteristics of high concurrency/high reliability/high real-time, high technical difficulty and great challenges. Therefore, for ordinary APP developers, it is necessary to build and maintain a reliable and stable message The cost of the system is high, but social attributes such as IM are one of the strong requirements of APP, so there is a basic contradiction here.

The current instant messaging cloud services on the market generally have problems such as high access costs and no OS-level support for long connections.

Xiaomi sells nearly 100 million mobile phones every year, and the number of mobile phones is huge. Xiaomi is born with Internet genes. Every mobile phone (MIUI) has a system-level long connection. The platform is second only to Apple (iOS). With the system-level long connection support, Xiaomi's message push has achieved the first place in the domestic industry. Now we are launching MIMC (Instant Messaging Cloud), a sister product pushed by Xiaomi for free, which I believe can bring huge benefits to developers!

2. What is Xiaomi Instant Messaging Cloud?

Xiaomi Instant Messaging Cloud MIMC: xiaoMI Messaging Cloud

MIMC is a safe, reliable and easy-to-use distributed IM cloud service developed by Xiaomi. Provide free and fast instant messaging access services for the majority of developers. MIMC is based on the accumulation of Xiaomi communication technology for many years, so that instant messaging is no longer complicated.

At present, developers can open the link to Xiaomi Open Platform on the PC side to view the introduction of Xiaomi Instant Messaging Cloud, API access documents, SDK downloads, etc.

https://dev.mi.com/console/appservice/mimc.html

3. MIMC document library

Including the introduction of MIMC, usage scenarios, advantages of MIMC, contact information and frequently asked questions, etc.

Fourth, the positioning boundary of MIMC

basic functions

MIMC realizes a safe, reliable, and easy-to-use distributed IM cloud service, providing developers with free and fast instant messaging access.

Single chat message, group chat message, group operation, historical message query, message callback/offline message callback, statistical information query (backend administrator system), internationalization.

Proposed extension

Specific message functions (red envelopes, burning after reading, read/unread, location) are customized by App developers

You can refer to our documentation (https://github.com/Xiaomi-mimc/operation-manual)

5. MIMC usage scenarios

1. Implement basic chat function

It is easy to implement basic chat functions in reference scenarios such as webpages and apps, including single chat, group chat, chat room, etc., whether you are a social app single chat, or in-game player guild chat access to MIMC can be easily achieved.

2. Realize online customer service function

Use the one-to-one chat channel of MIMC to realize the business logic function of online customer service.

3. Realize smart home signaling transmission

Use MIMC's message passing to realize the signaling transmission of smart home.

4. Other functions

The flexible and extensible message type of MIMC facilitates the transmission of various other types of messages.

6. MIMC vs competitive advantages:

1. Xiaomi MIUI system level long connection

For the message system, the long connection is the most fundamental. As the largest Android platform, Xiaomi MIUI has added system-level long connections as early as the MIUI V5 era. The advantages of Xiaomi MIUI are overwhelming.

2. The APP account system is perfectly matched

In the current message cloud on the market, APP developers need to apply for an additional set of a certain letter account, and store the certain letter account number/password in plain text on the server, which is expensive to maintain and has extremely high security risks.

If the MIMC is connected, the APP developer cannot perceive the MIMC account system at all. All sending and receiving are using the APP account, which fits seamlessly and has high security.

3. Wide range of application scenarios

At present, most of the message clouds on the market can only be applied to chat scenarios, and other message scenarios cannot be supported. MIMC can support any messaging scenarios such as intelligent hardware signaling/chat/customer service/push.

4. Full platform support

Android/iOS/Web/C/Java/Go and other full-platform/multi-language support, the first phase supports Android/iOS/Web three platforms, and the follow-up will support more platforms/languages ​​according to user needs.

5. The message format is 100% customizable and highly flexible

At present, most of the message clouds on the market are low in customization of chat content/format and have poor scalability. MIMC does not limit the message content/format, and adopts a custom binary protocol. The APP can flexibly customize the message format according to its own needs, and transmit data that is more suitable for the APP's own needs.

6. Minimalist API Design

Based on the new api design, the access cost of app developers is greatly simplified, and the chat function can be realized in 3 minutes.

API example:

user.sendMessage(String appAccount, byte[]); // The return value is packetId

user.sendGroupMessage(long groupId, byte[]); // return value is packetId

user.registerMessageHandler(MIMCMessageHandler handler);

interface MIMCMessageHandler {

public void handleMessage(List<MIMCMessage> packets);

public void handleGroupMessage(List<MIMCGroupMessage> packets);

public void handleServerAck(String packetId);

}

7. Totally free

Adhering to Xiaomi's consistent open and win-win principle, MIMC is completely free at this stage.

Seven, MIMC architecture Demo display

illustrate:

1. Authority verification: User account authority verification is based on the App's own server, and MIMC performs subsequent operations through the verification results returned by the App server. If the application-related information is sent to the TokenService server, the token is returned for subsequent communication with the FE.

2.PushService: The background service sends messages to certain users. Simply fill in the App information and account information to send a message. Provides the ability to send messages to background services.

iOS Demo

Android Demo

Web Demo

So far, I believe you already have a relatively intuitive understanding of the Xiaomi instant messaging cloud service. If you want to know more, please copy the link to the browser to open it or click to read the original text

https://github.com/Xiaomi-mimc/operation-manual

Finally, I wish the vast number of developers to use MIMC to achieve instant messaging functions as soon as possible, go home with peace of mind for the Chinese New Year, a prosperous New Year, and a prosperous business.

Welcome to pay attention to Xiaomi IM Cloud WeChat official account to get more information in time.

The QR code of the QQ group is shown in the following figure:

read the original

 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324467422&siteId=291194637