There are more than 10 billion transactions per day and more than ten million activity users per month, as a large social network app with more than hundred million subscribers in Africa, how can Afmobi Group deals with a huge instant messages immediately on Palmchat product?
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
HSDC of Palmchat
1. 1
High Speed Data Center (HSDC) Architecture of Afmobi Group
BRIEF
There are more than 10 billion transactions per day and more than ten million
activity users per month, as a large social network app with more than hundred
million subscribers in Africa, how can we deal with a huge instant messages
immediately?
Alan Kao
CTO at Afmobi
ABOUT Afmobi
Established in 2010, Afmobi is a mobile internet service developer that is
headquartered in Shenzhen, China. The service is strategically focused on the
development of African mobile internet services, with products that include the
Palmchat IM, PalmPlay app store, Af1234.com, PalmMusic music player, PalmCoin for
Palmpay, among others and is stationed in four African branches in Nairobi-Kenya,
Lagos-Nigeria, Accra-Ghana, and Addis Ababa-Ethiopia. Afmobi’s main priority in
Africa is to promote and build a mobile internet eco-system and create a way for the
people in Africa to communicate with the world.
THE CHALLENGE
“In the beginning, we evaluated several queue mechanisms such as MySQL,
Oracle, … for the SQL-like system and MongoDB, HBase, … NoSQL-like system in early
2010.”, says Alan Kao, CTO at Afmobi. “We met a lot of trouble things in that time. Cost
and performance are the main problems. Although most of Afmobi’s users are in Africa
and use feature phones, the instant response is still the main factor we should solve.”
3. 3
Core-Server
#1
HSDC
HSDB
UpLink
Channel
Module
DownLink
Channel
Module
Core-Server
#2
A1
B1
A2
B2
…
…
…
…
Send
Receive
Send
Receive
Figure 2: Connection Diagram between Core-Server, HSDC and HSDB(DataBase).
Connection flow:
1. Core-Server #1 (CS1) connect to UpLink channel of HSDC, when the connection is established (A1), HSDC will
inform DownLink channel.
2. DownLink channel will establish a connection to CS1’s receiving port (B1).
3. When B1 is established, DownLink channel will inform UpLink that “We are ready”, after this, CS1 can start to use
the service of HSDC.
The UpLink Channel Module will handle the data retrieving from Core-Server, and DownLink will response for
sending data back to Core-Server.
For services like IM text messages, DownLink Module will also monitor the user location and where the text
messages should go. It’s a response for exchange data between CS1 and CS2 (or said CSN).
PACKAGE STRUCTURES
Send Structure
typedef struct IM_TextMsg_SEND_PACKET {
// packet header
im_packet_header header;
4. 4
// packet content
uint32_t LEN_MSG_SENDER;
char MSG_SENDER_MSISDN[16];
uint32_t LEN_MSG_RECVER;
char MSG_RECVER_MSISDN[16];
char MSG_TYPE;
// 0x00:1-to-1 private message
// 0x01:1-to-1 public message
// 0x06:1-to-N private chat room
// 0x07:1-to-N public chat room
uint32_t LEN_MSG_CONTENT;
char *MSG_CONTENT; // Printable Base64 text pointer
} im_textmsg_send_packet;
Receive Structure
typedef struct IM_TextMsg_RECV_PACKET {
im_packet_header header;
uint32_t LEN_MSG_OWNER;
char MSG_OWNER_MSISDN[16];
uint32_t NUMBER_OF_MSGS; // How many messages
uint32_t LEN_ALL_MSGS; // The length of ALL_MSGS
char *ALL_MSGS[LEN_ALL_MSGS];
// Printable Base64 text string
} im_textmsg_recv_packet;
THE BENIFITS
Since the foresight design of core architecture, Afmobi is able to execute its
growth and expansion plans across a range of developing markets, especially in pan-
Africa. “The subscribers of Palmchat increased to hundred million in early 2016 and