This is my 100th article, and I’ve been thinking about what I’m going to write, and finally decided to write a technical design article about the system. Let’s talk about thinking about operational activities.

An overview of the

The development of a product business is always inseparable from operation. With the rapid development of the business and the expansion of new businesses, the operation needs are increasing, and in many cases, hot spots need to be followed. Therefore, with limited resources, how to meet the increasing operation needs quickly, accurately, flexibly and stably has become a problem. According to the four basic elements of operation (target, crowd, threshold and incentive), we have realized an automated operation system that can meet 80% of the operation needs through the abstraction, modeling and componentization of activities. The operation students only need a configuration file to generate a new activity.

His shan zhishi

  • QQ member activity operating platform architecture design practice: cloud.tencent.com/developer/a…
  • Around operations efficient development what secret: mp.weixin.qq.com/s/VFQKuDwA0…
  • What are the activities the operation does? : www.zhihu.com/question/37…
  • Read the APP user operation of four elements: new, retained and promote, revenue: www.woshipm.com/operate/647…

primers

Usually, we do an activity, what do we need to do? We need UI design, front-end layout, interface definition, database creation, test flow, and so on. So the whole process is going to be a little bit faster, maybe a week for the last campaign, maybe two weeks for the slower one. But a lot of times, the life cycle of an activity can be a week, a month or so. Do we need to spend so much development money to do this? One campaign, ten, a hundred.

Let’s first understand the nature of activities through three activities

Activity 1: In order to attract new users, for old users, every one of them will be rewarded with a quota increase of 20 yuan. Activity 2: In order to pull GMV, for old users, how many coupons will be awarded for each repayment of XX yuan? Activity 3: In order to tie the card, for all users, after completing the tie card, they will have the opportunity to grab 100 cash coupons of 1000 yuan. . We can find four elements of activities: crowd, target, threshold and incentive. We can summarize operation activities in one sentence:

For what crowd, what goal we want to achieve, what threshold (rules) to set, and finally what incentive measures to users.

With such a short activity life cycle, can we develop activities with relatively little development cost? Is an activity developed for a business? Can I quickly reuse to other businesses?

In the development of these activities, we encountered challenges and difficulties:

  • Poor maintainability: The activity life cycle is short, the activity goes offline, the interface and database are abandoned, but the code is left behind, and the code maintainability is poor.
  • Low development efficiency: repeated development, low development efficiency, unable to reuse. Create a new interface and database table for each activity
  • Poor scalability: Each activity can only be applied to its own business and cannot be quickly reused to other businesses.
  • Performance and monitoring: Unreliable data monitoring, poor performance.
  • Low security: No interface signature or traffic limiting is performed on the interface.

What does the operation do?

So I spent a little bit of time systematically going through the business system, looking at what we’ve done, thinking, what are we going to do in the future?

  • Access business: specific products, we have to operate his basis.
  • Operational activities: There are specific businesses, through operational activities to operate the business.
  • User touch: after the activity comes out, we need to inform the user.
  • Data analysis: How is the effect of the activity? We need to analyze data and improve our plan.
  • Monitoring alarms: The system itself is not 100% reliable and we need some dashboards to monitor our system.
  • Security/brush protection: Operations are incentivised, profitable and need to be protected from malicious intrusion.
  • Basic skills: Improve development efficiency through abstraction and instrumentalization.
  • Componentized system: is there a visual interface for quick access by operations personnel?

Based on the activities I have done and the problems I have encountered, I have been constantly thinking about how to optimize the operation system to improve the development efficiency, safety and performance. Finally, determine a general direction:

Platformization, standardization, configuration, component.

System Architecture Design

Viewed from above:

  • Front-end layer: before and after separation, static and static separation, access button trigger statistics system, componentized module.
  • Gateway layer: access protocol adaptation, signature verification, interface monitoring statistics, traffic limiting, etc. Ensure interface security.
  • Logical layer: Divided into three sub-layers.
    • Layer 1: Access to unified configuration center, common modules of unified interface standards, plug-ins and components. Message processing introduces observers, abstracting common modules.
    • The second layer: according to the four elements of operation, abstract the rule set (binding card? Repayment, etc.), reward sets (coupons, physical goods? And so on) constitute the active main logic.
    • Layer 3: All active storage structures (tag services) are abstracted, configuration, monitoring, and distributed lock counters are provided as services to the upper level calls.
  • Base platform: Some base capabilities that depend on: user information, order information, platform coupon system, base push capabilities, etc.
  • Storage layer: All active data is stored in a unified structure.

From left to right:

  • An activity can be quickly reused to other businesses.
  • Push the activity out through advertising system, message push system, etc. Do data analysis and optimize activity flow through data analysis system.

Illustrate a few points:

1. Active routes

  • All interfaces are connected through SaleService. Handler
  • Find the corresponding execution method based on the activity ID and method.
  • Refer to MVC routing
  • This is implemented through reflection + proxy mode

Some benefits of doing this:

  • Because of the short cycle of the activity, you can adjust the presence or absence of the interface by changing the configuration. Easy maintenance.
  • It is very convenient to do some common checks or bury some hooks (such as whether to restrict login, whether to expire, etc.)
  • Deep integration with configuration systems.
  • Do some interface monitoring and interception.

2. Mq messages (message decoupling)

  • Observer model
  • Closed for modifications, open for extensions

3. Unified configuration center

Can refer to before writing [180425] of the unified configuration center: www.jianshu.com/p/edce8e8c1…

Can be optimized point here is to introduce the version number, first update configuration + new version number to redis, then update the version number of each configuration id of the client to collect configuration, first take the configuration’s version, in according to the version number + configuration is the key to redis configuration content, so that we can smooth the cache configuration to switch to the new cache configuration.

4. Componentization

An activity can usually be thought of as a number of components.

Each component has its own characteristics.

How do the front and back ends interact with components?

I’d better. Editing in OA would be perfect

Finally, through some configurations, some activities can be quickly online without the need to develop access to achieve automated operations.

Some personal views

  • The development of the program should be a process of building blocks, some small modules combined into a medium module, several medium modules combined into a system, a number of systems combined into a business and so on.
  • A big problem can be divided into a number of small problems, solve a number of small problems, and finally solve the big problem.
  • Understand the business so you can design better systems.
  • Performance, availability, scalability, scalability, security.

Finally, I wish you a happy Chinese Valentine’s Day.