More and more people are talking about “the second half of mobile terminal”, “anxiety of Android development”, others are Shouting “technology is changing every day, learning is endless”, “Kotlin yesterday, Flutter today”. I actually think that if you’re skilled enough, you don’t have to worry too much about it.

Is mobile really in the second half? Not in my opinion, at best “Android technology exploration” entered the second half, and the overall market is still optimistic. BAT used to dominate, but in the past two years, more and more unicorns have emerged: Toutiao, Douyin, Pinduoduo, Kuaishou, Xiaopingsoti, etc. Their businesses are all on the mobile terminal, and they need to recruit more mobile terminal talents. If you look at the second half, it’s a lot of small startups exiting the market. It’s true that many entry-level engineers are losing their jobs, but it’s also a sign that the industry is becoming more regulated.

And it’s a good time to be an Android engineer. As the Internet sinks, it is clear whether users in the sinking market are more likely to use Android or iOS.

So what does it take for an engineer to survive? It’s simple. Change careers or improve. I believe that a skilled engineer, not only does not need to worry, but in this era, can have a stable career and a good income.

The second half of Android technology

In the second half, I prefer to say “the second half of Android technology”. As a large number of engineers and companies have invested in research and development in the past few years, Android technology has moved from simple pages to more and more complex interactions, to new technologies such as dynamic and plug-in technology and black technology, and the depth of the field has been deepening.

If you want to become an excellent engineer who does not worry about elimination, it is not to blindly follow the trend of new technology. You should learn Kotlin today and Flutter tomorrow, and be tired and busy. But should continue to strive to improve their knowledge system, maintain a certain technical depth.

Therefore, this column would like to share some knowledge and skills about Android architecture in addition to UI and interface development.

We hope and believe that these skills will help readers truly get rid of technology anxiety and eventually find their own direction and competitiveness.

Do business students need to know about architecture?

Some students will ask, I usually write business code, write pages, call SDK, is it necessary to understand the architecture? The answer is simple, business is table, architecture is inside. Much the same architecture is behind the ever-changing business. Times change, businesses change, and technical people who understand architecture can stay on top of it rather than run with it.

Therefore, I suggest business students to study more basic library principles instead of resorting to SDK, which will enable you to have stronger technical competitiveness in addition to heavy business development.

Architecture incubates and serves the business

There is a conflict between architecture students and business students in many companies: architecture and business are independent of each other, resulting in the output technology can not always meet the needs of business, resulting in the result: architecture students have no heart, business students are hard to say.

In fact, really good architectures are incubated from the business and serve the broader business shape.

Let me give you a couple of examples.

As we all know, Alibaba is mainly engaged in e-commerce business, and e-commerce is a strong operation, so it has a very strong demand for dynamic, that is, it hopes that the App can be updated at any time just like the web page. So, Ali hatched out Weex, through remote development and deployment of JS code, can update the page content in real time;

In addition, Mobile App is of great strategic significance to the whole Alibaba Group. It is not only a profit monster, but also a traffic entrance for the whole group (Mobile DAU reached 110 million in 2015). This is also the “aircraft carrier strategy” proposed by Ali: Taobao is like an aircraft carrier, on which all kinds of business forms within the group, such as Flying pig, idle fish and Tmall, can be located. Thus, Atlas was born, and all apps can be easily integrated into Mobile and enjoy traffic nourishment.

There are many similar examples, such as the well-known wechat, which needs to ensure that messages can have the highest arrival rate under any complex network. Therefore, wechat developed a set of cross-platform long connection solutions, proposed intelligent heartbeat solutions and various weak network coping strategies, such as multi-level timeout, and finally launched Mars, which ensured that users in various network environments across the country could receive and receive messages steadily.

Some students may know ali in 2015 put forward the “big center, small front desk strategy”, set up the group data center, technology center, to help a variety of front desk business fast forward; Such technical structure and organizational structure helped Ali quickly incubate various new businesses, such as taobao special edition in early 2018. According to my friends, the whole App only took a little more than one month from startup to launch. This year, Tencent organizational structure adjustment, as the CTO Zhang Zhidong said: “There is no help to the company-level data center construction, I am also very sorry.” Since then, Tencent has also officially launched the construction of “Taiwan architecture”.

Therefore, different business forms can incubate unique architectures.

The structure is the root, and the deeper it goes, the more business can branch out.

Column Technical atlas

So much for the gossip, let’s talk formally about some of the technical points that this column will cover. These technical points will be based on my daily work accumulation, at the same time combined with the open source technology system of major factories, (of course, for Ali closed source will try to avoid, offline can do some technical discussion).

Below, I’ll list the technical points that I’ll cover in future columns, tweaking them as I go along.

  1. Due to the increasing cost of acquiring customers for App, dynamic is an increasingly important technical architecture in recent years. For example, React Native, small programs and fast applications are all trying to make App with real-time update and easy access. This topic will analyze the dynamic solutions proposed by various plants, such as JsBridge; Including some implementation ideas of small program scheme, such as H5 container architecture of multi-process; In addition, dynamic programming languages for mobile platforms such as Lua and Javascript will be analyzed.

  2. Picture topic For billion-level App, any optimization of picture is of great significance to flow, experience and so on. For example, Google+ App saves 50TB of data storage space per day by adopting WebP image format. Therefore, this special topic will talk about the major manufacturers such as Tencent, FB, Google and so on in the picture optimization has put forward what programs, such as WebP vs SharpP; Glide, Fresco, and Dalvik/Art memory optimizations are also discussed.

  3. The topic of saving flow mentioned above is the compression of pictures. In fact, saving flow is an eternal topic. It can not only improve user experience, but also help reduce the cost of user flow and save the cost of the company. Therefore, this topic will talk about how to monitor Android traffic; What are the commonly used Diff and compression algorithms, such as Tinker’s self-developed Diff algorithm vs Google’s Proposed Google-Diff vs BsDiff, etc. How to choose data communication formats such as JSON and ProtoBuf; FastJson, Jackson, etc.

  4. Most business students’ understanding of network is OkHttp+Json parsing. In fact, there are many technical points worth studying in network. A high-quality App, in addition to running in a good network environment, more importantly, must run well in weak network, network hijacking, slow network and other complex environment, but also fast, which involves DNS acceleration, network results cache, etc.. The concept of “page opening in seconds” has been mentioned by big companies before. The speed of page opening depends greatly on the current network environment and has a great impact on user experience and retention. In this topic we will talk about technical points related to the network.

  5. Monitoring and Logging Topics Most people have the impression that monitoring and logging is integrated with a third party SDK such as Fabric, Bugly, etc. Business students may not know much about logs, but logs are crucial, especially when troubleshooting complex problems. In this topic, we will talk about how to ensure that the logs are not lost, how to report to the background without affecting the operation of the App, and the most interesting point: how to use the technology such as long connection to pull local detailed logs of any user in real time.

  6. Security topics Security topics are far from the majority, here we explain some common and business-related security topics, specific follow-up supplement.

  7. A follow-up to the high availability topic

  8. GC topics will be supplemented later

List of project technical points

  1. Dynamic topics
    • How do I get JavaScript to interact with my App
    • How to achieve “point-and-use” small program, fast application
    • H5 container multi-process architecture
    • Lua for dynamic programming
    • . Etc.
  2. Image feature
    • Image compression of WebP and Tencent SharpP implementation mechanism
    • Glide and Fresco principles of picture memory optimization
    • PNG JPG and other commonly used picture formats of memory, decompression speed analysis
    • . Etc.
  3. Province flow project
    • Android Traffic Monitoring
    • File compression zip 7Z gzip etc
    • Incremental update diFF algorithm, case: Tinker self-developed DIFF/Patch algorithm
    • Image caching technology
    • WebView cache optimization
    • Data transfer protocol comparison ProfoBuf, FastJson, Jackson
    • . Etc.
  4. Network project
    • The significance of reliable long connections
    • HTTPDNS DNS hijacking
    • Network sniffer
    • Http2/Https/QUIC protocol comparison
    • CDN peak cutting and valley filling
    • How do I limit traffic on the global network to ensure high service traffic priority
    • . Etc.
  5. Monitoring and logging topics
    • mmapLog landing method, open source projectLogan.xlogEtc.
    • Dynamically pull logs over long connections
    • If the long connection is disconnected, pull the log through the short connection
    • Log reporting, local fragment storage, and background reporting policies
    • . Etc.
  6. Security project
    • Mobile terminal encryption algorithm symmetric and asymmetric, tamper-proof
    • The general encoding mode is MD5 base64
    • . Etc.

“100 million Level Android architecture” small column introduction

Rapid business growth cannot be achieved without a stable and reliable architecture. “100 million Level Android Architecture” small column will be based on the author’s practical work experience, combined with the domestic big companies such as Ali, Tencent, Meituan and other infrastructure status, try to talk about how to design a good set of architecture to support business from 0 to 1, even to 100 million, hope to discuss with you more.

The main content of this column:

  1. What Android architecture does the big factory have?
  2. What problems these architectures solve;
  3. What are the principles of these architectures;
  4. Learn what these structures mean for us.

100 Million Android ArchitectureList of small columns:

“100 million Level Android Architecture” column with talk

Network Connectivity and Acceleration in the Android Architecture

Long Connection Technology for Android Architecture

“High Availability mobile Connectivity with Android Architecture”

Evolution of Network Security in the Android Architecture

High Performance Mobile Logging System based on Android Architecture

Second Mobile Configuration Center for Android Architecture