Author: Elder Brother Chuan

I have been using the interface of Rongyun to do instant messaging before, and I have explored for a period of time and think that Rongyun is doing very well. But the interface is charged and a little expensive, gave up rongyun determined to build a background.

I checked online and went to the school library to borrow books. I found there was a book called “30 Days, App Development from 0 to 1”. It turned out that the Workerman framework could do instant messaging and was easy to use. After installing the Workerman infrastructure, I found that the Workerman infrastructure can only do service push, and cannot achieve communication between clients.

Then continue to look for information and find that GatewayWorker can realize communication, and the interface is encapsulated and the document is detailed. After I set up the GatewayWorker environment, I did a few simple tests and found that clients could indeed communicate with each other and chat in groups. Then we started designing the database and refining the various business logic (the business logic code can only be written in events.php).

The server is also the cheapest to buy 1G memory 1M bandwidth to make do with (Baidu cloud server 46 yuan to buy), the server has not done the pressure test do not know more online users will jump!

After repeated tests, the mobile terminal found that the communication experience of native HTML5 WebSocket and other network communication modules of the platform was poor. Finally, the WebSocket V1.1.2 module was selected to communicate with the server in a stable manner.

** Current main functions of app: ** Single chat, group chat, friends, TWO-DIMENSIONAL code recognition, local storage of message data, message request verification, feedback, message collection, wechat login, screenshot.

** Message types: ** Voice, text, expression, picture, location.

** Platform used modules: **webSocket, aMap, NVTabBar, DB, FS, UIChatBox, FNScanner, wxPlus, trans, imageFilter, trans.

It took half a year to develop and produce the App in a piecemeal manner. Generally speaking, it was difficult to design front-end function modules and many functions were troublesome. The back end is relatively simple, the most important is to design the database table, App ICONS and names are temporary.

Now the official launch of AVM, when free App into AVM multi-terminal version, currently some functions are not perfect, there must be a lot of bugs, you can download and use wechat login to test, welcome your criticism and correction.

Screenshots of main functions:

From: community.apicloud.com/bbs/thread-…