Author: Idle fish technology – ahead
Business background
As a C2X app, Xianyu is naturally different from taobao, Tmall and other B2C business models. Individual sellers are also ordinary consumers. Compared with professional sellers, many individual sellers do not know how to sell their products. The problems are mainly reflected in the following two aspects:
-
Insufficient commodity information. Xianyu adopts a light publishing mode. Users only need to upload a few photos and briefly describe the product information, and the publishing process can be completed in one minute. Light release mode caters to users’ experience of rapid release, but it also leads to the problem of insufficient product information.
-
The price of goods is not reasonable. Some sellers and users misjudge the market conditions of their products, leading to the deviation between pricing and buyers’ expectations, which reduces buyers’ willingness to buy.
So the question comes, how to ensure light release at the same time, improve the effective information of goods, increase the attractiveness of goods baby, promote transaction?
solution
In the context of the above problems, we came up with a way to do tasks to guide users. Specific approach is: on the premise of light release, through the way of doing tasks to guide the seller to complete the commodity information or guide the commodity price, so as to promote the transaction. On the one hand, when the information of the key attributes of a commodity is completed and the price becomes reasonable, more buyers will be willing to browse the commodity and make a deal. On the other hand, it also helps our technical mistress to better understand the characteristics of goods, so as to more accurately recommend to buyers in need.
Technical implementation and system precipitation
With this solution in mind, we created Tellus, a user and merchandise based mission system. Some of you may have asked, “Isn’t there a similar system in the company? Mission systems are pretty common, right?” After investigation, we found that most of the existing internal systems are user-based task systems, while the task system of Xianyu is user-based and commodity based. As a result, we cannot reuse the existing task system and can only develop it by ourselves.
Overall system structure drawing
The task life cycle is divided into creating tasks, presenting tasks, and completing tasks.
Task creation module
The difficulty of task creation lies in the complexity of data sources mentioned before, because there are many sources of task creation. In order to reduce access costs, Tellus task creation module uses message queues to decouple events. Tellus uses MetaQ as a message queue. MetaQ is a distributed, queue model messaging middleware (RocketMQ) developed by Alibaba. Based on the publish and subscribe mode, there are Push and Pull consumption modes, support strict message order, hundreds of millions of levels of accumulation ability, support message backtracking and multi-dimension message query. Through message customization, all data sources send messages to create tasks uniformly. Tellus system listens for such messages and creates corresponding tasks according to business logic, which solves the problem of complex message sources well.
Task display module
How do you present a task once it’s created? The display process is as follows:
We explored the full range of tasks through the AB experiment. The Tellus system supported a rich variety of task types, and we tried both single and combined tasks.
Single task display
Display of combined tasks
Tasks based on user dimensions (such as continuous polishing tasks) and goods dimensions (such as selecting the color of goods) are also supported. Tellus system also implements task frequency customization. Tasks can be completed at once or repeatedly, combined tasks can be completed in a specific order, or out of order, providing flexible configuration for the business.
Task completion module
The completion of the task logic module is divided into active complete logic and passive, active complete success and failure can be divided into tasks, triggered the passive finish some app the user’s behavior to complete the task of logic, thus accomplished the task in unwitting circumstance, such as when to edit items added in assaying the fineness of goods, then add the colour of the task will be finished automatically. Different tasks can also realize the personalized incentive steps, Tellus through strategy pattern design, the interface is open to business development, the completion of each task, the user can access to certain incentives, varies according to the business of these incentives, through the open interface, business development just need to comply with the interface agreement, can realize customization development, Complete different task incentive mechanism.
Technology selection
In the whole life cycle of a task, there is still a difficult problem, that is, how to store the data. The task data is mainly divided into two types: one is the detailed data of the task; The other is the metadata of the task. Detailed data for the task, the first thing to consider is the relational database is a relational database, relational database supports transactions, can undertake complex league table query, the system does not have to and necessary for tasks, task system on data correlation is not high, the task is almost independent of each other between data), However, the storage scale of data requires a higher level (ten billion level). Table Store, which supports massive data storage, has entered our vision. Table Store is a NoSQL multi-model database developed by Ali Cloud, which provides massive structured data storage and fast query and analysis services. The distributed storage of table storage and powerful indexing engine can support petabyte storage, ten million TPS and millisecond delay service capabilities. In addition, Table Store also has the following advantages:
-
The Table Store is also a fully managed database. With table storage, we only need to focus on business development, without worrying about hardware and software presetting, configuration, failure, cluster expansion, security and other problems. While ensuring high service availability, we greatly reduce management and operation costs, which enables us to focus on business development.
-
Strong query ability. In addition to supporting primary key queries, table storage also supports multivariate indexes and global secondary indexes.
-
High availability. Table storage Stores multiple backups of data on different machines in different racks and can be quickly recovered in case of backup failure, providing 99.99999999% (10 nines) reliability.
-
Strong consistency of data. Table storage ensures that data is written consistently and all copies of data 3 are written to disks. As soon as the write operation returns successfully, the application can immediately read the latest data.
Based on the above advantages, Table Store better meets our data storage requirements. For the metadata of the task, considering the frequency of use, we also created a cache for reading and writing. For the metadata of the task system, we selected Guava cache as the cache. The reason is that Guava cache requests are fast and easy to use. The amount of task metadata data is small, and even if each node stores a cache, the overhead is small. In this case, using distributed cache is heavy and meaningless.
Effect of the business
Tellus can support a large number of different business scenarios in a short period of time due to its versatility, scalability, and configurability. Here we take super exposure and stock diagnostics as examples to illustrate. Super exposure for new products, a pop-up window will pop up when the product is released to guide the user to enter the combined task page to complete the task. After completing the task, the user can obtain the super exposure privilege. Stock diagnosis for stock goods, the first task information is displayed below the baby, and the user is guided to enter the page of combination task to complete the combination task. When it goes live, the completion rate doubles.
Improvement of development efficiency
One of the biggest challenges for Tellus was the sheer volume of new tasks, hundreds of tasks to support in a short period of time, which was almost impossible. In order to support rapid business trial and error, and reduce development costs, Tellus has made two major optimizations: one is the task template, the other is to support the configurable task. First, let’s talk about the template of tasks: we find that tasks can be abstracted into single class, multiple class, confirmation class, jump class and so on. Each type of task is customized into a template. Visual students conduct visual abstraction for the template and fix the display style. The server side abstracts the template type according to the display style.
When new tasks are added, only templates are needed, which reduces the workload of repeated development. Let’s talk about the configurability of tasks: On the basis of task template, we find that for some tasks, the logic of tasks is basically the same, but the corresponding task copywriting is different. Tellus supports the development of configurable tasks for these simple tasks. Currently, 1.0 has been developed. It used to be necessary to change the code to add a task, but now it only needs to change the configuration document. In the following version 2.0, the operation page will be developed. The operation students only need to configure on the page, without the intervention of developers, thus greatly improving the efficiency of development and operation.
The follow-up plan
Tellus plans to subsequently dock with the Omega and Hermes platforms. Omega is a real-time event collection system of Xianyu, which collects user behavior events through logs and calls Hermes precise reach to qualified users through rule calculation. Hermes is a touch system for idle fish, which was introduced in a previous article on wechat. For example, omega can collect the event of releasing goods in real time, and then generate some tasks corresponding to the goods in real time. Compared with messages, the design is more reasonable and has higher scalability in the later stage. The linkage with Hermes is more reflected in pushing users to complete tasks and increasing the exposure of tasks.
Tellus also plans to add a series of incentives to encourage users to complete tasks. Recently, we have been working with students of Xianyu Currency to give a certain amount of Xianyu currency to users who complete certain tasks to encourage them to complete more tasks.