{'fraction_non_alphanumeric': 0.017204301075268817, 'fraction_numerical': 0.0032258064516129032, 'mean_word_length': 5.121710526315789, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Differentiating Your Friends for Scaling Online Social Networks

Online social networks (OSN) have been increasingly popular and attracted hundreds of millions of users, and they are usually deployed on cluster systems. A crucial problem for scaling online social networks is allocation and replication of user data records in cluster nodes with the objective of reducing access time and minimizing the costs of storage and intra-cluster communication. In these applications, users not only access their own data but also data of their friends. It is preferable that all data required by a user be placed in the same node so that access time can be reduced and communication overhead is small. The inherently complex social interactions between users, however, pose great challenges to the mechanism of data allocation and replication. Analyzing a large real dataset from OSNs, we observe that for over 90% of users, all their interactions are contributed by only 22.03% of their fiends, a Pareto distribution property. Thus, the majority of the interactions of a user are attributed to a small subset of the user's friends. Inspired by this observation, we first build a dynamic weighted social graph which differentiates the importance of social interactions between a user and the user's friends. Using this graph, we design WEPAR, an online partitioning and replication algorithm taking into account both read and write operations. WEPAR tries to place master data copies of users with frequent interactions in the same cluster node, and generates slave data copies for the users who tend to receive relatively more reading requests from a cluster-node. Extensive evaluations based on real datasets show that our approach significantly reduces storage cost and improves write response time with read response time comparable to that of existing algorithms.