title: Ð ÐµÐ°Ð»Ð¸Ð·Ð°ÑÐ¸Ñ Ð°ÑÐ¸Ð½Ñ ÑÐ¾Ð½Ð½Ð¾Ð³Ð¾ Ð²ÑÐ¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ ÑÐ¾Ð±ÑÑÐ¸Ð¹ Ð² Ð²ÑÑÐ¾ÐºÐ¾Ð½Ð°Ð³ÑÑÐ¶ÐµÐ½Ð½Ð¾Ð¼ ÑÐ°ÑÐ¿ÑÐµÐ´ÐµÐ»ÐµÐ½Ð½Ð¾Ð¼ Ð²ÐµÐ±-Ð¿ÑÐ¸Ð»Ð¾Ð¶ÐµÐ½Ð¸Ð¸
title: Ð²ÑÐ¿ÑÑÐºÐ½Ð°Ñ ÐºÐ²Ð°Ð»Ð¸ÑÐ¸ÐºÐ°ÑÐ¸Ð¾Ð½Ð½Ð°Ñ ÑÐ°Ð±Ð¾ÑÐ° Ð¼Ð°Ð³Ð¸ÑÑÑÐ°
titleType: Subtitle
title: Implementation of asynchronous event execution in a highly loaded distributed web-application
Creators: name: Ð¢ÑÐ·Ð¾Ð², ÐÑÐ¸Ð³Ð¾ÑÐ¸Ð¹
Publisher: name: Ð¡Ð°Ð½ÐºÑ-ÐÐµÑÐµÑÐ±ÑÑÐ³ÑÐºÐ¸Ð¹ Ð¿Ð¾Ð»Ð¸ÑÐµÑÐ½Ð¸ÑÐµÑÐºÐ¸Ð¹ ÑÐ½Ð¸Ð²ÐµÑÑÐ¸ÑÐµÑ ÐÐµÑÑÐ° ÐÐµÐ»Ð¸ÐºÐ¾Ð³Ð¾
Year: 2020
Subjects: Ð¾ÑÐ»Ð¾Ð¶ÐµÐ½Ð½Ð¾Ðµ Ð²ÑÐ¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ðµ ÑÐ¾Ð±ÑÑÐ¸Ð¹
Ð°ÑÐ¸Ð½Ñ ÑÐ¾Ð½Ð½Ð¾Ðµ Ð²ÑÐ¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ðµ ÑÐ¾Ð±ÑÑÐ¸Ð¹
ÑÐµÑÐ¸Ð°Ð»Ð¸Ð·Ð°ÑÐ¸Ñ
Ð²ÑÑÐ¾ÐºÐ¾Ð½Ð°Ð³ÑÑÐ¶ÐµÐ½Ð½Ð°Ñ ÑÐ¸ÑÑÐµÐ¼Ð°
ÑÐ°ÑÐ¿ÑÐµÐ´ÐµÐ»ÐµÐ½Ð½Ð°Ñ ÑÐ¸ÑÑÐµÐ¼Ð°
Ð²ÐµÐ±-Ð¿ÑÐ¸Ð»Ð¾Ð¶ÐµÐ½Ð¸Ðµ
Ð¾ÑÐµÑÐµÐ´Ñ ÑÐ¾Ð¾Ð±ÑÐµÐ½Ð¸Ð¹
ÑÐ¾ÑÐ¸Ð°Ð»ÑÐ½Ð°Ñ ÑÐµÑÑ
ÐºÐ¾Ð´Ð¾Ð³ÐµÐ½ÐµÑÐ°ÑÐ¸Ñ
delayed event execution
asynchronous event
execution
serialization
highload
distributed system
web-application
event queue
social network
code generation

description: Ð¢ÐµÐ¼Ð° Ð²ÑÐ¿ÑÑÐºÐ½Ð¾Ð¹ ÐºÐ²Ð°Ð»Ð¸ÑÐ¸ÐºÐ°ÑÐ¸Ð¾Ð½Ð½Ð¾Ð¹ ÑÐ°Ð±Ð¾ÑÑ: Â«Ð ÐµÐ°Ð»Ð¸Ð·Ð°ÑÐ¸Ñ Ð°ÑÐ¸Ð½ÑÑÐ¾Ð½Ð½Ð¾Ð³Ð¾ Ð²ÑÐ¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ ÑÐ¾Ð±ÑÑÐ¸Ð¹ Ð² Ð²ÑÑÐ¾ÐºÐ¾Ð½Ð°Ð³ÑÑÐ¶ÐµÐ½Ð½Ð¾Ð¼ ÑÐ°ÑÐ¿ÑÐµÐ´ÐµÐ»ÐµÐ½Ð½Ð¾Ð¼ Ð²ÐµÐ±-Ð¿ÑÐ¸Ð»Ð¾Ð¶ÐµÐ½Ð¸Ð¸Â».
ÐÐ°Ð½Ð½Ð°Ñ ÑÐ°Ð±Ð¾ÑÐ° Ð¿Ð¾ÑÐ²ÑÑÐµÐ½Ð° ÑÐµÐ°Ð»Ð¸Ð·Ð°ÑÐ¸Ð¸ Ð¾ÑÐ»Ð¾Ð¶ÐµÐ½Ð½Ð¾Ð³Ð¾ Ð²ÑÐ¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ ÑÐ¾Ð±ÑÑÐ¸Ð¹ Ð² Ð±Ð¾Ð»ÑÑÐ¾Ð¼, Ð²ÑÑÐ¾ÐºÐ¾Ð½Ð°Ð³ÑÑÐ¶ÐµÐ½Ð½Ð¾Ð¼ Ð¸ Ð·Ð½Ð°ÑÐ¸Ð¼Ð¾Ð¼ Ð´Ð»Ñ ÑÑÐ½ÐµÑÐ° Ð¿ÑÐ¾ÐµÐºÑÐµ â ÐÐ´Ð½Ð¾ÐºÐ»Ð°ÑÑÐ½Ð¸ÐºÐ¸, Ð½Ð° Ð¾ÑÐ½Ð¾Ð²Ðµ ÑÐ¾ÑÐ¾ÑÐ¾ Ð¿Ð¾ÐºÐ°Ð·Ð°Ð²ÑÐ¸Ñ ÑÐµÐ±Ñ Ð¿ÑÐ°ÐºÑÐ¸Ðº Ð¸Ð· Ð¾ÑÑÐ°ÑÐ»Ð¸. ÐÐ°Ð´Ð°ÑÐ¸, ÐºÐ¾ÑÐ¾ÑÑÐµ ÑÐµÑÐ°Ð»Ð¸ÑÑ Ð² ÑÐ¾Ð´Ðµ ÑÐ°Ð±Ð¾ÑÑ: ÐÐ½Ð°Ð»Ð¸Ð· ÑÑÑÐµÑÑÐ²ÑÑÑÐ¸Ñ ÑÐµÑÐµÐ½Ð¸Ð¹. ÐÑÑÐ»ÐµÐ´Ð¾Ð²Ð°Ð»Ð¸ÑÑ ÐºÐ°Ðº Ð²Ð½ÐµÑÐ½Ð¸Ðµ ÐºÐ¾Ð½ÐºÑÑÐµÐ½ÑÑ, ÑÐ°Ðº Ð¸ ÐºÐ¾Ð½ÐºÑÑÐµÐ½ÑÑ Ð²Ð¾ Ð²Ð½ÑÑÑÐµÐ½Ð½ÐµÐ¹ ÐºÐ¾Ð´Ð¾Ð²Ð¾Ð¹ Ð±Ð°Ð·Ðµ ÐÐ´Ð½Ð¾ÐºÐ»Ð°ÑÑÐ½Ð¸ÐºÐ¾Ð². Ð ÐµÐ°Ð»Ð¸Ð·Ð°ÑÐ¸Ñ ÑÐ²Ð¾ÐµÐ³Ð¾ ÑÐµÑÐµÐ½Ð¸Ñ, Ð¸Ð½ÑÐµÐ³ÑÐ¸ÑÐ¾Ð²Ð°Ð½Ð½Ð¾Ð³Ð¾ Ð² ÐºÐ¾Ð´Ð¾Ð²ÑÑ Ð±Ð°Ð·Ñ Ð¸ Ð¸Ð½ÑÑÐ°ÑÑÑÑÐºÑÑÑÑ ÐÐ´Ð½Ð¾ÐºÐ»Ð°ÑÑÐ½Ð¸ÐºÐ¾Ð². ÐÐ°Ð¿ÑÑÐº ÑÐµÑÐµÐ½Ð¸Ñ Ð½Ð° Ð¿ÑÐ¾Ð´Ð°ÐºÑÐµÐ½Ðµ.
Ð Ð°Ð±Ð¾ÑÐ° Ð¿ÑÐ¾Ð²ÐµÐ´ÐµÐ½Ð° Ð² ÐÐÐ Â«Mail.ru GroupÂ». ÐÑÐ»Ð¾ Ð¿ÑÐ¾Ð¸Ð·Ð²ÐµÐ´ÐµÐ½Ð¾ ÐºÐ¾Ð¼Ð°Ð½Ð´Ð½Ð¾Ðµ ÑÐµÑÑÐ¸ÑÐ¾Ð²Ð°Ð½Ð¸Ðµ Ð½Ð° ÑÐ°Ð·Ð½ÑÑ ÑÑÐ°Ð´Ð¸ÑÑ Ð·Ð°Ð¿ÑÑÐºÐ° ÑÐ°Ð·ÑÐ°Ð±Ð¾ÑÐ°Ð½Ð½Ð¾Ð³Ð¾ ÑÐµÑÐµÐ½Ð¸Ñ. ÐÐ¾Ð»ÑÑÐµÐ½Ñ ÑÐµÐ·ÑÐ»ÑÑÐ°ÑÑ Ð² Ð²Ð¸Ð´Ðµ ÑÑÐ°ÑÐ¸ÑÑÐ¸ÐºÐ¸ Ð¿Ð¾ Ð¸ÑÐ¿Ð¾Ð»ÑÐ·Ð¾Ð²Ð°Ð½Ð¸Ñ ÑÐµÑÐµÐ½Ð¸Ñ Ð´Ð»Ñ Ð²ÑÐ¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ Ð·Ð°Ð¿ÑÐ¾ÑÐ¾Ð² Ð¿Ð¾Ð»ÑÐ·Ð¾Ð²Ð°ÑÐµÐ»ÐµÐ¹ ÑÐ¾ÑÐ¸Ð°Ð»ÑÐ½Ð¾Ð¹ ÑÐµÑÐ¸.
Ð ÑÐµÐ·ÑÐ»ÑÑÐ°ÑÐµ Ð±ÑÐ»Ð¾ ÑÐ°Ð·ÑÐ°Ð±Ð¾ÑÐ°Ð½Ð¾ ÑÐµÑÐµÐ½Ð¸Ðµ, ÐºÐ¾ÑÐ¾ÑÐ¾Ðµ Ð¸ÑÐ¿Ð¾Ð»ÑÐ·ÑÐµÑ ÑÑÑÐµÐºÑÐ¸Ð²Ð½Ð¾Ðµ ÑÑÐ°Ð½Ð¸Ð»Ð¸ÑÐµ Ð¾ÑÐµÑÐµÐ´ÐµÐ¹ Ð´Ð»Ñ Ð¿ÐµÑÐµÐ´Ð°ÑÐ¸ Ð¸Ð½ÑÐ¾ÑÐ¼Ð°ÑÐ¸Ð¸ Ð¼ÐµÐ¶Ð´Ñ ÑÐ·Ð»Ð°Ð¼Ð¸ ÑÐ°ÑÐ¿ÑÐµÐ´ÐµÐ»ÐµÐ½Ð½Ð¾Ð¹ ÑÐ¸ÑÑÐµÐ¼Ñ, ÑÑÐ°Ð½Ð¸Ð»Ð¸ÑÐµ Ð´Ð°Ð½Ð½ÑÑ, Ð¾ÑÐ½Ð¾Ð²Ð°Ð½Ð½Ð¾Ðµ Ð½Ð° Cassandra 2.0 Ð´Ð»Ñ ÑÑÐ°Ð½ÐµÐ½Ð¸Ñ ÐºÐ¾Ð´Ð¾Ð³ÐµÐ½ÐµÑÐ¸ÑÐ¾Ð²Ð°Ð½Ð½ÑÑ ÑÐµÑÐ¸Ð°Ð»Ð¸Ð·Ð°ÑÐ¾ÑÐ¾Ð² Ð´Ð°Ð½Ð½ÑÑ. ÐÐ¾Ð»ÑÑÐ¸Ð²ÑÐµÐµÑÑ ÑÐµÑÐµÐ½Ð¸Ðµ ÑÐµÑÐ°ÐµÑ Ð¿ÑÐ¾Ð±Ð»ÐµÐ¼Ñ Ñ ÑÐµÑÐ¸Ð°Ð»Ð¸Ð·Ð°ÑÐ¸ÐµÐ¹ / Ð´ÐµÑÐµÑÐ¸Ð°Ð»Ð¸Ð·Ð°ÑÐ¸ÐµÐ¹ Ð´Ð°Ð½Ð½ÑÑ, ÐºÐ¾Ð³Ð´Ð° Ð²ÐµÑÑÐ¸Ð¸ Ð¿ÐµÑÐµÐ´Ð°Ð²Ð°ÐµÐ¼ÑÑ ÐºÐ»Ð°ÑÑÐ¾Ð² Ð½Ð° ÑÐ°Ð·Ð½ÑÑ ÑÐ·Ð»Ð°Ñ ÑÐ¸ÑÑÐµÐ¼Ñ ÑÐ°Ð·Ð½ÑÐµ, Ð° ÑÐ°ÐºÐ¶Ðµ Ð¿ÑÐµÐ²Ð¾ÑÑÐ¾Ð´Ð¸Ñ ÑÑÐ°ÑÑÑ Ð²Ð½ÑÑÑÐ¸ Ð¿ÑÐ¾ÐµÐºÑÐ½ÑÑ ÐºÐ¾Ð½ÐºÑÑÐµÐ½ÑÐ¾Ð², Ð³Ð»Ð°Ð²Ð½ÑÐ¼ Ð¾Ð±ÑÐ°Ð·Ð¾Ð¼, Ñ ÑÐ¾ÑÐºÐ¸ Ð·ÑÐµÐ½Ð¸Ñ Ð¿ÑÐ¾Ð¸Ð·Ð²Ð¾Ð´Ð¸ÑÐµÐ»ÑÐ½Ð¾ÑÑÐ¸ Ð¸ ÑÐ´Ð¾Ð±ÑÑÐ²Ð° Ð¸ÑÐ¿Ð¾Ð»ÑÐ·Ð¾Ð²Ð°Ð½Ð¸Ñ ÑÐ°Ð·ÑÐ°Ð±Ð¾ÑÑÐ¸ÐºÐ°Ð¼Ð¸.
description: The subject of the graduate qualification work is implementation of asynchronous event execution in high-loaded distributed web-application.
The given study is denoted to an implementation of a delayed event execution in Odnoklassniki [1] â a huge, high-loaded and fundamental project to Runet. The solution was developed based on the best-practices in industry. The paper set following goals: Analyzing of the existing solutions to a problem. Both external competitors and competitors in the internal code base of Odnoklassniki were investigated; Carring out the solution implementation inside the infrastructure of Odnoklassniki; Launching of the solution in production.
The work was fulfilled inside Ltd Â«Mail.ru GroupÂ». The team testing of a developed solution on different steps of its lifecycle was carried out. The results were obtained in the form of statistics on using the solution to handle social network users requests.
As a result, the data storage based on Cassandra 2.0 and used for an efficient queue storage to transfer information between the nodes of a distributed system was applied in order to store data serializers. It uses code generation for convenient serialization / deserialization of information, transmitted to perform events. The developed solution also solves the problem of data serialization / deserialization, when the versions of the transmitted classes on different nodes of the distributed system are different. It also beats old inner solutions, mainly, in terms of performance and convenience of usage for developers.