Secret! How busy fish pull new delivery system design

Author: Busy fish technology - Jiu

background

Busy Fish is now the largest unused items trading platform. With the busy fish volume growth and expanding user, a common banner on the App or is busy fish feeds in an ordinary card, they are likely to be tens of millions of people see every day.

In order to better serve a large user community better, more personalized content recommendation and put more refined material it is particularly necessary. Today we can chat how to design a precise touch of users, operators rapid trial and error, the liberation delivery system development productivity.

Ideas analysis

What put that? For example, to a billboard on the city square at different times in different replacement scenarios poster is a kind of running, of course, the Internet technology has brought human dimension, different users may see the poster is not the same. What features such a system, we look at should be included.

1, we have "piece billboard on the city square" called resource-bit, you need a server end interface to obtain the required material revealed.
2, bit different resources required revealing footage format may be different, probably banner, probably feeds, operators may be hand customized fill data, may be any reasonable data structure.
3, with a bit of resources, at different times, for different platforms, different groups of people, revealing the material may be not the same, then we need to have a service to filter out content resources suitable position in the pile of material. In resource-bit hit when multiple clips, also need to have some mechanism to ruling out that a final revealing.

detailed design

We designed delivery system plays a front-end and back-end physical resources-bit multiple roles bridge between the data source. It is responsible for screening data from various sources in the required service on a particular resource revealed bit data according to a certain rule, the basic data stream as shown below:

undefined

Niche

The so-called resource position, in our system, refers to the entity pit position on the front page. It is a technology created by the students in product development. Of course, the data structure of consumption of resources bits need to be identified in the development stage, such as banner, feeds or structure is very flexible hand fill data.

In our system, the data structure of the resources we need to consume bits described by a schema.

undefined

这个 schema 是用 json 描述的。技术同学在前端页面上开发实体资源位后,需要在我们的系统中创建对应的虚拟资源位,并通过一个图形化的 json schema 编辑器来定义这个资源位需要消费的数据结构

undefined

投放物料

上述 schema 定义了一个资源位所需要消费的数据的格式。但是光有 schema 是不够的,因为资源位要消费的数据,而不是数据结构本身。在我们的系统中,我们用一个动态表单模块根据schema生成动态的表单,产品运营同学通过动态表单生产的数据,我们称之为投放物料。资源位消费的就是投放物料。

对于一些手填数据,表单直接产生的数据就是资源位可用的了。但是对于 Feeds 之类的,表单往往只能定义 Feeds 的一些诸如选品等特征字段。对于这类特殊类型的数据源,服务端就不能简单的直接返回数据了,需要根据这些特征字段,做一些数据查询和数据解析工作,再返回给前端一个完整规范的数据。

undefined

投放单元

前述文章说到,同一个banner,可能对新用户投放的是红包,对年轻男孩子投放的是手机数码内容,对年轻女孩子投放的是美妆服饰。我们把这个连接了资源位、投放物料与多个投放因子的桥梁叫做投放单元。

那么投放单元需要有多少个投放因子呢?其实是视业务而定的,我们认为基础的投放因为应该包含 投放时段、投放人群、投放平台、投放AB配置等。

当资源位向投放系统发起请求拉取数据时,投放系统在这个资源位上挂载的所有投放单元中根据投放因子筛选出命中的投放单元,最后将命中的投放单元上挂载的投放物料返回给前端的投放资源位。当命中了多个投放单元时,需要有些方法来裁决出最终胜出的那一个。这个方法简单点做,可以在投放单元中配一个权重,筛选时最后选择权重高的那个,也可以引入算法决策,根据投放的 ctr 数据做排序。

undefined

投放计划

投放计划是产品运营对多个资源位管理形式。简单来说,一个投放计划下,可以挂载多个关联的资源位。试想一下,一次大促活动可能涉及到几十个资源位的投放,将这些资源位组织到同一个投放计划中进行管理,可以更加方便操作以及查看投放效果。

Access end

For front-end, we hope that by offering a package npm package by simply calling, incoming resourceId (resource-bit ID) to get the data.

undefined

This is called by the caller to the business is relatively elegant, but it is not the performance of a page of worry. Because a page often consists of a number of resources bits, each bit of resources will form a separate request to initiate a large number of concurrent requests, not only will reduce page performance, but also a relatively large qps pressure on the server.

In view of this situation, we did a little optimization. Server provides a batch query interface, the SDK internal front ends, the request module is called every 10ms to make a polymerization, the acquired data of a single bit is converted into resource query batches. The negative impact of the data on the part of the resource-bit load caused the greatest 10ms delay, the advantage is to enhance the overall performance of pages, effectively reduces the server QPS pressure.

undefined

effect

Above-mentioned delivery system in our new businesses pull practice run very well, has put the ability to provide support for hundreds of idle resources in the fish bit applications, services tens of thousands of users every day free fish. It achieved a fine position to allocate resources, improve the utilization of the resources of a single bit, and enabling operators more freedom to launch various new pull test, trial and error to reduce costs, but also reduces the technical students frequently participate in the transformation of operational test the development effort, the liberation of the students of technical productivity.

to sum up

Above article introduces the design of a simple delivery system, in essence, is connected to a front-end server physical resource position and a variety of bridge design data sources.

Many of which capacity is dependent on the outcome of the efforts of other students within the team, such as:
1, json schema description of how resource-bit data structure design
2, how to achieve according to the form json schema dynamically generated
3, people check services and the ability to
4 the ability to test the AB
5, feeds of selected goods and services
4, dynamic banner personalization capabilities

There are many points that can be optimized, such as data reflow how to do better, how to introduce screening algorithm to optimize the ability of the strategy. . . Continuous optimization, continuing to create value for the business we have been trying to adhere to directions.

For more details, please pay attention to the public free of fish technology, will not it. Aoyama do not change, green Flows -

Guess you like

Origin yq.aliyun.com/articles/704528