{"id":113298,"date":"2013-05-10T02:50:04","date_gmt":"2013-05-09T22:50:04","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=113298"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=113298","title":{"rendered":"<span class=\"post_title\">\u0418\u0437 \u0433\u043e\u0432\u043d\u043e\u043a\u043e\u0434\u0430 \u0432 Highload. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0422\u0410\u0420\u0410\u041dtool. 5 \u0440\u0435\u0446\u0435\u043f\u0442\u043e\u0432 \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t<img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/cd4\/3b0\/b2b\/cd43b0b2b27bf50c1984198a9023db52.gif\" align=\"left\"\/>\u041a\u043e \u043c\u043d\u0435 \u043e\u0431\u0440\u0430\u0442\u0438\u043b\u0441\u044f \u043e\u0434\u0438\u043d \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c \u0441\u0442\u0430\u0440\u0442\u0430\u043f\u0430 \u0441\u043e\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0438\u0433\u0440\u044b \u0441 \u043f\u0440\u043e\u0441\u044c\u0431\u043e\u0439 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0441\u0432\u043e\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u041d\u0430 \u044d\u0442\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u0431\u044b\u043b \u0441\u0434\u0435\u043b\u0430\u043d \u0438 \u0437\u0430\u043f\u0443\u0449\u0435\u043d \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u0418 \u043d\u0430\u0434\u043e \u043e\u0442\u0434\u0430\u0442\u044c \u0434\u043e\u043b\u0436\u043d\u043e\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c, \u0447\u0442\u043e \u043f\u0440\u043e\u0435\u043a\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0438 \u0434\u0430\u0436\u0435 \u043f\u0440\u0438\u043d\u043e\u0441\u0438\u043b \u043a\u0430\u043a\u0443\u044e-\u0442\u043e \u043f\u0440\u0438\u0431\u044b\u043b\u044c. \u041d\u043e, \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0440\u0435\u043a\u043b\u0430\u043c\u043d\u0443\u044e \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044e \u043d\u0435 \u0438\u043c\u0435\u043b\u043e \u0441\u043c\u044b\u0441\u043b\u043e, \u0442\u0430\u043a \u043a\u0430\u043a \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0435 \u0432\u044b\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u043b \u043d\u0438 \u043a\u0430\u043a\u0438\u0445 \u043d\u0430\u0433\u0440\u0443\u0437\u043e\u043a. \u0412\u0430\u043b\u0438\u043b\u0441\u044f MySQL (35% \u043e\u0448\u0438\u0431\u043e\u043a).<\/p>\n<p>  \u041a\u043e\u0434 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u2026 \u0412 \u043e\u0431\u0449\u0435\u043c \u0443 \u043c\u0435\u043d\u044f \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0432\u043f\u0435\u0447\u0430\u0442\u043b\u0435\u043d\u0438\u0435, \u0447\u0442\u043e \u043f\u0438\u0441\u0430\u043b \u0435\u0433\u043e \u043d\u0435\u0434\u043e\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u0441\u0442\u0443\u0434\u0435\u043d\u0442\u2026 \u0418 \u044d\u0442\u043e, \u043d\u0435\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0443\u0436\u0435 \u0431\u044b\u043b \u0441\u0434\u0435\u043b\u0430\u043d \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u044b\u0439 \u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u043d\u0433 \u0434\u0440\u0443\u0433\u0438\u043c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u043e\u043c. \u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435, \u0447\u0442\u043e \u0440\u0430\u0434\u043e\u0432\u0430\u043b\u043e, \u0442\u043e \u044d\u0442\u043e \u0442\u043e, \u0447\u0442\u043e \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f \u043a\u0430\u043a\u043e\u0439-\u043b\u0438\u0431\u043e \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a. \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u044d\u0442\u043e \u0432\u0435\u0447\u043d\u043e \u0444\u043b\u0435\u0439\u043c\u043e\u0432\u044b\u0439 \u0432\u043e\u043f\u0440\u043e\u0441: \u0418\u0438\u0441\u0443\u0441 \u0438\u043b\u0438 \u041c\u0430\u0433\u043e\u043c\u0435\u0434? \u0411\u044b\u0442\u044c \u0438\u043b\u0438 \u043d\u0435 \u0411\u044b\u0442\u044c? Unix \u0438\u043b\u0438 Windows? \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u043b\u0438 \u043d\u0435 \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c? \u0418\u041c\u0425\u041e, \u041c\u043e\u0451 \u043c\u043d\u0435\u043d\u0438\u0435: \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0438 \u0437\u0430\u0442\u043e\u0447\u0435\u043d\u044b \u043f\u043e\u0434 \u0443\u0437\u043a\u0438\u0439 \u043a\u0440\u0443\u0433 \u0442\u0438\u043f\u043e\u0432\u044b\u0445 \u0437\u0430\u0434\u0430\u0447. \u0421\u043e\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u2014 \u0437\u0430\u0434\u0430\u0447\u0430, \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u043d\u0435 \u0442\u0438\u043f\u043e\u0432\u0430\u044f\u2026 \u041d\u043e, \u0432 \u0446\u0435\u043b\u043e\u043c, \u043c\u043d\u0435 \u043f\u0440\u043e\u0435\u043a\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u043c \u0438 \u044f \u0440\u0435\u0448\u0438\u043b \u0432\u0437\u044f\u0442\u044c\u0441\u044f \u0437\u0430 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0435. \u041d\u0430 \u044d\u0442\u043e\u043c \u0432\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u0442\u044c\u2026<\/p>\n<p>  \u041d\u0430\u0432\u0435\u0440\u043d\u043e, \u043f\u0440\u043e \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438 \u0442\u0435\u043c\u0443 highload \u043d\u0435 \u043f\u0438\u0441\u0430\u043b \u0442\u043e\u043b\u044c\u043a\u043e \u043b\u0435\u043d\u0438\u0432\u044b\u0439 WEB \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a, \u0437\u043d\u0430\u044e\u0449\u0438\u0439 \u0445\u043e\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u0432 \u044d\u0442\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438. \u041f\u0440\u0438\u043d\u0446\u0438\u043f\u0438\u0430\u043b\u044c\u043d\u043e, \u0447\u0442\u043e-\u0442\u043e \u043d\u043e\u0432\u043e\u0433\u043e, \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0432\u044b \u043d\u0435 \u043d\u0430\u0439\u0434\u0451\u0442\u0435. \u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0438\u0434\u0435\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 highload \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432, \u0431\u044b\u043b\u0438 \u043c\u043d\u043e\u044e \u0438\u0437\u043b\u043e\u0436\u0435\u043d\u044b \u0432 \u0446\u0438\u043a\u043b\u0435 \u0441\u0442\u0430\u0442\u0435\u0439 <a href=\"http:\/\/highloadblog.ru\/articles\/12.html\">HighLoad. \u0422\u0440\u0438 \u043a\u0438\u0442\u0430.<\/a>. \u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u043a\u0430\u043a \u044f \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u043b \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c PHP \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f NoSQL \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 <a href=\"http:\/\/tarantool.org\">tarantool<\/a>, \u0442\u043e \u0414\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434 \u043a\u0430\u0442. <\/p>\n<p>  \u0425\u043e\u0442\u044f, \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0438\u0430\u043b\u044c\u043d\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u043e\u0435, \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0435\u0435 \u043f\u043e\u0434 \u0434\u0430\u043d\u043d\u044b\u0439 \u043a\u0440\u0443\u0433 \u0437\u0430\u0434\u0430\u0447, key\/value \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435, \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u043e\u0439 \u043b\u043e\u0433\u0438\u043a\u0438 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0430 \u043b\u044e\u0431\u043e\u043c \u0434\u0440\u0443\u0433\u043e\u043c \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432\u043e\u043c \u044f\u0437\u044b\u043a\u0435. <br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h5>\u0420\u0435\u0446\u0435\u043f\u0442 1. \u0410\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043a\u043e\u0434<\/h5>\n<p>  \u0412\u0441\u0451 \u0434\u043e \u0443\u0436\u0430\u0441\u0430 \u0431\u0430\u043d\u0430\u043b\u044c\u043d\u043e. \u041f\u0440\u043e \u044d\u0442\u043e \u043f\u0438\u0441\u0430\u043b\u0438 \u0441\u043e\u0442\u043d\u0438 \u0440\u0430\u0437 \u0434\u043e \u043c\u0435\u043d\u044f, \u0438 \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u0435\u0449\u0435 \u0441\u043e\u0442\u043d\u0438 \u0441\u0442\u0430\u0442\u0435\u0439\u2026 \u041e\u0434\u043d\u0430\u043a\u043e, \u00ab\u043c\u044b \u0441\u0430\u043c\u044b\u0435 \u0443\u043c\u043d\u044b\u0435\u00bb \u0438 \u0443\u043f\u043e\u0440\u043d\u043e \u043d\u0430\u0441\u0442\u0443\u043f\u0430\u0435\u043c \u043d\u0430 \u043e\u0434\u043d\u0438 \u0438 \u0442\u0435\u0436\u0435 \u0433\u0440\u0430\u0431\u043b\u0438. \u042f \u043d\u0435 \u043e\u0442\u043a\u0440\u043e\u044e \u0410\u043c\u0435\u0440\u0438\u043a\u0438, \u0435\u0441\u043b\u0438 \u0441\u043a\u0430\u0436\u0443, \u0447\u0442\u043e \u0441\u0430\u043c\u043e\u0435 \u0443\u0437\u043a\u043e\u0435 \u043c\u0435\u0441\u0442\u043e \u0432 99% \u0432\u0441\u0435\u0445 WEB \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u2014 \u044d\u0442\u043e \u0411\u0414. \u0410 \u043a\u0430\u043a\u043e\u0439 \u0438\u0437 \u044d\u0442\u043e\u0433\u043e \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u044b\u0432\u043e\u0434? <br \/>  \u041f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e, \u2014 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e <i><b>\u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432.<\/b><\/i>. \u0410 \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u0435\u0441\u043b\u0438 \u043f\u043e \u0445\u043e\u0434\u0443 \u043b\u043e\u0433\u0438\u043a\u0438 \u043f\u044f\u0442\u044c \u0440\u0430\u0437 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u0442\u0441\u044f \u043a\u043e\u0434:<\/p>\n<blockquote><p><font color=\"#000088\">$user<\/font>&nbsp;<font color=\"#339933\">=<\/font>&nbsp;<font color=\"#000000\">new<\/font>&nbsp;User<font color=\"#009900\">(<\/font><font color=\"#009900\">)<\/font><font color=\"#339933\">;<\/font><br \/>  <font color=\"#000088\">$userData<\/font>&nbsp;<font color=\"#339933\">=<\/font>&nbsp;<font color=\"#000088\">$user<\/font><font color=\"#339933\">-&gt;<\/font><font color=\"#004000\">getById<\/font><font color=\"#009900\">(<\/font><font color=\"#000088\">$uid<\/font><font color=\"#009900\">)<\/font><font color=\"#339933\">;<\/font><\/p><\/blockquote>\n<p>  \u041f\u0440\u0438 \u043f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432\u044b\u043b\u0435\u0437\u0430\u0435\u0442, \u0447\u0442\u043e \u043c\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043b\u0438 \u043f\u044f\u0442\u044c \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0445 \u00ab\u0441\u0435\u043b\u0435\u043a\u0442\u043e\u0432\u00bb: <font color=\"#993333\">SELECT<\/font>&nbsp;<font color=\"#66cc66\">*<\/font>&nbsp;FRON&nbsp;users&nbsp;<font color=\"#993333\">WHERE<\/font>&nbsp;id<font color=\"#66cc66\">=<\/font>$uid;<br \/>  \u0410 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442\u0441\u044f \u044d\u0442\u043e \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e: \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043dee (private) \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043f\u043e\u043b\u0435 \u0438\u043b\u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430 User:   <\/p>\n<blockquote><p>&nbsp;&nbsp;&nbsp;&nbsp;<font color=\"#000000\">class<\/font>&nbsp;User&nbsp;<font color=\"#009900\">{<\/font><br \/>  &nbsp;<br \/>  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color=\"#000000\">private<\/font>&nbsp;static&nbsp;<font color=\"#000088\">$userData<\/font>&nbsp;<font color=\"#339933\">=<\/font>&nbsp;<font color=\"#009900\">NULL<\/font><font color=\"#339933\">;<\/font><br \/>  &nbsp;<br \/>  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color=\"#000000\">private<\/font>&nbsp;<font color=\"#000000\">function<\/font>&nbsp;getById_loc<font color=\"#009900\">(<\/font><font color=\"#000088\">$uid<\/font><font color=\"#009900\">)<\/font>&nbsp;<font color=\"#009900\">{<\/font><br \/>  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color=\"#666666\">\/\/&nbsp;\u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0439&nbsp;\u043a\u043e\u0434&nbsp;\u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044f&nbsp;\u043a&nbsp;\u0411\u0414.&nbsp;<\/font><br \/>  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color=\"#009900\">}<\/font><br \/>  &nbsp;<br \/>  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color=\"#000000\">public<\/font>&nbsp;<font color=\"#000000\">function<\/font>&nbsp;getById<font color=\"#009900\">(<\/font><font color=\"#000088\">$uid<\/font><font color=\"#009900\">)<\/font>&nbsp;<font color=\"#009900\">{<\/font><br \/>  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color=\"#b1b100\">if<\/font>&nbsp;<font color=\"#009900\">(<\/font><font color=\"#000000\">self<\/font><font color=\"#339933\">::<\/font><font color=\"#000088\">$userData<\/font><font color=\"#009900\">)<\/font>&nbsp;<font color=\"#b1b100\">return<\/font>&nbsp;<font color=\"#000000\">self<\/font><font color=\"#339933\">::<\/font><font color=\"#000088\">$userData<\/font><font color=\"#339933\">;<\/font><br \/>  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color=\"#000000\">self<\/font><font color=\"#339933\">::<\/font><font color=\"#000088\">$userData<\/font>&nbsp;<font color=\"#339933\">=<\/font>&nbsp;<font color=\"#000088\">$this<\/font><font color=\"#339933\">-&gt;<\/font><font color=\"#004000\">getById_loc<\/font><font color=\"#009900\">(<\/font><font color=\"#000088\">$uid<\/font><font color=\"#009900\">)<\/font><font color=\"#339933\">;<\/font>&nbsp;<br \/>  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color=\"#b1b100\">return<\/font>&nbsp;<font color=\"#000000\">self<\/font><font color=\"#339933\">::<\/font><font color=\"#000088\">$userData<\/font><font color=\"#339933\">;<\/font><br \/>  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color=\"#009900\">}<\/font><br \/>  &nbsp;&nbsp;&nbsp;&nbsp;<font color=\"#009900\">}<\/font><\/p><\/blockquote>\n<p>  \u0412\u0442\u043e\u0440\u043e\u0435, \u0447\u0442\u043e \u0441\u0440\u0430\u0437\u0443 \u0431\u0440\u043e\u0441\u0430\u0435\u0442\u0441\u044f \u0432 \u0433\u043b\u0430\u0437\u0430. \u044d\u0442\u043e \u043a\u043e\u0433\u0434\u0430 \u0440\u044f\u0434\u043e\u043c \u0441\u0442\u043e\u044f\u0442 \u0434\u0432\u0430 \u043c\u0435\u0442\u043e\u0434\u0430:  <\/p>\n<blockquote><p><font color=\"#0000ff\">$User<\/font><font color=\"#339933\">-&gt;<\/font><font color=\"#004000\">updateBalance<\/font><font color=\"#009900\">(<\/font><font color=\"#0000ff\">$sum<\/font><font color=\"#009900\">)<\/font><font color=\"#339933\">;<\/font><br \/>  <font color=\"#0000ff\">$User<\/font><font color=\"#339933\">-&gt;<\/font><font color=\"#004000\">updateRating<\/font><font color=\"#009900\">(<\/font><font color=\"#0000ff\">$rating<\/font><font color=\"#009900\">)<\/font><font color=\"#339933\">;<\/font><br \/>  &nbsp;<\/p><\/blockquote>\n<p>  \u0447\u0442\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044e \u0434\u0432\u0443\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043a \u043e\u0434\u043d\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u043f\u043e\u0434\u0440\u044f\u0434, \u043e\u0434\u0438\u043d \u0437\u0430 \u0434\u0440\u0443\u0433\u0438\u043c:<br \/>  <font color=\"#993333\">UPDATE<\/font>&nbsp;users&nbsp;&nbsp;<font color=\"#993333\">SET<\/font>&nbsp;balance&nbsp;<font color=\"#66cc66\">=<\/font>&nbsp;balance&nbsp;<font color=\"#66cc66\">+<\/font>&nbsp;$sum&nbsp;<font color=\"#993333\">WHERE<\/font>&nbsp;id&nbsp;<font color=\"#66cc66\">=<\/font>&nbsp;$uid;<br \/>  <font color=\"#993333\">UPDATE<\/font>&nbsp;users&nbsp;&nbsp;<font color=\"#993333\">SET<\/font>&nbsp;rating&nbsp;<font color=\"#66cc66\">=<\/font>&nbsp;$rating&nbsp;&nbsp;<font color=\"#993333\">WHERE<\/font>&nbsp;id&nbsp;<font color=\"#66cc66\">=<\/font>&nbsp;$uid;<br \/>  \u0445\u043e\u0442\u044f, \u0435\u0441\u043b\u0438 \u0447\u0443\u0442\u044c-\u0447\u0443\u0442\u044c \u043f\u043e\u0448\u0435\u0432\u0435\u043b\u0438\u0442\u044c \u043c\u043e\u0437\u0433\u0430\u043c\u0438, \u0442\u043e \u043c\u044b \u0432\u043f\u043e\u043b\u043d\u0435 \u043c\u043e\u0433\u043b\u0438 \u0431\u044b \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0434\u0438\u043d \u0437\u0430\u043f\u0440\u043e\u0441:  <\/p>\n<blockquote><p><font color=\"#993333\">UPDATE<\/font>&nbsp;users&nbsp;<font color=\"#993333\">SET<\/font>&nbsp;<br \/>  &nbsp;&nbsp;balance&nbsp;<font color=\"#66cc66\">=<\/font>&nbsp;balance&nbsp;<font color=\"#66cc66\">+<\/font>&nbsp;$sum<font color=\"#66cc66\">,<\/font><br \/>  &nbsp;&nbsp;rating&nbsp;<font color=\"#66cc66\">=<\/font>&nbsp;$rating&nbsp;&nbsp;<br \/>  <font color=\"#993333\">WHERE<\/font>&nbsp;id&nbsp;<font color=\"#66cc66\">=<\/font>&nbsp;$uid;<br \/>  &nbsp;<\/p><\/blockquote>\n<p>  \u042d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0434\u0432\u0443\u043c\u044f \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c\u0438: \u043b\u0438\u0431\u043e \u043c\u044b \u043f\u0438\u0448\u0435\u043c \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u043c\u0435\u0442\u043e\u0434 $user-&gt;updateBalanceAndRating($sum, $rating), \u043b\u0438\u0431\u043e \u043c\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u043d\u0435\u0447\u0442\u043e \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u043e\u0435, \u043a\u0430\u043a \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u0441\u044f, \u043d\u0430 \u0432\u0441\u0435 \u0441\u043b\u0443\u0447\u0430\u0435 \u0436\u0438\u0437\u043d\u0438:  <\/p>\n<blockquote><p><font color=\"#0000ff\">$user<\/font><font color=\"#339933\">-&gt;<\/font><font color=\"#004000\">updateFieldAdd<\/font><font color=\"#009900\">(<\/font><font color=\"#0000ff\">&#8216;balance&#8217;<\/font><font color=\"#339933\">,<\/font>&nbsp;<font color=\"#0000ff\">$sum<\/font><font color=\"#009900\">)<\/font><font color=\"#339933\">;<\/font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color=\"#666666\">\/\/&nbsp;\u0437\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u043c&nbsp;\u043f\u043e\u043b\u0435,&nbsp;\u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044e&nbsp;add&nbsp;&#8212;&nbsp;\u0441\u043b\u043e\u0436\u0435\u043d\u0438\u0435,&nbsp;\u043e\u043f\u0435\u0440\u0430\u043d\u0434<\/font><br \/>  <font color=\"#0000ff\">$user<\/font><font color=\"#339933\">-&gt;<\/font><font color=\"#004000\">updateFieldAssign<\/font><font color=\"#009900\">(<\/font><font color=\"#0000ff\">&#8216;rating&#8217;<\/font><font color=\"#339933\">,<\/font>&nbsp;<font color=\"#0000ff\">$rating<\/font><font color=\"#009900\">)<\/font><font color=\"#339933\">;<\/font>&nbsp;&nbsp;&nbsp;<font color=\"#666666\">\/\/&nbsp;\u0437\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u043c&nbsp;\u043f\u043e\u043b\u0435,&nbsp;\u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044e&nbsp;assign&nbsp;&#8212;&nbsp;\u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u0435,&nbsp;\u043e\u043f\u0435\u0440\u0430\u043d\u0434<\/font><br \/>  <font color=\"#0000ff\">$user<\/font><font color=\"#339933\">-&gt;<\/font><font color=\"#004000\">execUpdate<\/font><font color=\"#009900\">(<\/font><font color=\"#009900\">)<\/font><font color=\"#339933\">;<\/font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color=\"#666666\">\/\/&nbsp;\u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c&nbsp;\u0438&nbsp;\u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u0437\u0430\u043f\u0440\u043e\u0441&nbsp;<\/font><\/p><\/blockquote>\n<p>  \u0422\u043e\u043b\u044c\u043a\u043e \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u0435 \u044d\u0442\u0438\u0445 \u0434\u0432\u0443\u0445 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b\u043e \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043a \u0411\u0414 \u0441 10-12 \u0434\u043e 3-5. \u041d\u043e \u0435\u0441\u043b\u0438 \u0447\u0435\u0441\u0442\u043d\u043e, \u043a\u043e\u0434 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434 \u043f\u0440\u0435\u0434\u0441\u0442\u043e\u0438\u0442 \u0435\u0449\u0435 \u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u0442\u044c \u0438 \u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u0442\u044c. \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u0425\u0430\u0431\u0440\u043e\u044e\u0437\u0435\u0440\u043e\u0432 \u0434\u0430\u043b\u0435\u043a\u043e \u043d\u0435 \u043b\u0443\u0437\u0435\u0440\u044b, \u043d\u043e \u043f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u0430\u043d\u0430\u043b\u0438\u0437 \u0432\u0441\u0435\u0433\u0434\u0430 \u00ab\u0411\u043e\u0433 \u043d\u0430\u043c \u0432 \u043f\u043e\u043c\u043e\u0449\u044c\u00bb.<\/p>\n<h5>\u0420\u0435\u0446\u0435\u043f\u0442 2. \u041a\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/h5>\n<p>  \u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u041a\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u043d\u0430\u0434\u0435\u044e\u0441\u044c \u0440\u0430\u0437\u044a\u0435\u0441\u043d\u044f\u0442\u044c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e. \u041a\u0430\u043a \u043f\u0438\u0441\u0430\u043b \u0432 \u0441\u0432\u043e\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u0440\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0443 highload \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0414\u0438\u043c\u0430 \u041a\u043e\u0442\u0435\u0440\u043e\u0432: \u00ab\u043d\u0430\u0434\u043e \u043a\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0451, \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e\u00bb. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435, \u0431\u044b\u043b\u0438 \u0440\u043e\u0431\u043a\u0438\u0435 \u043f\u043e\u043f\u044b\u0442\u043a\u0438 \u043a\u0430\u043a\u043e\u0433\u043e-\u0442\u043e \u043a\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u041e\u0434\u043d\u0430\u043a\u043e, \u0432\u0441\u0435 \u0432\u044b\u0448\u043b\u043e \u043f\u043e \u0427\u0435\u0440\u043d\u043e\u043c\u044b\u0440\u0434\u0438\u043d\u0443: \u0445\u043e\u0442\u0435\u043b\u0438 \u043a\u0430\u043a \u043b\u0443\u0447\u0448\u0435, \u0430 \u0437\u0430\u043a\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043b\u0438, \u043d\u0435 \u0442\u043e, \u0447\u0442\u043e \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f ;).<\/p>\n<p>  \u041a\u0430\u043a \u0431\u044b\u043b\u043e \u043e\u0442\u043c\u0435\u0447\u0435\u043d\u043e\u043d\u043e \u0432\u044b\u0448\u0435, \u0447\u0442\u043e\u0431 \u0441\u043d\u0438\u0437\u0438\u0442\u044c \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u043d\u0430 \u0411\u0414, \u043d\u0430\u0434\u043e \u0441\u043d\u0438\u0437\u0438\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. \u0410 \u043a\u0430\u043a \u0438\u0445 \u0441\u043d\u0438\u0437\u0438\u0442\u044c? \u0414\u0430 \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e \u2014 \u0447\u0430\u0441\u0442\u044c \u043d\u0435\u0438\u0437\u043c\u0435\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 (\u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0438 \u043f\u043e \u044e\u043d\u0438\u0442\u0430\u043c, \u0442\u0440\u0438\u0431\u0443\u0442\u0430\u043c \u0438 \u043e\u0440\u0443\u0436\u0438\u044e ) \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u043d\u0435\u0441\u0442\u0438 \u0438\u0437 \u0411\u0414, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0438. \u041a\u043e\u043d\u0444\u0438\u0433\u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043b\u0438\u0431\u043e \u0432 XML, \u0438 \u043f\u0440\u0430\u0432\u0438\u0442\u0441\u044f \u0434\u0435\u0432\u043e\u0447\u043a\u0430\u043c\u0438 \u0438\u0437 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0433\u0435\u0439\u043c\u043f\u043b\u0435\u044f \u0432 \u043b\u044e\u0431\u043e\u043c XML \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0435, \u043b\u0438\u0431\u043e \u0432 \u0443\u0436\u0435 \u0433\u043e\u0442\u043e\u0432\u043e\u043c \u0432\u0438\u0434\u0435: \u0432 \u0420\u041d\u0420 \u043c\u0430\u0441\u0441\u0438\u0432\u0435 \u2014 \u0435\u0441\u043b\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0433\u0435\u0439\u043c\u043f\u043b\u0435\u044f \u0438 \u043a\u043e\u0434\u0430 \u2014 \u043e\u0434\u0438\u043d \u0447\u0435\u043b\u043e\u0432\u0435\u043a. \u041f\u0430\u0440\u0441\u0438\u043d\u0433XML \u043d\u0430 \u043b\u0435\u0442\u0443 \u2014 \u0432\u0435\u0449\u044c \u0442\u044f\u0436\u0435\u043b\u0430\u044f, \u043f\u043e \u044d\u0442\u043e\u043c\u0443 \u044f \u0434\u0435\u043b\u0430\u044e \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 XSLT \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432 PHP \u043a\u043e\u0434 (\u0432 \u0432\u0432\u0438\u0434\u0435 \u0430\u0441\u0441\u043e\u0446\u0438\u0430\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u043c\u0430\u0441\u0441\u0438\u0432\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438 \u0433\u0440\u0443\u0437\u0438\u0442\u0441\u044f \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c). \u041e\u0434\u043d\u0430\u043a\u043e, \u043f\u043e\u0441\u043b\u0435 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 XML \u043a\u043e\u043d\u0444\u0438\u0433-\u0444\u0430\u0439\u043b\u0435, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442 XSLT- \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u043b\u0438 \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u0443\u044e \u0443\u0442\u0438\u043b\u0438\u0442\u0443. \u0414\u0430, \u044d\u0442\u043e \u043d\u0435 \u043a\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u044d\u0442\u043e \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0435, \u0438 \u0435\u0433\u043e \u043d\u0435 \u0441\u0442\u043e\u0438\u0442 \u0432\u044b\u0434\u0435\u043b\u044f\u0442\u044c \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u0446\u0435\u043f\u0442, \u043d\u043e \u0438 \u0437\u0430\u0431\u044b\u0432\u0430\u0442\u044c \u043f\u0440\u043e \u043d\u0435\u0433\u043e \u043d\u0435 \u0441\u0442\u043e\u0438\u0442. <\/p>\n<p>  \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0437\u0430\u043f\u0438\u0445\u043d\u0443\u0432 \u0432\u0441\u0435 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0438 \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0438, \u043c\u044b \u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0430\u0435\u043c\u0441\u044f \u0435\u0449\u0435 \u043e\u0442 \u043f\u0430\u0440\u044b-\u0442\u0440\u043e\u0439\u043a\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. \u041d\u0443, \u0447\u0442\u043e \u2014 \u0441\u0442\u0430\u043b\u043e \u043b\u0435\u0433\u0447\u0435?.. \u041f\u043e \u043a\u0440\u0430\u0439\u043d\u0435\u0439 \u043c\u0435\u0440\u0435, \u043f\u043e\u0441\u043b\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0440\u0435\u0446\u0435\u043f\u0442\u043e\u0432 1 \u0438 2 \u0431\u0430\u0437\u0430 \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043b\u0430 \u043f\u0430\u0434\u0430\u0442\u044c. \u041d\u0443 \u0445\u043e\u0442\u044c \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u2026<\/p>\n<h5>\u0420\u0435\u0446\u0435\u043f\u0442 3. \u0410\u043d\u0430\u043b\u0438\u0437 \u0434\u0430\u043d\u043d\u044b\u0445<\/h5>\n<p>  \u0422\u0443\u0442 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0434 \u0438 \u043f\u043e\u0434\u0443\u043c\u0430\u0442\u044c\u2026 \u0418 \u0435\u0441\u0442\u044c, \u043a\u0441\u0442\u0430\u0442\u0438, \u043d\u0430\u0434 \u0447\u0435\u043c\u2026 \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u044f\u0441\u043d\u0438\u0442\u044c, \u043a\u0430\u043a\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043c\u0435\u043d\u044f\u0435\u0442, \u043a\u0430\u043a\u0438\u0435 \u0438\u0437 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0435\u0438\u0437\u043c\u0435\u043d\u043d\u044b, \u0447\u0442\u043e \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0447\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e. \u0422\u0443\u0442 \u043d\u0430\u0434\u043e \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0431\u0435\u0436\u0430\u0442\u044c\u0441\u044f \u043f\u043e \u043a\u043e\u0434\u0443 \u0438 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0432 \u043b\u043e\u0433\u0438\u043a\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<p>  \u0412 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435, \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0447\u0430\u0441\u0442\u043e \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u043c\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439 \u0431\u044b\u043b \u0438\u0433\u0440\u043e\u0432\u043e\u0439 \u043f\u0440\u043e\u0444\u0438\u043b\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u043f\u043e\u0434\u0430\u0440\u043a\u0438 \u0438 \u043d\u0430\u0433\u0440\u0430\u0434\u044b. \u0412\u0441\u0435 \u044d\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0431\u044b\u043b\u0438 \u043f\u043e\u043c\u0435\u0449\u0435\u043d\u044b \u0432 NoSQL \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435, \u0430 \u0432\u0441\u0435 \u043f\u0440\u043e\u0447\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u043f\u043b\u0430\u0442\u0435\u0436\u0430\u043c\u0438, \u043e\u0441\u0442\u0430\u043b\u0438\u0441\u044c \u0432 MySQL. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 NoSQL \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 \u0431\u044b\u043b \u0432\u044b\u0431\u0440\u0430\u043d tarantool.<\/p>\n<h5>\u0410 \u0432\u0441\u0435 \u0436\u0435 \u2014 \u043f\u043e\u0447\u0435\u043c\u0443 \u0422\u0410\u0420\u0410\u041dtool ?<\/h5>\n<p>  \u041d\u0430 \u041a\u043e\u043d\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0438 Highload++ 2011 \u0420\u0443\u043a\u043e\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 Tarantool \u041a\u043e\u0441\u0442\u044e \u041e\u0441\u0438\u043f\u043e\u0432\u0430 \u0441\u043f\u0440\u043e\u0441\u0438\u043b\u0438: <br \/>   \u2014 \u0410 \u043f\u043e\u0447\u0435\u043c\u0443 \u0443 \u0412\u0430\u0441 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0442\u0430\u043a\u043e\u0435 \u044f\u0434\u043e\u0432\u0438\u0442\u043e\u0435?<br \/>   \u2014 \u041d\u0443, \u043c\u043e\u0436\u0435\u0442\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435, \u043a\u0430\u043a \u0442\u0430\u0440\u0430\u043d \u0438 tools, \u0442.\u0435. \u043a\u0430\u043a \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e (\u0442\u0443\u043b\u0437\u0443) \u0442\u0430\u0440\u0430\u043d\u0430 \u0434\u043b\u044f \u0432\u0430\u0448\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432. <\/p>\n<p>  \u0418\u0442\u0430\u043a, \u0444\u0430\u043a\u0442\u043e\u0440\u0430\u043c\u0438, \u0432\u043b\u0438\u044f\u044e\u0449\u0438\u043c\u0438 \u043d\u0430 \u0432\u044b\u0431\u043e\u0440 NoSQL \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 \u0431\u044b\u043b\u0438:<br \/>   \u2014 \u041c\u043e\u0451 \u043b\u0438\u0447\u043d\u043e\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u0441\u0442\u0432\u043e \u0441 \u0442\u0438\u043c\u043b\u0438\u0434\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u041a\u043e\u0441\u0442\u0435\u0439 \u041e\u0441\u0438\u043f\u043e\u0432\u044b\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0431\u0435\u0449\u0430\u043b \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u0438 \u043a\u043e\u043d\u0441\u0443\u043b\u044c\u0442\u0430\u0446\u0438\u044e<br \/>   \u2014 \u041e\u043f\u044b\u0442 \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435. \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0435 \u0432\u0437\u043b\u0435\u0442\u0435\u043b :(, \u043d\u043e \u0431\u044b\u043b\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e.<br \/>   \u2014 \u0418\u0437\u0443\u0447\u0435\u043d\u0438\u0435 \u043d\u043e\u0432\u044b\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 tarantool, \u043f\u0440\u043e\u0448\u043b\u043e \u043f\u043e\u0447\u0442\u0438 \u0434\u0432\u0430 \u0433\u043e\u0434\u0430 \u0441 \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u0435\u0433\u043e \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f<br \/>   \u2014 \u0412\u044b\u0441\u043e\u043a\u0430\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0434\u0430\u043d\u043d\u043e\u0433\u043e NoSQL \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 \u0438 \u0432\u044b\u0441\u043e\u043a\u0430\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0445.<br \/>   \u2014 \u041f\u0435\u0440\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u043d\u043e\u0441\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0445, \u043f\u0440\u0438 \u043f\u0430\u0434\u0435\u043d\u0438\u0438 \u043d\u0430 \u0434\u0438\u0441\u043a\u0435 \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u043a\u043e\u043f\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0432\u0441\u0435\u0433\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u043d\u044f\u0442\u044c. <br \/>   \u2014 \u043d\u0443, \u0438 \u0435\u0441\u043b\u0438 \u0431\u044b\u0442\u044c \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0441\u043a\u0440\u043e\u043c\u043d\u044b\u043c, \u0442\u043e \u0441\u0430\u043c \u044f \u044f\u0432\u043b\u044f\u044e\u0441\u044c \u0430\u0432\u0442\u043e\u0440\u043e\u043c \u043f\u0435\u0440\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 PHP \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u0434\u043b\u044f Tarantool, \u0442\u0430\u043a \u0447\u0442\u043e \u043f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0441\u043c\u043e\u0433\u0443 \u0447\u0442\u043e-\u0442\u043e \u043f\u0440\u043e\u043f\u0430\u0442\u0447\u0438\u0442\u044c \u0438\u043b\u0438 \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0431\u0430\u0433\u0443.<\/p>\n<p>  \u0410, \u0435\u0441\u043b\u0438 \u0431\u044b\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0441\u0435\u0440\u044c\u0435\u0437\u043d\u044b\u043c, \u043c\u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0440\u0430\u0432\u044f\u0442\u0441\u044f \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u044d\u0442\u043e\u0433\u043e NoSQL \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 \u0434\u0430\u043d\u043d\u044b\u0445: \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u0442\u043e\u0440\u0438\u0447\u043d\u044b\u0445 \u043a\u043b\u044e\u0447\u0435\u0439 \u0438 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e\u043c \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0445\u0440\u0430\u043d\u0438\u043c\u044b\u0445 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440. <\/p>\n<h5>\u0410\u043d\u0430\u043b\u0438\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 (\u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435)<\/h5>\n<p>  \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u043e\u0444\u0438\u043b\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0442\u0430\u0431\u043b\u0438\u0446\u0430 users. \u0412 \u043d\u0435\u0439 \u0435\u0441\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c\u044b\u0435 \u0438 \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435. \u041a \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c\u044b\u043c \u0434\u0430\u043d\u043d\u044b\u043c \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0441\u044f: \u0431\u0430\u043b\u0430\u043d\u0441, \u0440\u0435\u0439\u0442\u0438\u043d\u0433, pvp-\u043e\u0447\u043a\u0438, \u044e\u043d\u0438\u0442\u044b, \u0448\u0430\u0433\u0438 \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b\u0430 \u0438 \u043f\u0440.<br \/>  \u041a \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c\u044b\u043c \u0434\u0430\u043d\u043d\u044b\u043c \u043e\u0442\u043d\u043e\u0441\u044f\u0442\u0441\u044f social_id, \u043b\u043e\u0433\u0438\u043d, url \u0430\u0432\u0430\u0442\u0430\u0440\u0430, \u043b\u0438\u0447\u043d\u044b\u0435 \u043a\u043e\u0434\u044b \u0438 \u043f\u0440\u2026 \u0421\u0440\u0435\u0434\u0438 \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0435\u0441\u0442\u044c \u0447\u0430\u0441\u0442\u043e \u043c\u0435\u043d\u044f\u0435\u043c\u044b\u0435 \u0438 \u0440\u0435\u0434\u043a\u043e \u043c\u0435\u043d\u044f\u0435\u043c\u044b\u0435. \u041e\u0434\u043d\u0430\u043a\u043e, \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0447\u0430\u0441\u0442\u043e.<\/p>\n<p>  \u0412\u044b\u0434\u0435\u043b\u044f\u0435\u043c \u0447\u0430\u0441\u0442\u043e \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u043c\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435. \u0418\u043c\u0435\u043d\u043d\u043e \u0438\u0445 \u043c\u044b \u0438 \u0431\u0443\u0434\u0435\u043c \u043a\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 tarantool. \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u0440\u043e \u0441\u0430\u043c\u043e NoSQL \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435\u2026<\/p>\n<h5>\u0422\u0410\u0420\u0410\u041dtool. \u041a\u0440\u0430\u0442\u043a\u0438\u0439 \u043e\u0431\u0437\u043e\u0440<\/h5>\n<p>  Tarantool \u2014 \u044d\u0442\u043e, \u043a\u0430\u043a \u0443\u0436\u0435 \u0431\u044b\u043b\u043e \u0432\u044b\u0448\u0435 \u0441\u043a\u0430\u0437\u0430\u043d\u043e, \u0432\u044b\u0441\u043e\u043a\u043e\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 key\/value NoSQL \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435. \u0412\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438, \u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u0432 \u0432\u0438\u0434\u0435 \u043a\u043e\u0440\u0442\u0435\u0436\u0435\u0439, \u043f\u043e \u044d\u0442\u043e\u043c\u0443 \u0438\u0445 \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0435 \u043f\u043e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u043d\u0435 \u0443\u0441\u0442\u0443\u043f\u0430\u0435\u0442 redis \u0438\u043b\u0438 \u0447\u0443\u0442\u044c \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0435\u0435 (\u043d\u0430 6-7 \u043c\u0438\u043b\u0438\u0441\u0435\u043a\u0443\u043d\u0434 \u043d\u0430 1000 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439) memcached. <\/p>\n<p>  \u0418 \u0432\u0441\u0435-\u0442\u0430\u043a\u0438, \u043e\u0442\u043c\u0435\u0442\u0438\u043c, \u0447\u0442\u043e Tarantool \u2014 \u044d\u0442\u043e \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u0434\u0430\u043d\u043d\u044b\u0445, \u0430 \u043d\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043a\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u043f\u0430\u043c\u044f\u0442\u0438, \u0442\u0438\u043f\u0430 memcache. \u0412\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438, \u043d\u043e \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0442\u0441\u044f (\u0441\u0438\u043d\u043a\u0443\u044e\u0442\u0441\u044f \u043e\u0442 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u0430 sync) \u0432 \u0444\u0430\u0439\u043b\u044b (\u0441\u043d\u0430\u043f\u0430\u0445 0000..01.snap ). \u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e memcached &#038; redis, tarantool \u0438\u043c\u0435\u0435\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438:<br \/>   \u2014 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0441\u0442\u044c \u043d\u0430\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432\u0442\u043e\u0440\u0438\u0447\u043d\u044b\u0445 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432 \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0435<br \/>   \u2014 \u0438\u043d\u0434\u0435\u043a\u0441\u044b \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0441\u043e\u0441\u0442\u0430\u0432\u043d\u044b\u043c\u0438 <br \/>   \u2014 \u0438\u043d\u0434\u0435\u043a\u0441\u044b \u043c\u043e\u0433\u0443\u0442 \u0438\u043c\u0435\u0442\u044c \u0442\u0438\u043f HASH, TREE \u0438\u043b\u0438 BITSET. \u041f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u0435 GEO \u0438\u043d\u0434\u0435\u043a\u0441\u0430.<br \/>   \u2014 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u0435\u043d\u0438\u0435 \u0432\u044b\u0431\u043e\u0440\u043e\u043a \u043f\u043e \u043e\u0434\u043d\u043e\u043c\u0443 \u0438\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u043c \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e. <br \/>   \u2014 \u0438\u0437\u044a\u044f\u0442\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0447\u0430\u0441\u0442\u044f\u043c\u0438 (\u0430\u043d\u0430\u043b\u043e\u0433 LIMIT\/OFFSET).<\/p>\n<p>  Tarantool \u043e\u043f\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u044b \u0432 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 (space). <b>\u041f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e<\/b> \u2014 \u044d\u0442\u043e \u0430\u043d\u0430\u043b\u043e\u0433 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0432 MySQL. \u0412 tarantool \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0446\u0438\u0444\u0440\u043e\u0432\u0430\u044f \u043d\u0443\u043c\u0435\u0440\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432 (0, 1, 2, 3 &#8230;). \u0412 \u043e\u0431\u043e\u0437\u0440\u0438\u043c\u043e\u043c \u0431\u0443\u0434\u0443\u0449\u0435\u043c \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u043c\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 (\u0430\u043d\u0430\u043b\u043e\u0433 \u0438\u043c\u0435\u043d \u0442\u0430\u0431\u043b\u0438\u0446 \u0432 MySQL.).<\/p>\n<p>  \u041d\u0430 \u043a\u0430\u0436\u0434\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442\u044c\u0441\u044f \u0438\u043d\u0434\u0435\u043a\u0441. \u0418\u043d\u0434\u0435\u043a\u0441\u044b \u043c\u043e\u0433\u0443\u0442 \u043d\u0430\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0442\u044c\u0441\u044f, \u043a\u0430\u043a \u043d\u0430 \u0447\u0438\u0441\u043b\u043e\u0432\u043e\u0435 (int32 \u0438\u043b\u0438 int64), \u0442\u0430\u043a \u0438 \u043d\u0430 \u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u043e\u0435 \u043f\u043e\u043b\u0435. \u0422\u0430\u043a \u0436\u0435, \u043a\u0430\u043a \u0438 \u0441 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430\u043c\u0438, \u0432 tarantool \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0430 \u0446\u0438\u0444\u0440\u043e\u0432\u0430\u044f \u043d\u0443\u043c\u0435\u0440\u0430\u0446\u0438\u044f \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432.<\/p>\n<p>  \u041e\u0431\u043c\u0435\u043d \u043c\u0435\u0436\u0434\u0443 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u043c \u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 <b>\u043a\u043e\u0440\u0442\u0435\u0436\u0430\u043c\u0438<\/b>. \u041a\u043e\u0440\u0442\u0435\u0436- \u044d\u0442\u043e \u0430\u043d\u0430\u043b\u043e\u0433 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 MySQL. \u0412 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0435 \u043f\u043e\u043d\u044f\u0442\u0438\u0435 \u043a\u043e\u0440\u0442\u0435\u0436 \u2014 \u044d\u0442\u043e \u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0434\u043b\u0438\u043d\u044b n. \u041a\u0430\u0436\u0434\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043a\u043e\u0440\u0442\u0435\u0436\u0430, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 <b>\u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0434\u0430\u043d\u043d\u044b\u0445<\/b> \u0438\u043b\u0438 \u043f\u043e\u043b\u0435. \u041f\u0440\u0438\u043d\u0446\u0438\u043f\u0438\u0430\u043b\u044c\u043d\u043e, \u0442\u0430\u0440\u0430\u043d\u0442\u0443\u043b \u043d\u0435 \u0440\u0430\u0437\u043b\u0438\u0447\u0430\u0435\u0442 \u0442\u0438\u043f\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u043b\u0435\u0439. \u0414\u043b\u044f \u043d\u0435\u0433\u043e \u2014 \u044d\u0442\u043e \u043d\u0430\u0431\u043e\u0440 \u0431\u0430\u0439\u0442. \u041d\u043e \u0435\u0441\u043b\u0438 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0438\u043d\u0434\u0435\u043a\u0441, \u0442.\u0435. \u043d\u0430\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u043c \u0438\u043d\u0434\u0435\u043a\u0441 \u043d\u0430 \u044d\u0442\u043e \u043f\u043e\u043b\u0435, \u0442\u043e \u0435\u0433\u043e \u0442\u0438\u043f \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0442\u0438\u043f\u0443 \u043f\u043e\u043b\u044f. \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0435\u0449\u0435 \u0434\u0440\u0443\u0433\u043e\u0435 \u043d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u0440\u0442\u0435\u0436\u0430: \u0442\u0430\u043f\u043b (tuple). <\/p>\n<p>  \u0412\u0441\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u044b \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u043e- \u0432\u043e\u0441\u043f\u0440\u0438\u043d\u0438\u043c: YAML. \u041f\u0440\u0438\u043c\u0435\u0440 \u0447\u0430\u0441\u0442\u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0430:<br \/>  space<font color=\"#66cc66\">[<\/font><font color=\"#cc66cc\">0<\/font><font color=\"#66cc66\">]<\/font>.enabled&nbsp;<font color=\"#66cc66\">=<\/font>&nbsp;<font color=\"#cc66cc\">1<\/font>&nbsp;<br \/>  space<font color=\"#66cc66\">[<\/font><font color=\"#cc66cc\">0<\/font><font color=\"#66cc66\">]<\/font>.index<font color=\"#66cc66\">[<\/font><font color=\"#cc66cc\">0<\/font><font color=\"#66cc66\">]<\/font>.<font color=\"#b1b100\">type<\/font>&nbsp;<font color=\"#66cc66\">=<\/font>&nbsp;<font color=\"#ff0000\">&quot;HASH&quot;<\/font><br \/>  space<font color=\"#66cc66\">[<\/font><font color=\"#cc66cc\">0<\/font><font color=\"#66cc66\">]<\/font>.index<font color=\"#66cc66\">[<\/font><font color=\"#cc66cc\">0<\/font><font color=\"#66cc66\">]<\/font>.unique&nbsp;<font color=\"#66cc66\">=<\/font>&nbsp;<font color=\"#cc66cc\">1<\/font><br \/>  space<font color=\"#66cc66\">[<\/font><font color=\"#cc66cc\">0<\/font><font color=\"#66cc66\">]<\/font>.index<font color=\"#66cc66\">[<\/font><font color=\"#cc66cc\">0<\/font><font color=\"#66cc66\">]<\/font>.key_field<font color=\"#66cc66\">[<\/font><font color=\"#cc66cc\">0<\/font><font color=\"#66cc66\">]<\/font>.fieldno&nbsp;<font color=\"#66cc66\">=<\/font>&nbsp;<font color=\"#cc66cc\">0<\/font><br \/>  space<font color=\"#66cc66\">[<\/font><font color=\"#cc66cc\">0<\/font><font color=\"#66cc66\">]<\/font>.index<font color=\"#66cc66\">[<\/font><font color=\"#cc66cc\">0<\/font><font color=\"#66cc66\">]<\/font>.key_field<font color=\"#66cc66\">[<\/font><font color=\"#cc66cc\">0<\/font><font color=\"#66cc66\">]<\/font>.<font color=\"#b1b100\">type<\/font>&nbsp;<font color=\"#66cc66\">=<\/font>&nbsp;<font color=\"#ff0000\">&quot;NUM&quot;<\/font><br \/>  \u0412 \u043a\u043e\u043d\u0444\u0438\u0433\u0435 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u043f\u0435\u0440\u0432\u0438\u0447\u043d\u044b\u0439 \u0438 \u0432\u0442\u043e\u0440\u0438\u0447\u043d\u044b\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u044b \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430. \u0415\u0441\u043b\u0438 \u043c\u044b \u0434\u0435\u043b\u0430\u0435\u043c \u0432\u044b\u0431\u043e\u0440\u043a\u0443 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e PRIMARY KEY, \u0442\u043e \u0432\u043f\u043e\u043b\u043d\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0435\u0440\u0432\u0438\u0447\u043d\u043e\u0433\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0430 (\u0441\u043c. \u043f\u0440\u0438\u043c\u0435\u0440 \u0432\u044b\u0448\u0435). \u0415\u0441\u043b\u0438 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0441\u0440\u0435\u0434\u0438 \u043d\u0430\u0448\u0438\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043b\u0443\u0447\u0448\u0438\u0445 \u043f\u043e \u0440\u0435\u0439\u0442\u0438\u043d\u0433\u0443 \u0438\u043b\u0438 pvp-\u0431\u043e\u044f\u043c, \u0442\u043e \u043d\u0430 \u044d\u0442\u0438 \u043f\u043e\u043b\u044f \u043d\u0430\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u043c \u0432\u0442\u043e\u0440\u0438\u0447\u043d\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441. \u041f\u0443\u0441\u0442\u044c \u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432\u0442\u043e\u0440\u043e\u0435 \u043f\u043e\u043b\u0435 (fieldno = 1, \u043e\u0442\u0441\u0447\u0435\u0442 \u043e\u0442 \u043d\u043e\u043b\u044f) int32_t \u2014 \u0440\u0435\u0439\u0442\u0438\u043d\u0433: <\/p>\n<p>  space<font color=\"#66cc66\">[<\/font><font color=\"#cc66cc\">0<\/font><font color=\"#66cc66\">]<\/font>.index<font color=\"#66cc66\">[<\/font><font color=\"#cc66cc\">1<\/font><font color=\"#66cc66\">]<\/font>.<font color=\"#b1b100\">type<\/font>&nbsp;<font color=\"#66cc66\">=<\/font>&nbsp;<font color=\"#ff0000\">&quot;TREE&quot;<\/font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color=\"#66cc66\">\/\/<\/font>&nbsp;\u0434\u0435\u043b\u0430\u0435\u0442&nbsp;\u0442\u0438\u043f&nbsp;TREE,&nbsp;\u0447\u0442\u043e&nbsp;\u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442&nbsp;\u0434\u0435\u043b\u0430\u0442\u044c&nbsp;\u0432\u044b\u0431\u043e\u0440\u043a\u0438&nbsp;\u043d\u0430&nbsp;\u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438&nbsp;\u0431\u043e\u043b\u044c\u0448\u0435&nbsp;\u0438&nbsp;\u043c\u0435\u043d\u044c\u0448\u0435<br \/>  space<font color=\"#66cc66\">[<\/font><font color=\"#cc66cc\">0<\/font><font color=\"#66cc66\">]<\/font>.index<font color=\"#66cc66\">[<\/font><font color=\"#cc66cc\">1<\/font><font color=\"#66cc66\">]<\/font>.unique&nbsp;<font color=\"#66cc66\">=<\/font>&nbsp;<font color=\"#cc66cc\">0<\/font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color=\"#66cc66\">\/\/<\/font>&nbsp;\u0443\u0431\u0438\u0440\u0430\u0435\u043c&nbsp;\u0438\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c<br \/>  space<font color=\"#66cc66\">[<\/font><font color=\"#cc66cc\">0<\/font><font color=\"#66cc66\">]<\/font>.index<font color=\"#66cc66\">[<\/font><font color=\"#cc66cc\">1<\/font><font color=\"#66cc66\">]<\/font>.key_field<font color=\"#66cc66\">[<\/font><font color=\"#cc66cc\">0<\/font><font color=\"#66cc66\">]<\/font>.fieldno&nbsp;<font color=\"#66cc66\">=<\/font>&nbsp;<font color=\"#cc66cc\">1<\/font>&nbsp;&nbsp;&nbsp;<font color=\"#66cc66\">\/\/<\/font>&nbsp;\u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c&nbsp;\u043d\u043e\u043c\u0435\u0440&nbsp;\u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u0443\u0435\u043c\u043e\u0433\u043e&nbsp;\u043f\u043e\u043b\u044f<br \/>  space<font color=\"#66cc66\">[<\/font><font color=\"#cc66cc\">0<\/font><font color=\"#66cc66\">]<\/font>.index<font color=\"#66cc66\">[<\/font><font color=\"#cc66cc\">1<\/font><font color=\"#66cc66\">]<\/font>.key_field<font color=\"#66cc66\">[<\/font><font color=\"#cc66cc\">0<\/font><font color=\"#66cc66\">]<\/font>.<font color=\"#b1b100\">type<\/font>&nbsp;<font color=\"#66cc66\">=<\/font>&nbsp;<font color=\"#ff0000\">&quot;NUM&quot;<\/font>&nbsp;<font color=\"#66cc66\">\/\/<\/font>&nbsp;\u0442\u0438\u043f&nbsp;int32_t<\/p>\n<p>  \u0422\u0430\u043a \u043a\u0430\u043a \u0443 \u043d\u0430\u0441 \u043f\u0440\u043e\u0435\u043a\u0442 \u0421\u043e\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0438\u0433\u0440\u044b, \u0442\u043e \u043f\u0435\u0440\u0432\u0438\u0447\u043d\u044b\u0439 \u043a\u043b\u044e\u0447 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c social_id. \u0414\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0430 \u0441\u043e\u0446\u0441\u0435\u0442\u0435\u0439 \u2014 \u044d\u0442\u043e 64-\u043a\u043b\u044e\u0447. \u0422\u0438\u043f \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u0431\u0443\u0434\u0435\u0442 HASH, \u0430 \u0442\u0438\u043f \u0434\u0430\u043d\u043d\u044b\u0445 STR. \u0412 \u0438\u0434\u0435\u0430\u043b\u0435, \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b NUM64, \u043d\u043e \u043a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, PHP \u043f\u043b\u043e\u0445\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 \u0442\u0438\u043f\u043e\u043c long long. \u0414\u0440\u0430\u0439\u0432\u0435\u0440 \u043d\u0435 \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0435\u0442 \u0442\u0438\u043f \u0438 \u0440\u0430\u0437\u043c\u0435\u0440 \u043f\u0435\u0440\u0432\u0438\u0447\u043d\u043e\u0433\u043e \u043a\u043b\u044e\u0447\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430. \u0412 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442, \u0435\u0441\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c 64-\u0445 \u0431\u0438\u0442\u043d\u044b\u0439 \u043a\u043b\u044e\u0447, \u043f\u043e\u043a\u0430 \u043f\u043e \u043d\u0435\u043c\u0443 \u043d\u0435\u043b\u044c\u0437\u044f \u0438\u0441\u043a\u0430\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f 32\u0445\u0431\u0438\u0442\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u0415\u0433\u043e \u043d\u0430\u0434\u043e \u0437\u0430\u043f\u0430\u043a\u043e\u0432\u0430\u0442\u044c \u0432 \u043f\u0430\u043a\u0435\u0442 \u043a\u0430\u043a 64-\u0431\u0438\u0442\u043d\u044b\u0439 \u043a\u043b\u044e\u0447. \u0421\u0435\u0439\u0447\u0430\u0441 \u0434\u0440\u0430\u0439\u0432\u0435\u0440 \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0441\u043b\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0440\u0435\u0432\u043e\u0441\u0445\u043e\u0434\u0438\u0442 32-\u0445\u0431\u0438\u0442\u043d\u044b\u0439 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d. \u041f\u043e \u044d\u0442\u043e\u043c\u0443, \u043d\u0430\u0434\u0435\u0436\u043d\u0435\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0442\u0438\u043f\u043e\u043c <i>STRING<\/i>.<\/p>\n<h5>\u0420\u0430\u0441\u0447\u0435\u0442 \u043f\u0430\u043c\u044f\u0442\u0438<\/h5>\n<p>  \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u043c\u043d\u0438\u0442\u044c, \u0447\u0442\u043e tarantool \u2014 \u0440\u0435\u0448\u0435\u043d\u0438\u0435<b><i> memoru only<\/i><\/b>, \u043f\u043e \u044d\u0442\u043e\u043c\u0443 \u0432\u0430\u0436\u043d\u043e \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u043c\u044b\u0439 \u043e\u0431\u044a\u0435\u043c \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u043c\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438. \u0420\u0430\u0441\u0447\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u043b\u0443\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<p>  \u041f\u0435\u0440\u0435\u0434 \u043a\u0430\u0436\u0434\u044b\u043c \u043a\u043e\u0440\u0442\u0435\u0436\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0442\u0438\u043f\u0430 varint (\u0430\u043d\u0430\u043b\u043e\u0433 perl&#8217;\u043e\u0432\u043e\u0433\u043e &#8216;w&#8217; \u0432 pack) \u0438 12 \u0431\u0430\u0439\u0442 \u0438\u0437 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430 \u043d\u0430 \u043a\u0430\u0436\u0434\u0443\u044e tuple. \u041a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e, \u043f\u0440\u043e \u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0435, \u043c\u043e\u0436\u043d\u043e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f, \u0438\u0437\u0443\u0447\u0438\u0432 <a href=\"https:\/\/github.com\/mailru\/tarantool\/blob\/master\/doc\/box-protocol.txt\">\u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b <\/a> \u0438\u043b\u0438 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0432 \u0441\u0442\u0430\u0442\u044c\u044e <a href=\"http:\/\/habrahabr.ru\/post\/118036\/\">Tarantool \u0414\u0430\u043d\u043d\u044b\u0435 \u0438 \u041f\u0440\u043e\u0442\u043e\u043a\u043e\u043b<\/a>.<\/p>\n<p>  \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u043a\u043e\u043b\u043e 15 \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u043e\u0432 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0430\u043b\u043b\u043e\u043a\u0430\u0442\u043e\u0440\u043e\u0432. \u0415\u0441\u043b\u0438 \u043c\u044b, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0438\u043c\u0435\u0435\u043c 10 \u043f\u043e\u043b\u0435\u0439 \u0438 \u0440\u0430\u0437\u043c\u0435\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0443\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0432 256 \u0431\u0430\u0439\u0442, \u0442\u043e \u0434\u043b\u044f 1.5M \u043f\u0440\u0438\u0431\u043b\u0438\u0437\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0440\u0430\u0441\u0447\u0435\u0442:<br \/>  ( 10 * 1 + 256 + 12 ) * 1.15 * 1 500 000 = 921150000 ~= 440 \u041c\u0431 \u043d\u0430 \u0434\u043d\u043d\u044b\u0435<\/p>\n<p>  \u0422\u0430\u043a \u0436\u0435, \u0432\u0441\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u044b \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u043f\u0430\u043c\u044f\u0442\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442:<br \/>   \u2014 \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0439 \u043d\u043e\u0434\u044b \u0432 \u0434\u0435\u0440\u0435\u0432\u0435 \u0445\u0440\u0430\u043d\u0438\u0442 68 \u0431\u0430\u0439\u0442 \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438<br \/>   \u2014 \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0439 \u043d\u043e\u0434\u044b \u0432 \u0445\u0435\u0448\u0435 \u0445\u0440\u0430\u043d\u0438\u0442 56 \u0431\u0430\u0439\u0442 \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438<\/p>\n<p>  \u0414\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u043d\u0430 1.5M \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0447\u0443\u0442\u044c \u0431\u043e\u043b\u0435\u0435 80Mb, \u0438\u0442\u043e\u0433\u043e \u0432\u043c\u0435\u0441\u0442\u0435, \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f 1,5 M \u043f\u0440\u043e\u0444\u0438\u043b\u0435\u0439 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0447\u0443\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u044b \u0433\u0438\u0433\u0430\u0431\u0430\u0439\u0442\u0430. \u0415\u0441\u043b\u0438 \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u043a\u043b\u044e\u0447 (\u0442\u0438\u043f TREE), \u0442\u043e \u044d\u0442\u043e \u0435\u0449\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e 90\u041c \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438. <\/p>\n<p>  \u041a\u043e\u043c\u0443 \u043a\u0430\u043a, \u043d\u043e \u043f\u043e \u043d\u044b\u043d\u0435\u0448\u043d\u0438\u043c \u043c\u0435\u0440\u043a\u0430\u043c \u2014 \u043d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u0443\u0436 \u043c\u043d\u043e\u0433\u043e.<\/p>\n<h5>\u0420\u0435\u0446\u0435\u043f\u0442 4. \u0418\u0437\u0431\u0430\u0432\u043b\u044f\u0435\u043c\u0441\u044f \u043e\u0442 MySQL \u0432 foregraund <\/h5>\n<p>  \u041a\u0430\u043a \u043c\u044b \u0443\u0436\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u043b\u0438, \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u044f \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u043f\u0440\u043e\u0444\u0438\u043b\u044f \u0432 tarantool, \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0438\u043c\u0435\u0442\u044c \u0438\u0445 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u043a\u043e\u043f\u0438\u0438 \u0432 MySQL. \u041f\u043e \u044d\u0442\u043e\u043c\u0443, \u0432\u0441\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 UPDATE, \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435, \u0441\u0434\u0435\u043b\u0430\u0432 \u043a\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u043c\u044b \u0434\u043e\u0441\u0442\u0438\u0433\u043b\u0438 \u043d\u0435 \u043c\u043d\u043e\u0433\u043e. \u041d\u043e, \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u044d\u0444\u0444\u0435\u043a\u0442\u0430 \u0432\u0441\u0435 \u0436\u0435 \u0434\u043e\u0441\u0442\u0438\u0433\u043b\u0438: MySQL \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043b \u043f\u0430\u0434\u0430\u0442\u044c. \u0422\u0430\u043a, \u043a\u0430\u043a \u0436\u0435 \u0432\u0441\u0451-\u0442\u0430\u043a\u0438 \u0443\u0441\u043a\u043e\u0440\u0438\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437? \u042d\u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0435\u0441\u043b\u0438 \u0438\u0437\u0431\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u043e\u0442 MySQL \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432\u043e\u043e\u0431\u0449\u0435. \u0410 \u043a\u0430\u043a \u044d\u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e? \u041d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e\u0431 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u0432 \u0411\u0414 \u0432 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0434\u0440\u0443\u0433\u043e\u0439, \u0431\u044d\u0433\u0440\u0430\u0443\u043d\u0434 \u0441\u043a\u0440\u0438\u043f\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0442\u044c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 INSERT\/UPDATE.<\/p>\n<p>  \u0414\u0430\u043d\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u043e\u0447\u0435\u0440\u0435\u0434\u044c. \u0415\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u043c\u044b\u0448\u043b\u0435\u043d\u043d\u044b\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0435 \u0437\u0430\u0434\u0430\u0447\u0438: Gaerman, Celery, \u0430 \u0442\u0430\u043a \u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0441\u043f\u043e\u0441\u043e\u0431\u0438\u0442\u044c RabbitMQ, ZMQ, redis \u0438 \u043f\u0440\u043e\u0447\u0438\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043e\u0447\u0435\u0440\u0435\u0434\u0435\u0439. \u041d\u043e \u0437\u0430\u0447\u0435\u043c \u0432\u0432\u043e\u0434\u0438\u0442\u044c \u0432 \u043f\u0440\u043e\u0435\u043a\u0442 \u043a\u0430\u043a\u0443\u044e-\u0442\u043e \u043d\u043e\u0432\u0443\u044e \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044c, \u0435\u0441\u043b\u0438 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043e\u0447\u0435\u0440\u0435\u0434\u0435\u0439 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c tarantool. <\/p>\n<p>  \u0412 \u0442\u0430\u0440\u0430\u043d\u0442\u0443\u043b \u0435\u0441\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043e\u0447\u0435\u0440\u0435\u0434\u0438 <a href=\"https:\/\/github.com\/mailru\/tntlua\/blob\/master\/queue.lua\">github.com\/mailru\/tntlua\/blob\/master\/queue.lua<\/a> \u0438 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u0435\u0451 \u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e.<br \/>  \u041e\u0434\u043d\u0430\u043a\u043e, \u0431\u044b\u043b\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043e \u0447\u0443\u0442\u044c-\u0447\u0443\u0442\u044c \u043f\u0440\u043e\u0449\u0435. \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043d\u043e\u0432\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e:<\/p>\n<p>  space<font color=\"#66cc66\">[<\/font><font color=\"#cc66cc\">1<\/font><font color=\"#66cc66\">]<\/font>.enabled&nbsp;<font color=\"#66cc66\">=<\/font>&nbsp;<font color=\"#cc66cc\">1<\/font>&nbsp;<br \/>  space<font color=\"#66cc66\">[<\/font><font color=\"#cc66cc\">1<\/font><font color=\"#66cc66\">]<\/font>.index<font color=\"#66cc66\">[<\/font><font color=\"#cc66cc\">0<\/font><font color=\"#66cc66\">]<\/font>.<font color=\"#b1b100\">type<\/font>&nbsp;<font color=\"#66cc66\">=<\/font>&nbsp;<font color=\"#ff0000\">&quot;TREE&quot;<\/font><br \/>  space<font color=\"#66cc66\">[<\/font><font color=\"#cc66cc\">1<\/font><font color=\"#66cc66\">]<\/font>.index<font color=\"#66cc66\">[<\/font><font color=\"#cc66cc\">0<\/font><font color=\"#66cc66\">]<\/font>.unique&nbsp;<font color=\"#66cc66\">=<\/font>&nbsp;<font color=\"#cc66cc\">1<\/font><br \/>  space<font color=\"#66cc66\">[<\/font><font color=\"#cc66cc\">1<\/font><font color=\"#66cc66\">]<\/font>.index<font color=\"#66cc66\">[<\/font><font color=\"#cc66cc\">0<\/font><font color=\"#66cc66\">]<\/font>.key_field<font color=\"#66cc66\">[<\/font><font color=\"#cc66cc\">0<\/font><font color=\"#66cc66\">]<\/font>.fieldno&nbsp;<font color=\"#66cc66\">=<\/font>&nbsp;<font color=\"#cc66cc\">0<\/font><br \/>  space<font color=\"#66cc66\">[<\/font><font color=\"#cc66cc\">1<\/font><font color=\"#66cc66\">]<\/font>.index<font color=\"#66cc66\">[<\/font><font color=\"#cc66cc\">0<\/font><font color=\"#66cc66\">]<\/font>.key_field<font color=\"#66cc66\">[<\/font><font color=\"#cc66cc\">0<\/font><font color=\"#66cc66\">]<\/font>.<font color=\"#b1b100\">type<\/font>&nbsp;<font color=\"#66cc66\">=<\/font>&nbsp;<font color=\"#ff0000\">&quot;NUM&quot;<\/font><br \/>  &nbsp;<\/p>\n<p>  \u0412 \u0434\u0430\u043d\u043d\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0431\u0443\u0434\u0435\u043c \u043f\u0438\u0441\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043f\u043e\u043b\u044f:<br \/>   \u2014 id, \u0430\u0432\u0442\u043e\u0438\u043d\u043a\u0440\u0435\u043c\u0435\u043d\u0442\u043d\u043e\u0435 \u043f\u043e\u043b\u0435. \u0414\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u043f\u0440\u043e\u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043e. \u041d\u0430\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0432\u0438\u0447\u043d\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441 \u0442\u0438\u043f\u0430 TREE.<br \/>   \u2014 type \u2014 \u0442\u0438\u043f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438, \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0447\u0438\u0441\u043b\u043e\u0432\u0430\u044f \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u043e\u043c\u0435\u0440 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 SQL \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430.<br \/>   \u2014 data \u2014 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0432\u0441\u0442\u0430\u0432\u043a\u0438 \/ \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f. <\/p>\n<p>  \u0412 foreground \u0441\u043a\u0440\u0438\u043f\u0442\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434:<br \/>  define<font color=\"#66cc66\">(<\/font>&nbsp;<font color=\"#ff0000\">&#8216;UPDATE_SPIN_COUNT&#8217;<\/font>,&nbsp;&nbsp;&nbsp;<font color=\"#cc66cc\">1<\/font><font color=\"#66cc66\">)<\/font><font color=\"#66cc66\">;<\/font><br \/>  define<font color=\"#66cc66\">(<\/font>&nbsp;<font color=\"#ff0000\">&#8216;UPDATE_USER_BALANCE&#8217;<\/font>,&nbsp;<font color=\"#cc66cc\">2<\/font><font color=\"#66cc66\">)<\/font><font color=\"#66cc66\">;<\/font><br \/>  \u2026<br \/>  $res&nbsp;<font color=\"#66cc66\">=<\/font>&nbsp;$tnt-<font color=\"#66cc66\">&gt;<\/font>call<font color=\"#66cc66\">(<\/font>&nbsp;<font color=\"#ff0000\">&#8216;box.auto_increment&#8217;<\/font>&nbsp;,&nbsp;array<font color=\"#66cc66\">(<\/font>&nbsp;<font color=\"#66cc66\">(<\/font><font color=\"#b1b100\">string<\/font><font color=\"#66cc66\">)<\/font><font color=\"blue\">TBL_QUEUES<\/font>,&nbsp;<font color=\"blue\">UPDATE_SPIN_COUNT<\/font>,&nbsp;$spinCount,&nbsp;$uid&nbsp;<font color=\"#66cc66\">)<\/font><font color=\"#66cc66\">)<\/font><font color=\"#66cc66\">;<\/font><br \/>  <i>\u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0442\u0438\u043f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439, \u043d\u043e\u043c\u0435\u0440 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 (\u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430 <font color=\"blue\">TBL_QUEUES<\/font>) \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d \u043a \u0442\u0438\u043f\u0443 <b>STRING<\/b>.<\/i> \u0414\u0430\u043d\u043d\u044b\u0439 \u0441\u043a\u0440\u0438\u043f\u0442, \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 lua \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 FIFO \u043e\u0447\u0435\u0440\u0435\u0434\u044c ( \u0430\u0432\u0442\u043e\u0438\u043d\u043a\u0440\u0435\u043c\u0435\u043d\u0442\u043d\u044b\u0439 \u043d\u043e\u043c\u0435\u0440, \u0442\u0438\u043f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u0438 \u0441\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0435).<\/p>\n<p>  \u0414\u0430\u043b\u0435\u0435, background \u0441\u043a\u0440\u0438\u043f\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u0434\u0430\u0436\u0435 \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0439 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435, \u0432\u044b\u043d\u0438\u043c\u0430\u0435\u0442 \u0438\u0437 \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 SQL: <\/p>\n<blockquote><p>define<font color=\"#66cc66\">(<\/font>&nbsp;<font color=\"#ff0000\">&#8216;UPDATE_SPIN_COUNT&#8217;<\/font>,&nbsp;&nbsp;&nbsp;<font color=\"#cc66cc\">1<\/font><font color=\"#66cc66\">)<\/font><font color=\"#66cc66\">;<\/font><br \/>  define<font color=\"#66cc66\">(<\/font>&nbsp;<font color=\"#ff0000\">&#8216;UPDATE_USER_BALANCE&#8217;<\/font>,&nbsp;<font color=\"#cc66cc\">2<\/font><font color=\"#66cc66\">)<\/font><font color=\"#66cc66\">;<\/font><br \/>  \u2026<br \/>  $res&nbsp;<font color=\"#66cc66\">=<\/font>&nbsp;$this-<font color=\"#66cc66\">&gt;<\/font>callProc<font color=\"#66cc66\">(<\/font><font color=\"#ff0000\">&#8216;my_pop&#8217;<\/font>,&nbsp;array<font color=\"#66cc66\">(<\/font><font color=\"#66cc66\">(<\/font><font color=\"#b1b100\">string<\/font><font color=\"#66cc66\">)<\/font>TBL_QUEUES<font color=\"#66cc66\">)<\/font><font color=\"#66cc66\">)<\/font><font color=\"#66cc66\">;<\/font><br \/>  &nbsp;<br \/>  <font color=\"#66cc66\">\/*<\/font><br \/>  \u0435\u0441\u043b\u0438&nbsp;\u043f\u0443\u0441\u0442\u043e&nbsp;\u0442\u043e&nbsp;\u0432\u0435\u0440\u043d\u0435\u0442:&nbsp;<br \/>  array<font color=\"#66cc66\">(<\/font><font color=\"#cc66cc\">2<\/font><font color=\"#66cc66\">)<\/font>&nbsp;<font color=\"#66cc66\">{<\/font><br \/>  &nbsp;&nbsp;<font color=\"#66cc66\">[<\/font><font color=\"#ff0000\">&quot;count&quot;<\/font><font color=\"#66cc66\">]<\/font><font color=\"#66cc66\">=&gt;<\/font>&nbsp;&nbsp;int<font color=\"#66cc66\">(<\/font><font color=\"#cc66cc\">0<\/font><font color=\"#66cc66\">)<\/font><br \/>  &nbsp;&nbsp;<font color=\"#66cc66\">[<\/font><font color=\"#ff0000\">&quot;tuples_list&quot;<\/font><font color=\"#66cc66\">]<\/font><font color=\"#66cc66\">=&gt;<\/font>&nbsp;&nbsp;array<font color=\"#66cc66\">(<\/font><font color=\"#cc66cc\">0<\/font><font color=\"#66cc66\">)<\/font>&nbsp;<font color=\"#66cc66\">{<\/font><font color=\"#66cc66\">}<\/font><br \/>  <font color=\"#66cc66\">}<\/font><br \/>  &nbsp;<br \/>  <font color=\"#66cc66\">*\/<\/font><br \/>  <font color=\"#b1b100\">if<\/font>&nbsp;<font color=\"#66cc66\">(<\/font><font color=\"#66cc66\">!<\/font>$res<font color=\"#66cc66\">[<\/font><font color=\"#ff0000\">&#8216;count&#8217;<\/font><font color=\"#66cc66\">]<\/font><font color=\"#66cc66\">)<\/font>&nbsp;<font color=\"#b1b100\">return<\/font><font color=\"#66cc66\">;<\/font><br \/>  &nbsp;<br \/>  $tuple&nbsp;<font color=\"#66cc66\">=<\/font>&nbsp;$res<font color=\"#66cc66\">[<\/font><font color=\"#ff0000\">&#8216;tuples_list&#8217;<\/font><font color=\"#66cc66\">]<\/font><font color=\"#66cc66\">[<\/font><font color=\"#cc66cc\">0<\/font><font color=\"#66cc66\">]<\/font><font color=\"#66cc66\">;<\/font><br \/>  switch&nbsp;<font color=\"#66cc66\">(<\/font>$tuple<font color=\"#66cc66\">[<\/font><font color=\"#cc66cc\">1<\/font><font color=\"#66cc66\">]<\/font><font color=\"#66cc66\">)<\/font>&nbsp;<font color=\"#66cc66\">{<\/font><br \/>  case&nbsp;UPDATE_SPIN_COUNT:<br \/>  $sql&nbsp;<font color=\"#66cc66\">=<\/font>&nbsp;<font color=\"#ff0000\">&quot;UPDATE&nbsp;users&nbsp;SET&nbsp;spinCount&nbsp;={$tuple[2]}&nbsp;&nbsp;WHERE&nbsp;uid&nbsp;={$tuple[3]}&quot;<\/font><font color=\"#66cc66\">;<\/font><br \/>  <font color=\"#b1b100\">break<\/font><font color=\"#66cc66\">;<\/font><br \/>  &nbsp;<br \/>  case&nbsp;<font color=\"#cc66cc\">2<\/font>:<br \/>  $sql&nbsp;<font color=\"#66cc66\">=<\/font>&nbsp;<font color=\"#ff0000\">&quot;UPDATE&nbsp;users&nbsp;SET&nbsp;money&nbsp;=&nbsp;money&nbsp;+&nbsp;{$tuple[2]}&nbsp;&nbsp;WHERE&nbsp;uid&nbsp;={$tuple[3]}&quot;<\/font><font color=\"#66cc66\">;<\/font><br \/>  <font color=\"#b1b100\">break<\/font><font color=\"#66cc66\">;<\/font><br \/>  &nbsp;<br \/>  default:<br \/>  throw&nbsp;new&nbsp;Exception&nbsp;<font color=\"#66cc66\">(<\/font><font color=\"#ff0000\">&#8216;unknow&nbsp;task&nbsp;type&#8217;<\/font><font color=\"#66cc66\">)<\/font><font color=\"#66cc66\">;<\/font><br \/>  <font color=\"#b1b100\">break<\/font><font color=\"#66cc66\">;<\/font><br \/>  <font color=\"#66cc66\">}<\/font><br \/>  &nbsp;<br \/>  $this-<font color=\"#66cc66\">&gt;<\/font>execSQL<font color=\"#66cc66\">(<\/font>$sql<font color=\"#66cc66\">)<\/font><font color=\"#66cc66\">;<\/font><\/p><\/blockquote>\n<p>  \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435, \u043d\u0430\u0448 \u0444\u0440\u043e\u043d\u0442 \u0441\u043a\u0440\u0438\u043f\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u0431\u044b\u0441\u0442\u0440\u044b\u043c \u0442\u0430\u0440\u0430\u043d\u0442\u0443\u043b\u043e\u043c, \u0430 \u0431\u044d\u0434\u0433\u0440\u0430\u0443\u043d\u0434-\u0441\u043a\u0440\u0438\u043f\u0442, \u0432\u0438\u0441\u0438\u0442 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0434\u0435\u043c\u043e\u043d\u0430 \u0438\u043b\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043f\u043e \u043a\u0440\u043e\u043d\u0443 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 MySQL \u043d\u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435, \u043d\u0435 \u0442\u0440\u0430\u0442\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 WEB \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435, \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0438\u0433\u0440\u0430\u0442\u044c \u0432 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0431\u043e\u043b\u0435\u0435 30%. \u0422\u0435\u043c\u0430 \u0431\u044d\u043a\u0433\u0440\u0430\u0443\u043d\u0434\u043e\u0432\u0441\u043a\u0438\u0445 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u0434\u043e\u0441\u0442\u043e\u0439\u043d\u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438. <\/p>\n<p>  \u041e\u0434\u043d\u0430\u043a\u043e, \u044d\u0442\u043e \u043d\u0435 \u0432\u0441\u0451. \u0427\u0442\u043e\u0431 \u0437\u0430\u043f\u0441\u0442\u0438\u0442\u044c lua \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0443 my_pop, \u0435\u0451 \u043d\u0430\u0434\u043e \u043f\u0440\u043e\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e, \u043d\u0438\u0436\u0435\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0432 \u0444\u0430\u0439\u043b init.lua, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u043e\u043b\u0436\u0435\u043d \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0432 work_dir \u0438\u043b\u0438 script_dir. <\/p>\n<blockquote><p><font color=\"#b1b100\">function<\/font>&nbsp;my_pop<font color=\"#66cc66\">(<\/font>spaceno<font color=\"#66cc66\">)<\/font><br \/>  &nbsp;&nbsp;&nbsp;&nbsp;spaceno&nbsp;<font color=\"#66cc66\">=<\/font>&nbsp;<font color=\"#b1b100\">tonumber<\/font><font color=\"#66cc66\">(<\/font>spaceno<font color=\"#66cc66\">)<\/font><br \/>  &nbsp;&nbsp;&nbsp;&nbsp;<font color=\"#b1b100\">local<\/font>&nbsp;min_tuple&nbsp;<font color=\"#66cc66\">=<\/font>&nbsp;box.space<font color=\"#66cc66\">[<\/font>spaceno<font color=\"#66cc66\">]<\/font>.index<font color=\"#66cc66\">[<\/font><font color=\"#cc66cc\">0<\/font><font color=\"#66cc66\">]<\/font>.idx:<font color=\"#b1b100\">min<\/font><font color=\"#66cc66\">(<\/font><font color=\"#66cc66\">)<\/font><br \/>  &nbsp;&nbsp;&nbsp;&nbsp;<font color=\"#b1b100\">local<\/font>&nbsp;<font color=\"#b1b100\">min<\/font>&nbsp;<font color=\"#66cc66\">=<\/font>&nbsp;<font color=\"#cc66cc\">0<\/font><br \/>  &nbsp;&nbsp;&nbsp;&nbsp;<font color=\"#b1b100\">if<\/font>&nbsp;min_tuple&nbsp;~<font color=\"#66cc66\">=<\/font>&nbsp;<font color=\"#b1b100\">nil<\/font>&nbsp;<font color=\"#b1b100\">then<\/font><br \/>  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color=\"#b1b100\">min<\/font>&nbsp;<font color=\"#66cc66\">=<\/font>&nbsp;box.<font color=\"#b1b100\">unpack<\/font><font color=\"#66cc66\">(<\/font><font color=\"#ff0000\">&#8216;i&#8217;<\/font>,&nbsp;min_tuple<font color=\"#66cc66\">[<\/font><font color=\"#cc66cc\">0<\/font><font color=\"#66cc66\">]<\/font><font color=\"#66cc66\">)<\/font><br \/>  &nbsp;&nbsp;&nbsp;&nbsp;<font color=\"#b1b100\">else<\/font><br \/>  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color=\"#b1b100\">return<\/font>&nbsp;<br \/>  &nbsp;&nbsp;&nbsp;&nbsp;<font color=\"#b1b100\">end<\/font><br \/>  &nbsp;<br \/>  &nbsp;&nbsp;&nbsp;&nbsp;<font color=\"#b1b100\">local<\/font>&nbsp;ret&nbsp;<font color=\"#66cc66\">=<\/font>&nbsp;box.select<font color=\"#66cc66\">(<\/font>spaceno,&nbsp;<font color=\"#cc66cc\">0<\/font>,<font color=\"#b1b100\">min<\/font><font color=\"#66cc66\">)<\/font><br \/>  &nbsp;&nbsp;&nbsp;&nbsp;box.delete<font color=\"#66cc66\">(<\/font>spaceno,&nbsp;<font color=\"#b1b100\">min<\/font><font color=\"#66cc66\">)<\/font><br \/>  &nbsp;<br \/>  &nbsp;&nbsp;&nbsp;&nbsp;<font color=\"#b1b100\">return<\/font>&nbsp;ret<br \/>  &nbsp;<br \/>  <font color=\"#b1b100\">end<\/font><\/p><\/blockquote>\n<p>  \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 work_dir \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 tarantool.conf.<\/p>\n<h5>\u0420\u0435\u0446\u0435\u043f\u0442 5. \u041a\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0435\u0445 \u043f\u0440\u043e\u0444\u0438\u043b\u0435\u0439, \u043a\u0442\u043e \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u0438\u0433\u0440\u0430\u0435\u0442<\/h5>\n<p>  \u041a\u0430\u043a \u043c\u044b \u0443\u0436\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b\u0438 \u0440\u0430\u043d\u0435\u0435, \u0432\u0441\u0435 \u043d\u0430\u0448\u0438 \u043f\u0440\u043e\u0444\u0438\u043b\u0438 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 tarantool, \u0430 \u0432\u0441\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0431\u044d\u043a\u0433\u0440\u0430\u0443\u043d\u0434\u043e\u0432\u0441\u043a\u0438\u043c \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u043c \u0437\u0430\u043d\u043e\u0441\u044f\u0442\u0441\u044f \u0432 MySQL. \u041c\u044b \u0432\u0441\u0435\u0433\u0434\u0430 \u0438\u043c\u0435\u0435\u043c \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435, \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 CAP \u0442\u0435\u043e\u0440\u0435\u043c\u043e\u0439, \u0441 \u043d\u0435\u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u043e\u043f\u043e\u0437\u0434\u0430\u043d\u0438\u0435\u043c, \u0434\u0430\u043d\u043d\u044b\u0435. <\/p>\n<p>  \u0410 \u0447\u0442\u043e, \u0435\u0441\u043b\u0438 \u043d\u0430\u0448 \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0430\u0431\u0440\u0430\u043b \u043d\u0435 1.5 \u043c\u043b\u043d, \u0430 \u0442\u0440\u0438 \u0438\u043b\u0438 5 \u043c\u043b\u043d \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439? \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0437\u0430\u0448\u0435\u043b, \u0438\u0433\u0440\u0430 \u043d\u0435 \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u043b\u0430\u0441\u044c \u2014 \u0443\u0448\u0435\u043b. \u0410 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0442\u0430\u0440\u0430\u043d\u0442\u0443\u043b \u043e\u0441\u0442\u0430\u043b\u0438\u0441\u044c, \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0442 \u043f\u0430\u043c\u044f\u0442\u044c \u0438 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f\u2026 \u041f\u043e \u044d\u0442\u043e\u043c\u0443, \u0434\u043b\u044f \u0431\u043e\u043b\u0435\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f, \u0434\u0430 \u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043b\u044f \u0431\u043e\u043b\u0435\u0435 \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u2014 \u0438\u043c\u0435\u0435\u0442 \u0441\u043c\u044b\u0441\u043b \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0435\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0438\u0433\u0440\u0430\u044e\u0442. <\/p>\n<p>  \u0418\u043d\u044b\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u0442\u0435\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u0438\u0433\u0440\u0430\u044e\u0442, \u0442.\u0435. \u043d\u0435 \u0437\u0430\u0445\u043e\u0434\u0438\u043b\u0438 \u0432 \u0438\u0433\u0440\u0443, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0431\u043e\u043b\u0435\u0435 \u043d\u0435\u0434\u0435\u043b\u0438, \u043c\u043e\u0436\u043d\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0438\u0437 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u043a\u0435\u0448\u0430. \u0422\u0430\u043a \u043a\u0430\u043a \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u043a\u043e\u043f\u0438\u044f \u0432 \u0411\u0414, \u0442\u043e \u043c\u044b \u0432\u0441\u0435\u0433\u0434\u0430 \u0435\u0451 \u043c\u043e\u0436\u0435\u043c \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0432 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u043c \u043a\u0435\u0448\u0435. \u041a\u043e\u0434 \u043a\u043b\u0430\u0441\u0441\u043e\u0432, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0445 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u043a\u0435\u0448 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d \u043f\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u043c\u0443 \u0442\u0438\u043f\u0443 \u043a\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f: <\/p>\n<blockquote><p><font color=\"#000000\">class<\/font>&nbsp;User&nbsp;<font color=\"#000000\">extends<\/font>&nbsp;DbModel&nbsp;<font color=\"#009900\">{<\/font><br \/>  &nbsp;<br \/>  &nbsp;&nbsp;<font color=\"#000000\">public<\/font>&nbsp;<font color=\"#000000\">function<\/font>&nbsp;getByUid<font color=\"#009900\">(<\/font><font color=\"#000088\">$uid<\/font><font color=\"#009900\">)<\/font>&nbsp;<font color=\"#009900\">{<\/font><br \/>  &nbsp;<br \/>  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color=\"#000088\">$result<\/font>&nbsp;<font color=\"#339933\">=<\/font>&nbsp;this<font color=\"#339933\">-&gt;<\/font><font color=\"#004000\">getFromCache<\/font><font color=\"#009900\">(<\/font><font color=\"#000088\">$uid<\/font><font color=\"#009900\">)<\/font><font color=\"#339933\">;<\/font><br \/>  &nbsp;<br \/>  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color=\"#b1b100\">if<\/font>&nbsp;<font color=\"#009900\">(<\/font><font color=\"#339933\">!<\/font><font color=\"#990000\">is_null<\/font><font color=\"#009900\">(<\/font><font color=\"#000088\">$result<\/font><font color=\"#009900\">)<\/font><font color=\"#009900\">)<\/font>&nbsp;<font color=\"#009900\">{<\/font><br \/>  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color=\"#b1b100\">return<\/font>&nbsp;<font color=\"#000088\">$result<\/font><font color=\"#339933\">;<\/font><br \/>  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color=\"#009900\">}<\/font><br \/>  &nbsp;<br \/>  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color=\"#000088\">$result<\/font>&nbsp;<font color=\"#339933\">=<\/font>&nbsp;<font color=\"#000088\">$this<\/font><font color=\"#339933\">-&gt;<\/font><font color=\"#004000\">execSQL<\/font><font color=\"#009900\">(<\/font>&nbsp;<font color=\"#0000ff\">&quot;SELECT&nbsp;*&nbsp;FRAO&nbsp;users&nbsp;WHERE&nbsp;uid=<font color=\"#006699\">$uid<\/font>&quot;<\/font><font color=\"#009900\">)<\/font><font color=\"#339933\">;<\/font><br \/>  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color=\"#000088\">$this<\/font><font color=\"#339933\">-&gt;<\/font><font color=\"#004000\">setToCache<\/font><font color=\"#009900\">(<\/font><font color=\"#000088\">$result<\/font><font color=\"#009900\">)<\/font><font color=\"#339933\">;<\/font><br \/>  &nbsp;<br \/>  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color=\"#b1b100\">return<\/font>&nbsp;<font color=\"#000088\">$result<\/font><font color=\"#339933\">;<\/font><br \/>  &nbsp;&nbsp;<font color=\"#009900\">}<\/font><br \/>  <font color=\"#339933\">&#8230;.<\/font><br \/>  <font color=\"#009900\">}<\/font><\/p><\/blockquote>\n<p>  \u0427\u0438\u0441\u0442\u043a\u0443 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c\u0438:<br \/>   \u2014 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043a\u0440\u043e\u043d \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u00ab\u043f\u0440\u043e\u0441\u0440\u043e\u0447\u0435\u043d\u043d\u044b\u0445\u00bb \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0438\u0437 \u0411\u0414 \u0438 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0438\u0445 \u0432 \u0442\u0430\u0440\u0430\u043d\u0442\u0443\u043b\u0435<br \/>   \u2014 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0432 \u0442\u0430\u0440\u0430\u043d\u0442\u0443\u043b\u0435 \u0431\u0440\u043e\u043a\u0435\u0440\u0430 \u0447\u0438\u0441\u0442\u043a\u0438 (\u0441\u0430\u043c \u044d\u0442\u043e\u0433\u043e \u043d\u0435 \u0434\u0435\u043b\u0430\u043b) <a href=\"https:\/\/github.com\/mailru\/tarantool\/wiki\/Brokers-ru\">github.com\/mailru\/tarantool\/wiki\/Brokers-ru<\/a><br \/>   \u2014 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0445\u0440\u0430\u043d\u0438\u043c\u0443\u044e \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0443 \u043d\u0430 lua \u043f\u043e \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044e \u0432\u0441\u0435\u0445 \u00ab\u043f\u0440\u043e\u0441\u0440\u043e\u0447\u0435\u043d\u043d\u044b\u0445\u00bb \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0435\u0435 \u0432\u044b\u0437\u043e\u0432 \u043f\u043e \u043a\u0440\u043e\u043d\u0443.<\/p>\n<p>  \u0421 \u043d\u0435\u0442\u0435\u0440\u043f\u0435\u043d\u0438\u0435\u043c \u0436\u0434\u0435\u043c \u043e\u0442 \u0433\u0440\u0443\u043f\u043f\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u043d\u043e\u0432\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430, \u0447\u0442\u043e\u0431 \u043d\u0435 \u0432\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 (\u043a\u043e\u0440\u0442\u0435\u0436\u0438) \u043f\u043e\u0434\u043d\u0438\u043c\u0430\u043b\u0438\u0441\u044c \u0441 \u0434\u0438\u0441\u043a\u0430 \u0432 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u0443\u044e \u043f\u0430\u043c\u044f\u0442\u044c, \u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0432\u043e\u0441\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u043d\u044b\u0435. \u041f\u0440\u0438\u0431\u043b\u0438\u0437\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u043a\u0430\u043a \u0432 \u041c\u043e\u043d\u0433\u043e \u0414\u0411. \u0422\u043e\u0433\u0434\u0430 \u0440\u0435\u0446\u0435\u043f\u0442 5 \u043e\u0442\u043f\u0430\u0434\u0430\u0435\u0442 \u0441\u0430\u043c \u0441\u043e\u0431\u043e\u0439.<\/p>\n<h5>\u0412\u043c\u0435\u0441\u0442\u043e \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f<\/h5>\n<p>  \u0412\u0441\u0451 \u0432\u044b\u0448\u0435\u043e\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0435 \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u043b\u044e\u0431\u043e\u043c \u0438\u0437 \u044f\u0437\u044b\u043a\u043e\u0432, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u0432\u0430\u0448 \u0441\u043e\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 (PHP, Perl, Python, Ruby, Java).<br \/>  \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 NoSQL \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u043a\u0435\u0448\u0430 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0434\u043e\u0439\u0442\u0438 \u043b\u044e\u0431\u043e\u0435 key\/value \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u0438\u0437 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u043c\u043d\u043e\u0433\u043e\u043e\u0431\u0440\u0430\u0437\u0438\u044f:<br \/>   \u2014 memcached, \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043f\u0435\u0440\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u043d\u043e\u0441\u0442\u044c \u0438 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u043e\u043c\u0430\u0442\u044c \u0433\u043e\u043b\u043e\u0432\u0443 \u043d\u0430\u0434 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u043e\u0447\u0435\u0440\u0435\u0434\u0435\u0439, \u043d\u043e \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0448\u0438\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u0434\u044c\u0437\u0443\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044e APPEND <br \/>   \u2014 membase, \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u0430\u0447\u043d\u0430\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0438 \u0432\u0440\u043e\u0434\u0435 \u043a\u0430\u043a \u0443\u0436\u0435 \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043b \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0441\u0432\u043e\u0438\u043c\u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u0435\u043b\u044f\u043c\u0438<br \/>   \u2014 \u0441\u0432\u044f\u0437\u043a\u0430 memcacheDb &#038; memcacheQ<br \/>   \u2014 \u0440\u0435\u0434\u0438\u0441, \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0438\u0430\u043b\u044c\u043d\u043e \u0435\u0441\u0442\u044c \u0432\u0441\u0435, \u0447\u0442\u043e\u0431 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b<br \/>   \u2014 TokyoTyrant, KyotoTyrant \u2014 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0438\u0430\u043b\u044c\u043d\u043e \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0430 lua \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430\u0445<br \/>   \u2014 LevelDb Daemon, \u0434\u043e\u0441\u0442\u043e\u0439\u043d\u0430\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0440\u0435\u0431\u044f\u0442 \u0438\u0437 \u043c\u0430\u043c\u0431\u044b. \u041d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0434\u043e\u043f\u0438\u043b \u0438 \u0443\u0447\u0435\u0440\u0435\u0434\u0438 \u0443 \u0432\u0430\u0441 \u0443\u0436\u0435 \u0432 \u043a\u0430\u0440\u043c\u0430\u043d\u0435.<br \/>   \u2014 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u043c \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0445 \u0447\u0442\u043e-\u0442\u043e \u0441\u0432\u043e\u0451<\/p>\n<p>  \u041d\u0443 \u0438 \u0432 \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043e \u0433\u0440\u0443\u0448\u0430\u0445 \u0438\u043b\u0438 \u0447\u0443\u0442\u044c-\u0447\u0443\u0442\u044c \u043f\u0438\u0430\u0440\u0430. <br \/>  \u041f\u0440\u043e \u0434\u0435\u043c\u043e\u043d\u044b, \u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e \u0438\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0437\u0430\u0434\u0430\u0447\u0438, \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0438 \u0442\u043e\u043d\u043a\u043e\u0441\u0442\u0438 \u0438\u0445 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438, \u044f \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u044e \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u0430 DevConf 2013 &quot;<a href=\"http:\/\/devconf.ru\/offers\/2\">\u0420\u041d\u0420-\u0434\u0435\u043c\u043e\u043d\u044b \u0432 \u0441\u043e\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0438\u0433\u0440\u0430\u0445<\/a>&quot;. \u0410 \u0442\u0430\u043a \u0436\u0435 \u043e\u0441\u0432\u0435\u0449\u0443 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0444\u0438\u0447\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b\u0438 \u043f\u043e\u0434\u043d\u044f\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432. \u0415\u0441\u043b\u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u0442\u043e \u0437\u0430\u0442\u0440\u043e\u043d\u0443 \u0442\u0435\u043c\u0443 \u0442\u0430\u0440\u0430\u043d\u0442\u0443\u043b\u0430 (\u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u044f \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u0435\u043c) \u0422\u0430\u043a-\u0447\u0442\u043e, \u0434\u043e \u0432\u0441\u0442\u0440\u0435\u0447\u0438 \u043d\u0430DevConf 2013.<\/p>\n<p>  PS. \u0443\u0436\u0435 \u0442\u0440\u0435\u0442\u0438\u0439 \u0447\u0430\u0441 \u043d\u043e\u0447\u0438, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b \u0430\u0447\u0430\u043f\u043e\u0442\u043a\u0438\u2026 \u043f\u043b\u0438\u0438\u0438\u0437 \u0432 \u043f\u0440\u0438\u0432\u0430\u0442 \u2014 \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u043f\u0440\u0430\u0432\u043b\u044e. \u0417\u0430\u0440\u0430\u043d\u0435\u0435 \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u0435\u043d.    \t \t\t \t\t\t \t<\/p>\n<div class=\"polling\">\n<form action=\"\/json\/polling\/\" class=\"poll\" method=\"post\">\n<div class=\"poll_title\">\u0414\u0430\u043d\u043d\u0430\u044f \u0442\u0435\u043c\u0430 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u0430?<\/div>\n<p>  \t\t<input type=\"hidden\" name=\"post_id\" value=\"113298\"\/> \t\t<input type=\"hidden\" name=\"polling_question_id\" value=\"7873\"\/>  \t\t<\/p>\n<table class=\"answer\">\n<tr>\n<td class=\"input\"> \t\t\t\t\t<input type=\"radio\" id=\"vv40811\" \t\t\t\t\t\tclass=\"radio js-field-data\" \t\t\t\t\t\tname=\"variant[]\" \t\t\t\t\t\tvalue=\"40811\" \/> \t\t\t\t<\/td>\n<td class=\"label\"> \t\t\t\t\t<label for=\"vv40811\">\u0434\u0430, \u043c\u043d\u043e\u0433\u043e \u043d\u043e\u0432\u043e\u0433\u043e<\/label> \t\t\t\t<\/td>\n<\/tr>\n<tr>\n<td class=\"input\"> \t\t\t\t\t<input type=\"radio\" id=\"vv40813\" \t\t\t\t\t\tclass=\"radio js-field-data\" \t\t\t\t\t\tname=\"variant[]\" \t\t\t\t\t\tvalue=\"40813\" \/> \t\t\t\t<\/td>\n<td class=\"label\"> \t\t\t\t\t<label for=\"vv40813\">\u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0438\u0430\u043b\u044c\u043d\u043e \u043d\u0435\u0442 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u043e\u0432\u043e\u0433\u043e<\/label> \t\t\t\t<\/td>\n<\/tr>\n<tr>\n<td class=\"input\"> \t\t\t\t\t<input type=\"radio\" id=\"vv40815\" \t\t\t\t\t\tclass=\"radio js-field-data\" \t\t\t\t\t\tname=\"variant[]\" \t\t\t\t\t\tvalue=\"40815\" \/> \t\t\t\t<\/td>\n<td class=\"label\"> \t\t\t\t\t<label for=\"vv40815\">\u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0438\u0430\u043b\u044c\u043d\u043e \u0432\u0441\u0451 \u0437\u043d\u0430\u043b, \u043d\u043e \u043a\u043e\u0435-\u0447\u0442\u043e \u043d\u043e\u0432\u043e\u0435 \u0443\u0437\u043d\u0430\u043b \u043f\u0440\u043e \u0442\u0430\u0440\u0430\u043d\u0442\u0443\u043b<\/label> \t\t\t\t<\/td>\n<\/tr>\n<tr>\n<td class=\"input\"> \t\t\t\t\t<input type=\"radio\" id=\"vv40817\" \t\t\t\t\t\tclass=\"radio js-field-data\" \t\t\t\t\t\tname=\"variant[]\" \t\t\t\t\t\tvalue=\"40817\" \/> \t\t\t\t<\/td>\n<td class=\"label\"> \t\t\t\t\t<label for=\"vv40817\">\u0441\u0432\u043e\u0435 \u043c\u043d\u0435\u043d\u0438\u0435 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0445<\/label> \t\t\t\t<\/td>\n<\/tr>\n<\/table>\n<p class=\"for_users_only_msg\">\u0422\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432 \u043e\u043f\u0440\u043e\u0441\u0435. <a href=\"\/login\/\">\u0412\u043e\u0439\u0434\u0438\u0442\u0435<\/a>, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430.<\/p>\n<p class=\"total\">\u041d\u0438\u043a\u0442\u043e \u0435\u0449\u0451 \u043d\u0435 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043b. \u0412\u043e\u0437\u0434\u0435\u0440\u0436\u0430\u0432\u0448\u0438\u0445\u0441\u044f \u043d\u0435\u0442.<\/p>\n<\/p><\/form>\n<form action=\"\/json\/polling\/\" class=\"poll\" method=\"post\">\n<div class=\"poll_title\">\u0441\u043e\u0431\u0438\u0440\u0430\u044e\u0441\u044c \u043b\u0438 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u0440\u0430\u043d\u0442\u0443\u043b \u0432 \u0441\u0432\u043e\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445<\/div>\n<p>  \t\t<input type=\"hidden\" name=\"post_id\" value=\"113298\"\/> \t\t<input type=\"hidden\" name=\"polling_question_id\" value=\"7875\"\/>  \t\t<\/p>\n<table class=\"answer\">\n<tr>\n<td class=\"input\"> \t\t\t\t\t<input type=\"radio\" id=\"vv40819\" \t\t\t\t\t\tclass=\"radio js-field-data\" \t\t\t\t\t\tname=\"variant[]\" \t\t\t\t\t\tvalue=\"40819\" \/> \t\t\t\t<\/td>\n<td class=\"label\"> \t\t\t\t\t<label for=\"vv40819\">\u0434\u0430, \u0441\u0442\u043e\u0438\u0442 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c<\/label> \t\t\t\t<\/td>\n<\/tr>\n<tr>\n<td class=\"input\"> \t\t\t\t\t<input type=\"radio\" id=\"vv40821\" \t\t\t\t\t\tclass=\"radio js-field-data\" \t\t\t\t\t\tname=\"variant[]\" \t\t\t\t\t\tvalue=\"40821\" \/> \t\t\t\t<\/td>\n<td class=\"label\"> \t\t\t\t\t<label for=\"vv40821\">\u043d\u0435\u0442, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u044b (\u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0445)<\/label> \t\t\t\t<\/td>\n<\/tr>\n<tr>\n<td class=\"input\"> \t\t\t\t\t<input type=\"radio\" id=\"vv40823\" \t\t\t\t\t\tclass=\"radio js-field-data\" \t\t\t\t\t\tname=\"variant[]\" \t\t\t\t\t\tvalue=\"40823\" \/> \t\t\t\t<\/td>\n<td class=\"label\"> \t\t\t\t\t<label for=\"vv40823\">\u043d\u0435\u0442, \u043f\u043e\u043a\u0430 \u0435\u0449\u0435 \u0431\u043e\u044e\u0441\u044c<\/label> \t\t\t\t<\/td>\n<\/tr>\n<tr>\n<td class=\"input\"> \t\t\t\t\t<input type=\"radio\" id=\"vv40825\" \t\t\t\t\t\tclass=\"radio js-field-data\" \t\t\t\t\t\tname=\"variant[]\" \t\t\t\t\t\tvalue=\"40825\" \/> \t\t\t\t<\/td>\n<td class=\"label\"> \t\t\t\t\t<label for=\"vv40825\">\u043d\u0435\u0442, \u043c\u043d\u0435 MySQL \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e<\/label> \t\t\t\t<\/td>\n<\/tr>\n<tr>\n<td class=\"input\"> \t\t\t\t\t<input type=\"radio\" id=\"vv40827\" \t\t\t\t\t\tclass=\"radio js-field-data\" \t\t\t\t\t\tname=\"variant[]\" \t\t\t\t\t\tvalue=\"40827\" \/> \t\t\t\t<\/td>\n<td class=\"label\"> \t\t\t\t\t<label for=\"vv40827\">\u043d\u0435\u0442, \u043f\u0440\u043e\u0434\u0443\u043a\u0442 \u0435\u0449\u0435 \u0441\u044b\u0440\u043e\u0439<\/label> \t\t\t\t<\/td>\n<\/tr>\n<tr>\n<td class=\"input\"> \t\t\t\t\t<input type=\"radio\" id=\"vv40829\" \t\t\t\t\t\tclass=\"radio js-field-data\" \t\t\t\t\t\tname=\"variant[]\" \t\t\t\t\t\tvalue=\"40829\" \/> \t\t\t\t<\/td>\n<td class=\"label\"> \t\t\t\t\t<label for=\"vv40829\">\u0441\u0432\u043e\u0435 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0445<\/label> \t\t\t\t<\/td>\n<\/tr>\n<\/table>\n<p class=\"for_users_only_msg\">\u0422\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432 \u043e\u043f\u0440\u043e\u0441\u0435. <a href=\"\/login\/\">\u0412\u043e\u0439\u0434\u0438\u0442\u0435<\/a>, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430.<\/p>\n<p class=\"total\">\u041d\u0438\u043a\u0442\u043e \u0435\u0449\u0451 \u043d\u0435 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043b. \u0412\u043e\u0437\u0434\u0435\u0440\u0436\u0430\u0432\u0448\u0438\u0445\u0441\u044f \u043d\u0435\u0442.<\/p>\n<\/p><\/form>\n<\/p><\/div>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/113298\/\"> http:\/\/habrahabr.ru\/post\/113298\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t<img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/cd4\/3b0\/b2b\/cd43b0b2b27bf50c1984198a9023db52.gif\" align=\"left\"\/>\u041a\u043e \u043c\u043d\u0435 \u043e\u0431\u0440\u0430\u0442\u0438\u043b\u0441\u044f \u043e\u0434\u0438\u043d \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c \u0441\u0442\u0430\u0440\u0442\u0430\u043f\u0430 \u0441\u043e\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0438\u0433\u0440\u044b \u0441 \u043f\u0440\u043e\u0441\u044c\u0431\u043e\u0439 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0441\u0432\u043e\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u041d\u0430 \u044d\u0442\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u0431\u044b\u043b \u0441\u0434\u0435\u043b\u0430\u043d \u0438 \u0437\u0430\u043f\u0443\u0449\u0435\u043d \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u0418 \u043d\u0430\u0434\u043e \u043e\u0442\u0434\u0430\u0442\u044c \u0434\u043e\u043b\u0436\u043d\u043e\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c, \u0447\u0442\u043e \u043f\u0440\u043e\u0435\u043a\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0438 \u0434\u0430\u0436\u0435 \u043f\u0440\u0438\u043d\u043e\u0441\u0438\u043b \u043a\u0430\u043a\u0443\u044e-\u0442\u043e \u043f\u0440\u0438\u0431\u044b\u043b\u044c. \u041d\u043e, \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0440\u0435\u043a\u043b\u0430\u043c\u043d\u0443\u044e \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044e \u043d\u0435 \u0438\u043c\u0435\u043b\u043e \u0441\u043c\u044b\u0441\u043b\u043e, \u0442\u0430\u043a \u043a\u0430\u043a \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0435 \u0432\u044b\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u043b \u043d\u0438 \u043a\u0430\u043a\u0438\u0445 \u043d\u0430\u0433\u0440\u0443\u0437\u043e\u043a. \u0412\u0430\u043b\u0438\u043b\u0441\u044f MySQL (35% \u043e\u0448\u0438\u0431\u043e\u043a).<\/p>\n<p>  \u041a\u043e\u0434 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u2026 \u0412 \u043e\u0431\u0449\u0435\u043c \u0443 \u043c\u0435\u043d\u044f \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0432\u043f\u0435\u0447\u0430\u0442\u043b\u0435\u043d\u0438\u0435, \u0447\u0442\u043e \u043f\u0438\u0441\u0430\u043b \u0435\u0433\u043e \u043d\u0435\u0434\u043e\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u0441\u0442\u0443\u0434\u0435\u043d\u0442\u2026 \u0418 \u044d\u0442\u043e, \u043d\u0435\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0443\u0436\u0435 \u0431\u044b\u043b \u0441\u0434\u0435\u043b\u0430\u043d \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u044b\u0439 \u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u043d\u0433 \u0434\u0440\u0443\u0433\u0438\u043c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u043e\u043c. \u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435, \u0447\u0442\u043e \u0440\u0430\u0434\u043e\u0432\u0430\u043b\u043e, \u0442\u043e \u044d\u0442\u043e \u0442\u043e, \u0447\u0442\u043e \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f \u043a\u0430\u043a\u043e\u0439-\u043b\u0438\u0431\u043e \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a. \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u044d\u0442\u043e \u0432\u0435\u0447\u043d\u043e \u0444\u043b\u0435\u0439\u043c\u043e\u0432\u044b\u0439 \u0432\u043e\u043f\u0440\u043e\u0441: \u0418\u0438\u0441\u0443\u0441 \u0438\u043b\u0438 \u041c\u0430\u0433\u043e\u043c\u0435\u0434? \u0411\u044b\u0442\u044c \u0438\u043b\u0438 \u043d\u0435 \u0411\u044b\u0442\u044c? Unix \u0438\u043b\u0438 Windows? \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u043b\u0438 \u043d\u0435 \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c? \u0418\u041c\u0425\u041e, \u041c\u043e\u0451 \u043c\u043d\u0435\u043d\u0438\u0435: \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0438 \u0437\u0430\u0442\u043e\u0447\u0435\u043d\u044b \u043f\u043e\u0434 \u0443\u0437\u043a\u0438\u0439 \u043a\u0440\u0443\u0433 \u0442\u0438\u043f\u043e\u0432\u044b\u0445 \u0437\u0430\u0434\u0430\u0447. \u0421\u043e\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u2014 \u0437\u0430\u0434\u0430\u0447\u0430, \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u043d\u0435 \u0442\u0438\u043f\u043e\u0432\u0430\u044f\u2026 \u041d\u043e, \u0432 \u0446\u0435\u043b\u043e\u043c, \u043c\u043d\u0435 \u043f\u0440\u043e\u0435\u043a\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u043c \u0438 \u044f \u0440\u0435\u0448\u0438\u043b \u0432\u0437\u044f\u0442\u044c\u0441\u044f \u0437\u0430 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0435. \u041d\u0430 \u044d\u0442\u043e\u043c \u0432\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u0442\u044c\u2026<\/p>\n<p>  \u041d\u0430\u0432\u0435\u0440\u043d\u043e, \u043f\u0440\u043e \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438 \u0442\u0435\u043c\u0443 highload \u043d\u0435 \u043f\u0438\u0441\u0430\u043b \u0442\u043e\u043b\u044c\u043a\u043e \u043b\u0435\u043d\u0438\u0432\u044b\u0439 WEB \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a, \u0437\u043d\u0430\u044e\u0449\u0438\u0439 \u0445\u043e\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u0432 \u044d\u0442\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438. \u041f\u0440\u0438\u043d\u0446\u0438\u043f\u0438\u0430\u043b\u044c\u043d\u043e, \u0447\u0442\u043e-\u0442\u043e \u043d\u043e\u0432\u043e\u0433\u043e, \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0432\u044b \u043d\u0435 \u043d\u0430\u0439\u0434\u0451\u0442\u0435. \u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0438\u0434\u0435\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 highload \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432, \u0431\u044b\u043b\u0438 \u043c\u043d\u043e\u044e \u0438\u0437\u043b\u043e\u0436\u0435\u043d\u044b \u0432 \u0446\u0438\u043a\u043b\u0435 \u0441\u0442\u0430\u0442\u0435\u0439 <a href=\"http:\/\/highloadblog.ru\/articles\/12.html\">HighLoad. \u0422\u0440\u0438 \u043a\u0438\u0442\u0430.<\/a>. \u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u043a\u0430\u043a \u044f \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u043b \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c PHP \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f NoSQL \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 <a href=\"http:\/\/tarantool.org\">tarantool<\/a>, \u0442\u043e \u0414\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434 \u043a\u0430\u0442. <\/p>\n<p>  \u0425\u043e\u0442\u044f, \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0438\u0430\u043b\u044c\u043d\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u043e\u0435, \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0435\u0435 \u043f\u043e\u0434 \u0434\u0430\u043d\u043d\u044b\u0439 \u043a\u0440\u0443\u0433 \u0437\u0430\u0434\u0430\u0447, key\/value \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435, \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u043e\u0439 \u043b\u043e\u0433\u0438\u043a\u0438 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0430 \u043b\u044e\u0431\u043e\u043c \u0434\u0440\u0443\u0433\u043e\u043c \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432\u043e\u043c \u044f\u0437\u044b\u043a\u0435.   <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-113298","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/113298","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=113298"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/113298\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=113298"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=113298"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=113298"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}