{"id":410683,"date":"2024-06-29T21:31:33","date_gmt":"2024-06-29T21:31:33","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=410683"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=410683","title":{"rendered":"<span>\u041a\u043d\u0438\u0433\u0430 \u00ab\u041f\u0430\u0442\u0442\u0435\u0440\u043d\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043d\u0430 Python: TDD, DDD \u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u0439\u043d\u043e-\u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430\u00bb<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\"><a href=\"https:\/\/habr.com\/ru\/company\/piter\/blog\/588060\/\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/4w\/rp\/0v\/4wrp0vpx7tinjxig7npb__fsdzm.jpeg\" align=\"left\" alt=\"image\" data-src=\"https:\/\/habrastorage.org\/webt\/4w\/rp\/0v\/4wrp0vpx7tinjxig7npb__fsdzm.jpeg\" data-blurred=\"true\"\/><\/a> \u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440\u043e\u0436\u0438\u0442\u0435\u043b\u0438! \u041f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0441\u0442\u044c Python \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u0442 \u0440\u0430\u0441\u0442\u0438, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442, \u043f\u0440\u043e\u0435\u043a\u0442\u044b, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 \u044d\u0442\u043e\u043c \u044f\u0437\u044b\u043a\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0441\u0442\u0430\u043d\u043e\u0432\u044f\u0442\u0441\u044f \u0432\u0441\u0435 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u043d\u0435\u0435 \u0438 \u0441\u043b\u043e\u0436\u043d\u0435\u0435. \u041c\u043d\u043e\u0433\u0438\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043f\u0440\u043e\u044f\u0432\u043b\u044f\u044e\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441 \u043a \u0432\u044b\u0441\u043e\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u044b\u043c \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u0430\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0442\u0430\u043a\u0438\u043c \u043a\u0430\u043a \u0447\u0438\u0441\u0442\u0430\u044f \u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u0439\u043d\u043e-\u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u0430\u044f \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u0438 \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u044b \u043f\u0440\u0435\u0434\u043c\u0435\u0442\u043d\u043e-\u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f (DDD). \u041d\u043e \u0438\u0445 \u0430\u0434\u0430\u043f\u0442\u0430\u0446\u0438\u044f \u043f\u043e\u0434 Python \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u0430.<\/p>\n<p>  \u0413\u0430\u0440\u0440\u0438 \u041f\u0435\u0440\u0441\u0438\u0432\u0430\u043b\u044c \u0438 \u0411\u043e\u0431 \u0413\u0440\u0435\u0433\u043e\u0440\u0438 \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u044f\u0442 \u0432\u0430\u0441 \u0441 \u043f\u0440\u043e\u0432\u0435\u0440\u0435\u043d\u043d\u044b\u043c\u0438 \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u0430\u043c\u0438, \u0447\u0442\u043e\u0431\u044b \u043a\u0430\u0436\u0434\u044b\u0439 \u043f\u0438\u0442\u043e\u043d\u0438\u0441\u0442 \u043c\u043e\u0433 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0443\u044e \u043e\u0442\u0434\u0430\u0447\u0443 \u043e\u0442 \u0442\u0435\u0441\u0442\u043e\u0432. \u0422\u0435\u043e\u0440\u0438\u044f \u043f\u043e\u0434\u043a\u0440\u0435\u043f\u043b\u0435\u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438 \u043d\u0430 \u0447\u0438\u0441\u0442\u043e\u043c Python, \u043b\u0438\u0448\u0435\u043d\u043d\u043e\u043c \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0438\u0437\u0431\u044b\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 Java \u0438 C#.<\/p>\n<p>  \u0412 \u044d\u0442\u043e\u0439 \u043a\u043d\u0438\u0433\u0435:<\/p>\n<ul>\n<li>\u00ab\u0418\u043d\u0432\u0435\u0440\u0441\u0438\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439\u00bb \u0438 \u0435\u0435 \u0441\u0432\u044f\u0437\u0438 \u0441 \u043f\u043e\u0440\u0442\u0430\u043c\u0438 \u0438 \u0430\u0434\u0430\u043f\u0442\u0435\u0440\u0430\u043c\u0438 (\u0433\u0435\u043a\u0441\u0430\u0433\u043e\u043d\u0430\u043b\u044c\u043d\u0430\u044f\/\u0447\u0438\u0441\u0442\u0430\u044f \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430).<\/li>\n<li>\u0420\u0430\u0437\u043b\u0438\u0447\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u0430\u043c\u0438 \u00ab\u0421\u0443\u0449\u043d\u043e\u0441\u0442\u044c\u00bb, \u00ab\u041e\u0431\u044a\u0435\u043a\u0442-\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u00bb \u0438 \u00ab\u0410\u0433\u0440\u0435\u0433\u0430\u0442\u00bb \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 DDD.<\/li>\n<li>\u041f\u0430\u0442\u0442\u0435\u0440\u043d\u044b \u00ab\u0420\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439\u00bb \u0438 UoW, \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u044e\u0449\u0438\u0435 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u0441\u0442\u0432\u043e \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445.<\/li>\n<li>\u041f\u0430\u0442\u0442\u0435\u0440\u043d\u044b \u00ab\u0421\u043e\u0431\u044b\u0442\u0438\u0435\u00bb, \u00ab\u041a\u043e\u043c\u0430\u043d\u0434\u0430\u00bb \u0438 \u00ab\u0428\u0438\u043d\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439\u00bb.<\/li>\n<li>\u0420\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043d\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u044b (CQRS).<\/li>\n<li>\u0421\u043e\u0431\u044b\u0442\u0438\u0439\u043d\u043e-\u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u0430\u044f \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u0438 \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f.<\/li>\n<\/ul>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<h2>\u041a\u043e\u043c\u0430\u043d\u0434\u044b \u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043a\u043e\u043c\u0430\u043d\u0434<\/h2>\n<p>  \u0412 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0433\u043b\u0430\u0432\u0435 \u043c\u044b \u0433\u043e\u0432\u043e\u0440\u0438\u043b\u0438 \u043e\u0431 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u043a\u0430\u043a \u0441\u043f\u043e\u0441\u043e\u0431\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u0432\u0445\u043e\u0434\u0435 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0443. \u041c\u044b \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u043b\u0438 \u043d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432 \u043c\u0430\u0448\u0438\u043d\u0443 \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439.<\/p>\n<p>  \u0420\u0430\u0434\u0438 \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043b\u0438 \u0432\u0441\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u0439. \u041a\u043e\u0433\u0434\u0430 API \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 POST \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0439 \u043f\u0430\u0440\u0442\u0438\u0438 \u0442\u043e\u0432\u0430\u0440\u0430, \u043e\u043d \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043d\u043e\u0432\u043e\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u0435 BatchCreated \u0438 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0435\u0433\u043e \u0442\u0430\u043a, \u043a\u0430\u043a \u0435\u0441\u043b\u0438 \u0431\u044b \u044d\u0442\u043e \u0431\u044b\u043b\u043e \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u0435. \u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043d\u0435\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u043c. \u0412 \u043a\u043e\u043d\u0446\u0435 \u043a\u043e\u043d\u0446\u043e\u0432, \u043f\u0430\u0440\u0442\u0438\u044f \u0442\u043e\u0432\u0430\u0440\u0430 \u0435\u0449\u0435 \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0430, \u0438\u043c\u0435\u043d\u043d\u043e \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u043b\u0438 API. \u041c\u044b \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c\u0441\u044f \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u043a\u043e\u043d\u0446\u0435\u043f\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u043a \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u0432\u043e\u0434\u0430 \u043a\u043e\u043c\u0430\u043d\u0434 \u0438 \u043f\u043e\u043a\u0430\u0436\u0435\u043c, \u043a\u0430\u043a \u043e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043e\u0434\u043d\u043e\u0439 \u0438 \u0442\u043e\u0439 \u0436\u0435 \u0448\u0438\u043d\u043e\u0439 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u043f\u043e \u0434\u0440\u0443\u0433\u0438\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c\u0438.<\/p>\n<p>  \u041a\u043e\u0434 \u0434\u043b\u044f \u044d\u0442\u043e\u0439 \u0433\u043b\u0430\u0432\u044b \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0432\u0435\u0442\u043a\u0435 chapter_10_commands \u043d\u0430 GitHub:<\/p>\n<pre><code class=\"python\">git clone https:\/\/github.com\/cosmicpython\/code.git cd code git checkout chapter_10_commands # \u0438\u043b\u0438, \u0435\u0441\u043b\u0438 \u043f\u0438\u0448\u0435\u0442\u0435 \u043a\u043e\u0434 \u043f\u043e \u0445\u043e\u0434\u0443 \u0447\u0442\u0435\u043d\u0438\u044f, \u0432\u043e\u0437\u044c\u043c\u0438\u0442\u0435 \u0437\u0430 \u043e\u0441\u043d\u043e\u0432\u0443 # \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b \u0438\u0437 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0433\u043b\u0430\u0432\u044b: git checkout chapter_09_all_messagebus<\/code><\/pre>\n<p>  <\/p>\n<h3>\u041a\u043e\u043c\u0430\u043d\u0434\u044b \u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u044f<\/h3>\n<p>  \u041f\u043e\u0434\u043e\u0431\u043d\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u044f\u043c, <i>\u043a\u043e\u043c\u0430\u043d\u0434\u044b<\/i> \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0441\u043e\u0431\u043e\u0439 \u0442\u0438\u043f \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u2014 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438, \u043f\u043e\u0441\u044b\u043b\u0430\u0435\u043c\u044b\u0435 \u043e\u0434\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u044c\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0434\u0440\u0443\u0433\u043e\u0439. \u041c\u044b \u043e\u0431\u044b\u0447\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043d\u0435\u043c\u044b\u043c\u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043c\u043e\u0436\u0435\u043c \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0438\u0445 \u043f\u043e\u0447\u0442\u0438 \u0442\u0430\u043a \u0436\u0435, \u043a\u0430\u043a \u0441\u043e\u0431\u044b\u0442\u0438\u044f.<\/p>\n<p>  \u041d\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u043c\u0438 \u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u044f\u043c\u0438 \u043e\u0447\u0435\u043d\u044c \u0432\u0430\u0436\u043d\u044b.<\/p>\n<p>  \u041a\u043e\u043c\u0430\u043d\u0434\u044b \u043f\u043e\u0441\u044b\u043b\u0430\u044e\u0442\u0441\u044f \u043e\u0434\u043d\u0438\u043c \u0430\u043a\u0442\u043e\u0440\u043e\u043c \u0434\u0440\u0443\u0433\u043e\u043c\u0443 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c\u0443 \u0430\u043a\u0442\u043e\u0440\u0443 \u0432 \u043d\u0430\u0434\u0435\u0436\u0434\u0435, \u0447\u0442\u043e \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0435\u0442 \u0442\u043e \u0438\u043b\u0438 \u0438\u043d\u043e\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u0435. \u041a\u043e\u0433\u0434\u0430 \u043c\u044b \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u0444\u043e\u0440\u043c\u0443 \u0432 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a API, \u0442\u043e \u043f\u043e\u0441\u044b\u043b\u0430\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443. \u041a\u043e\u043c\u0430\u043d\u0434\u0430\u043c \u0434\u0430\u044e\u0442\u0441\u044f \u0438\u043c\u0435\u043d\u0430 \u0432 \u0444\u043e\u0440\u043c\u0435 \u0433\u043b\u0430\u0433\u043e\u043b\u043e\u0432 \u043f\u043e\u0432\u0435\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043d\u0430\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u044f \u0432\u0440\u043e\u0434\u0435 \u00aballocate stock\u00bb (\u00ab\u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0442\u043e\u0432\u0430\u0440\u043d\u044b\u0439 \u0437\u0430\u043f\u0430\u0441\u00bb) \u0438\u043b\u0438 \u00abdelay shipment\u00bb (\u00ab\u0437\u0430\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043f\u043e\u0441\u0442\u0430\u0432\u043a\u0443\u00bb).<\/p>\n<p>  \u041a\u043e\u043c\u0430\u043d\u0434\u044b \u0443\u043b\u0430\u0432\u043b\u0438\u0432\u0430\u044e\u0442 <i>\u043d\u0430\u043c\u0435\u0440\u0435\u043d\u0438\u0435<\/i> (intent). \u041e\u043d\u0438 \u0432\u044b\u0440\u0430\u0436\u0430\u044e\u0442 \u0442\u043e, \u0447\u0435\u0433\u043e \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u043e\u0442 \u0441\u0438\u0441\u0442\u0435\u043c\u044b. \u041a\u043e\u0433\u0434\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f, \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u0435\u043b\u044c \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0435.<\/p>\n<p>  \u0410\u043a\u0442\u043e\u0440\u044b \u0442\u0440\u0430\u043d\u0441\u043b\u0438\u0440\u0443\u044e\u0442 <i>\u0441\u043e\u0431\u044b\u0442\u0438\u044f<\/i> \u0432\u0441\u0435\u043c \u0437\u0430\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0441\u043b\u0443\u0448\u0430\u0442\u0435\u043b\u044f\u043c (listeners). \u041a\u043e\u0433\u0434\u0430 \u043c\u044b \u043f\u0443\u0431\u043b\u0438\u043a\u0443\u0435\u043c \u0441\u043e\u0431\u044b\u0442\u0438\u0435 BatchQuantityChanged, \u0442\u043e \u043d\u0435 \u0437\u043d\u0430\u0435\u043c, \u043a\u0442\u043e \u0435\u0433\u043e \u043f\u043e\u0434\u0445\u0432\u0430\u0442\u0438\u0442. \u0421\u043e\u0431\u044b\u0442\u0438\u044f\u043c \u0434\u0430\u044e\u0442\u0441\u044f \u0438\u043c\u0435\u043d\u0430 \u0432 \u0444\u043e\u0440\u043c\u0435 \u0433\u043b\u0430\u0433\u043e\u043b\u043e\u0432 \u043f\u0440\u043e\u0448\u0435\u0434\u0448\u0435\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438\u043b\u0438 \u043f\u0440\u0438\u0447\u0430\u0441\u0442\u043d\u044b\u0445 \u043e\u0431\u043e\u0440\u043e\u0442\u043e\u0432 \u0432\u0440\u043e\u0434\u0435 \u00aborder allocated to stock\u00bb (\u00ab\u0437\u0430\u043a\u0430\u0437 \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d \u0432 \u0442\u043e\u0432\u0430\u0440\u043d\u043e\u043c \u0437\u0430\u043f\u0430\u0441\u0435\u00bb) \u0438\u043b\u0438 \u00abshipment delayed\u00bb (\u00ab\u043e\u0442\u0433\u0440\u0443\u0437\u043a\u0430 \u0437\u0430\u0434\u0435\u0440\u0436\u0430\u043d\u0430\u00bb).<\/p>\n<p>  \u041c\u044b \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0441\u043e\u0431\u044b\u0442\u0438\u044f, \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u043e\u0431\u0449\u0438\u0442\u044c \u043e\u0431 \u0443\u0441\u043f\u0435\u0448\u043d\u044b\u0445 \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u0445.<\/p>\n<p>  \u0421\u043e\u0431\u044b\u0442\u0438\u044f \u0443\u043b\u0430\u0432\u043b\u0438\u0432\u0430\u044e\u0442 <i>\u0444\u0430\u043a\u0442\u044b<\/i> \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u043b\u043e \u0432 \u043f\u0440\u043e\u0448\u043b\u043e\u043c. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043c\u044b \u043d\u0435 \u0437\u043d\u0430\u0435\u043c, \u043a\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0441\u043e\u0431\u044b\u0442\u0438\u0435, \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u0435\u043b\u0435\u0439 \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0432\u043e\u043b\u043d\u043e\u0432\u0430\u0442\u044c, \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u0435\u043b\u044f\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0438\u043b\u0438 \u043d\u0435\u0442. \u0412 \u0442\u0430\u0431\u043b. 10.1 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/g-\/df\/3v\/g-df3vt9gqhbrqdgw0g0xmovkfa.jpeg\" alt=\"image\" data-src=\"https:\/\/habrastorage.org\/webt\/g-\/df\/3v\/g-df3vt9gqhbrqdgw0g0xmovkfa.jpeg\" data-blurred=\"true\"\/><\/div>\n<p>  \u041a\u0430\u043a\u0438\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0441\u0435\u0439\u0447\u0430\u0441 \u0435\u0441\u0442\u044c \u0432 \u043d\u0430\u0448\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435?<\/p>\n<p>  <b>\u0412\u044b\u0442\u0430\u0441\u043a\u0438\u0432\u0430\u0435\u043c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u043c\u0430\u043d\u0434 (src\/allocation\/domain\/commands.py)<\/b><\/p>\n<pre><code class=\"python\">class Command:       pass  @dataclass class Allocate(Command): 1       orderid: str       sku: str       qty: int  @dataclass class CreateBatch(Command): 2       ref: str       sku: str       qty: int       eta: Optional[date] = None  @dataclass class ChangeBatchQuantity(Command): 3       ref: str       qty: int <\/code><\/pre>\n<p>  <b>1<\/b> commands.Allocate \u0437\u0430\u043c\u0435\u043d\u0438\u0442 events.AllocationRequired.<br \/>  <b>2<\/b> commands.CreateBatch \u0437\u0430\u043c\u0435\u043d\u0438\u0442 events.BatchCreated.<br \/>  <b>3<\/b> commands.ChangeBatchQuantity \u0437\u0430\u043c\u0435\u043d\u0438\u0442 events.BatchQuantityChanged.<\/p>\n<h3>\u0420\u0430\u0437\u043b\u0438\u0447\u0438\u044f \u0432 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439<\/h3>\n<p>  \u0417\u0430\u043c\u0435\u043d\u0430 \u0438\u043c\u0435\u043d \u0438 \u0433\u043b\u0430\u0433\u043e\u043b\u043e\u0432 \u2014 \u044d\u0442\u043e \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e, \u043d\u043e \u0436\u043e\u043d\u0433\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u043b\u043e\u0432\u0430\u043c\u0438 \u043d\u0435 \u043f\u043e\u043c\u0435\u043d\u044f\u0435\u0442 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b. \u041c\u044b \u0445\u043e\u0442\u0438\u043c \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u0441 \u0441\u043e\u0431\u044b\u0442\u0438\u044f\u043c\u0438 \u043f\u043e\u0447\u0442\u0438 \u0442\u0430\u043a \u0436\u0435, \u043a\u0430\u043a \u0441 \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u043c\u0438, \u043d\u043e \u043d\u0435 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0448\u0438\u043d\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439.<\/p>\n<p>  <b>\u041d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043f\u043e-\u0440\u0430\u0437\u043d\u043e\u043c\u0443 (src\/allocation\/service_layer\/messagebus.py)<\/b><\/p>\n<pre><code class=\"python\">Message = Union[commands.Command, events.Event]  def handle(message: Message, uow: unit_of_work.AbstractUnitOfWork): 1     results = []     queue = [message]     while queue:         message = queue.pop(0)         if isinstance(message, events.Event):             handle_event(message, queue, uow) \u008d2         elif isinstance(message, commands.Command):             cmd_result = handle_command(message, queue, uow) \u008d2             results.append(cmd_result)          else:             raise Exception(f'{message} was not an Event or Command')      return results<\/code><\/pre>\n<p>  <b>1<\/b> \u0423 \u043d\u0435\u0435 \u0432\u0441\u0435 \u0435\u0449\u0435 \u0435\u0441\u0442\u044c \u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0442\u043e\u0447\u043a\u0430 \u0432\u0445\u043e\u0434\u0430 handle(), \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044e\u0449\u0430\u044f message \u2014 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u043b\u0438\u0431\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u0435.<br \/>  <b>2<\/b> \u041c\u044b \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0434\u0432\u0443\u043c \u0440\u0430\u0437\u043d\u044b\u043c \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u044b \u043d\u0438\u0436\u0435.<\/p>\n<p>  \u0412\u043e\u0442 \u043a\u0430\u043a \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u0441\u043e\u0431\u044b\u0442\u0438\u044f\u043c\u0438:<\/p>\n<p>  <b>\u0421\u043e\u0431\u044b\u0442\u0438\u044f \u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u0435\u0440\u0432\u0430\u0442\u044c \u043f\u043e\u0442\u043e\u043a (src\/allocation\/service_layer\/messagebus.py)<\/b><\/p>\n<pre><code class=\"python\">def handle_event(     event: events.Event,     queue: List[Message],     uow: unit_of_work.AbstractUnitOfWork ):    for handler in EVENT_HANDLERS[type(event)]: 1      try:          logger.debug('handling event %s with handler %s', event,          handler)          handler(event, uow=uow)          queue.extend(uow.collect_new_events())     except Exception:          logger.exception('Exception handling event %s', event)          continue 2\u008d<\/code><\/pre>\n<p>  <b>1 <\/b>\u0421\u043e\u0431\u044b\u0442\u0438\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u0434\u0438\u0441\u043f\u0435\u0442\u0447\u0435\u0440\u0443, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u0434\u0435\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u043c\u043d\u043e\u0433\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u044f.<br \/>  <b>2<\/b> \u041e\u043d \u043e\u0442\u043b\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0438 \u043b\u043e\u0433\u0438\u0440\u0443\u0435\u0442 \u043e\u0448\u0438\u0431\u043a\u0438, \u043d\u043e \u043d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u043c \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u0442\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439.<\/p>\n<p>  \u0418 \u0432\u043e\u0442 \u043a\u0430\u043a \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u044b:<\/p>\n<p>  <b>\u041a\u043e\u043c\u0430\u043d\u0434\u044b \u0437\u0430\u043d\u043e\u0432\u043e \u0438\u043d\u0438\u0446\u0438\u0438\u0440\u0443\u044e\u0442 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f (src\/allocation\/service_layer\/messagebus.py)<\/b><\/p>\n<pre><code class=\"python\">def handle_command(        command: commands.Command,        queue: List[Message],        uow: unit_of_work.AbstractUnitOfWork ):        logger.debug('handling command %s', command)        try:            handler = COMMAND_HANDLERS[type(command)] 1            result = handler(command, uow=uow)            queue.extend(uow.collect_new_events())            return result \u008e3        except Exception:            logger.exception('Exception handling command %s', command)            raise 2<\/code><\/pre>\n<p> \u008d<br \/>  <b>1<\/b> \u0414\u0438\u0441\u043f\u0435\u0442\u0447\u0435\u0440 \u043a\u043e\u043c\u0430\u043d\u0434 \u043e\u0436\u0438\u0434\u0430\u0435\u0442, \u0447\u0442\u043e \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0431\u0443\u0434\u0435\u0442 \u043b\u0438\u0448\u044c \u043e\u0434\u0438\u043d \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a.<br \/>  <b>2<\/b> \u0415\u0441\u043b\u0438 \u0438\u043d\u0438\u0446\u0438\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u043a\u0430\u043a\u0438\u0435-\u043b\u0438\u0431\u043e \u043e\u0448\u0438\u0431\u043a\u0438, \u0442\u043e \u043e\u043d\u0438 \u0431\u044b\u0441\u0442\u0440\u043e \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u044e\u0442 \u0440\u0430\u0431\u043e\u0442\u0443 \u0438 \u043f\u043e\u0442\u043e\u043c \u0432\u0441\u043f\u043b\u044b\u0432\u0430\u044e\u0442.<br \/>  <b>3<\/b> \u0418\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f return result \u0441 \u043d\u0430\u043c\u0438 \u043d\u0435\u043d\u0430\u0434\u043e\u043b\u0433\u043e; \u043a\u0430\u043a \u0443\u0436\u0435 \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043b\u043e\u0441\u044c \u0432 \u043f\u043e\u0434\u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u00ab\u0423\u0440\u043e\u0434\u043b\u0438\u0432\u044b\u0439 \u043a\u043e\u0441\u0442\u044b\u043b\u044c: \u0448\u0438\u043d\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b\u00bb \u043d\u0430 \u0441. 189, \u044d\u0442\u043e \u043a\u043e\u0441\u0442\u044b\u043b\u044c, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0439 \u0448\u0438\u043d\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u043f\u0430\u0440\u0442\u0438\u044e \u0442\u043e\u0432\u0430\u0440\u0430, \u0447\u0442\u043e\u0431\u044b API \u043c\u043e\u0433 \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c. \u041c\u044b \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u043c \u044d\u0442\u043e \u0432 \u0433\u043b\u0430\u0432\u0435 12.<\/p>\n<p>  \u041c\u044b \u0442\u0430\u043a\u0436\u0435 \u0437\u0430\u043c\u0435\u043d\u044f\u0435\u043c \u0435\u0434\u0438\u043d\u044b\u0439 \u0441\u043b\u043e\u0432\u0430\u0440\u044c HANDLERS \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u0440\u044f\u043c\u0438 \u0434\u043b\u044f \u043a\u043e\u043c\u0430\u043d\u0434 \u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u0439. \u041f\u043e \u0441\u043e\u0433\u043b\u0430\u0448\u0435\u043d\u0438\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043c\u043e\u0433\u0443\u0442 \u0438\u043c\u0435\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a.<\/p>\n<p>  <b>\u041d\u043e\u0432\u044b\u0435 \u0441\u043b\u043e\u0432\u0430\u0440\u0438 \u0441 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c\u0438 (src\/allocation\/service_layer\/messagebus.py)<\/b><\/p>\n<pre><code class=\"python\">EVENT_HANDLERS = {      events.OutOfStock: [handlers.send_out_of_stock_notification], } # \u0442\u0438\u043f: Dict[Type[events.Event], List[Callable]]  COMMAND_HANDLERS = {      commands.Allocate: handlers.allocate,      commands.CreateBatch: handlers.add_batch,      commands.ChangeBatchQuantity: handlers.change_batch_quantity, } # \u0442\u0438\u043f: Dict[Type[commands.Command], Callable]<\/code><\/pre>\n<p>  <\/p>\n<h3>\u0421\u043e\u0431\u044b\u0442\u0438\u044f, \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043e\u0448\u0438\u0431\u043e\u043a<\/h3>\n<p>  \u041c\u043d\u043e\u0433\u0438\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0447\u0443\u0432\u0441\u0442\u0432\u0443\u044e\u0442 \u0441\u0435\u0431\u044f \u043d\u0435\u043a\u043e\u043c\u0444\u043e\u0440\u0442\u043d\u043e \u043d\u0430 \u044d\u0442\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u0438 \u0441\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u044e\u0442: \u00ab\u0427\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442, \u043a\u043e\u0433\u0434\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u043d\u0435 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f? \u0427\u0442\u043e \u044f \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043d\u0430\u0445\u043e\u0434\u0438\u043b\u0430\u0441\u044c \u0432 \u0441\u043e\u0433\u043b\u0430\u0441\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438?\u00bb \u0415\u0441\u043b\u0438 \u0443\u0434\u0430\u0435\u0442\u0441\u044f \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0443 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0432 messagebus.handle, \u043f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0438\u0437-\u0437\u0430 \u043d\u0435\u0445\u0432\u0430\u0442\u043a\u0438 \u043f\u0430\u043c\u044f\u0442\u0438, \u0442\u043e \u043a\u0430\u043a \u0431\u044b\u0442\u044c \u0441 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u043c\u0438 \u0438\u0437-\u0437\u0430 \u043f\u043e\u0442\u0435\u0440\u044f\u043d\u043d\u044b\u0445 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439?<\/p>\n<p>  \u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u0445\u0443\u0434\u0448\u0435\u0433\u043e \u0441\u043b\u0443\u0447\u0430\u044f: \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0432 \u043d\u0435\u0441\u043e\u0433\u043b\u0430\u0441\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438. \u041a\u0430\u043a\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430 \u043c\u043e\u0433\u043b\u0430 \u0431\u044b \u043a \u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438? \u041d\u0435\u0440\u0435\u0434\u043a\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0432 \u0442\u0430\u043a\u043e\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438, \u043a\u043e\u0433\u0434\u0430 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0430 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438.<\/p>\n<p>  \u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u044c\u0442\u0435: \u043c\u044b \u0440\u0430\u0437\u043c\u0435\u0449\u0430\u0435\u043c \u0437\u0430\u043a\u0430\u0437 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u043d\u0430 \u0442\u0440\u0438 \u0448\u0442\u0443\u043a\u0438 \u0430\u0440\u0442\u0438\u043a\u0443\u043b\u0430 \u041a\u0420\u0415\u0421\u041b\u041e_\u0416\u0415\u041b\u0410\u041d\u041d\u041e\u0415, DESIRABLE_BEANBAG, \u043d\u043e \u043a\u0430\u043a\u0438\u043c-\u0442\u043e \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0443 \u043d\u0430\u0441 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0441\u0442\u0430\u0432\u0448\u0435\u0433\u043e\u0441\u044f \u0442\u043e\u0432\u0430\u0440\u0430. \u042d\u0442\u043e \u043f\u0440\u0438\u0432\u0435\u043b\u043e \u0431\u044b \u043a \u043d\u0435\u0441\u043e\u0433\u043b\u0430\u0441\u043e\u0432\u0430\u043d\u043d\u043e\u043c\u0443 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044e: \u0442\u0440\u0438 \u0448\u0442\u0443\u043a\u0438 \u0442\u043e\u0432\u0430\u0440\u0430 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0438 \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u044b \u0432 \u0437\u0430\u043a\u0430\u0437\u0435, \u0438 \u0438\u043c\u0435\u044e\u0442\u0441\u044f \u0432 \u043d\u0430\u043b\u0438\u0447\u0438\u0438, \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0432\u044b \u043d\u0430 \u044d\u0442\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435. \u0418 \u0435\u0441\u043b\u0438 \u043f\u043e\u0437\u0436\u0435 \u043c\u044b \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u043c \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u0437\u0430\u043a\u0430\u0437 \u043d\u0430 \u0442\u0435 \u0436\u0435 \u0441\u0430\u043c\u044b\u0435 \u043a\u0440\u0435\u0441\u043b\u0430, \u0442\u043e \u0443 \u0441\u043b\u0443\u0436\u0431\u044b \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u043d\u0430\u0447\u043d\u0443\u0442\u0441\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b.<\/p>\n<p>  \u041d\u043e \u043c\u044b \u0443\u0436\u0435 \u043f\u043e\u0437\u0430\u0431\u043e\u0442\u0438\u043b\u0438\u0441\u044c \u043e \u0442\u0430\u043a\u0438\u0445 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f\u0445 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0441\u043b\u0443\u0436\u0431\u044b \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u0437\u0430\u043a\u0430\u0437\u043e\u0432. \u041c\u044b \u0442\u0449\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b\u0438 <i>\u0430\u0433\u0440\u0435\u0433\u0430\u0442\u044b<\/i>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0442 \u043a\u0430\u043a \u0433\u0440\u0430\u043d\u0438\u0446\u044b \u0441\u043e\u0433\u043b\u0430\u0441\u043e\u0432\u0430\u043d\u043d\u043e\u0441\u0442\u0438, \u0438 \u0432\u0432\u0435\u043b\u0438 \u043f\u0430\u0442\u0442\u0435\u0440\u043d UoW, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0430\u0442\u043e\u043c\u0430\u0440\u043d\u044b\u043c \u0443\u0441\u043f\u0435\u0445\u043e\u043c \u0438\u043b\u0438 \u043d\u0435\u0443\u0434\u0430\u0447\u0435\u0439 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0432 \u0430\u0433\u0440\u0435\u0433\u0430\u0442\u0435.<\/p>\n<p>  \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u0440\u0430\u0437\u043c\u0435\u0449\u0430\u0435\u043c \u0437\u0430\u043a\u0430\u0437 \u043d\u0430 \u0442\u043e\u0432\u0430\u0440, \u0433\u0440\u0430\u043d\u0438\u0446\u0435\u0439 \u0441\u043e\u0433\u043b\u0430\u0441\u043e\u0432\u0430\u043d\u043d\u043e\u0441\u0442\u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0430\u0433\u0440\u0435\u0433\u0430\u0442 Product. \u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u043c\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u043d\u0435\u0447\u0430\u044f\u043d\u043d\u043e \u043f\u0440\u0435\u0432\u044b\u0441\u0438\u0442\u044c \u043b\u0438\u043c\u0438\u0442 \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u0439: \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0430\u044f \u0442\u043e\u0432\u0430\u0440\u043d\u0430\u044f \u043f\u043e\u0437\u0438\u0446\u0438\u044f \u0437\u0430\u043a\u0430\u0437\u0430 \u043b\u0438\u0431\u043e \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0430, \u043b\u0438\u0431\u043e \u043d\u0435\u0442 \u2014 \u0442\u0443\u0442 \u043d\u0435\u0442 \u043c\u0435\u0441\u0442\u0430 \u0434\u043b\u044f \u043d\u0435\u0441\u043e\u0433\u043b\u0430\u0441\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0439.<\/p>\n<p>  \u041f\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044e \u043c\u044b \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u043c, \u0447\u0442\u043e\u0431\u044b \u0434\u0432\u0430 \u0430\u0433\u0440\u0435\u0433\u0430\u0442\u0430 \u0441\u043e\u0433\u043b\u0430\u0441\u043e\u0432\u044b\u0432\u0430\u043b\u0438\u0441\u044c \u0441\u0440\u0430\u0437\u0443, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0435\u0441\u043b\u0438 \u043c\u044b \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u043c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u0438 \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u0430\u0433\u0440\u0435\u0433\u0430\u0442, \u0442\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0432\u0441\u0435 \u0440\u0430\u0432\u043d\u043e \u043c\u043e\u0436\u0435\u0442 \u0432\u043f\u043e\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0438 \u0441\u0442\u0430\u0442\u044c \u0441\u043e\u0433\u043b\u0430\u0441\u043e\u0432\u0430\u043d\u043d\u043e\u0439. \u041c\u044b \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u043d\u0430\u0440\u0443\u0448\u0430\u0442\u044c \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439.<\/p>\n<p>  \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043b\u0443\u0447\u0448\u0435 \u043f\u043e\u043d\u044f\u0442\u044c \u043f\u0440\u0438\u0447\u0438\u043d\u0443 \u0440\u0430\u0437\u0431\u0438\u0432\u043a\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u043d\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u044f. \u041a\u043e\u0433\u0434\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0445\u043e\u0447\u0435\u0442, \u0447\u0442\u043e\u0431\u044b \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0447\u0442\u043e-\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u043b\u0430, \u043c\u044b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0435\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441 \u043a\u0430\u043a <i>\u043a\u043e\u043c\u0430\u043d\u0434\u0443<\/i>. \u042d\u0442\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043e\u0434\u0438\u043d <i>\u0430\u0433\u0440\u0435\u0433\u0430\u0442<\/i> \u0438 \u043b\u0438\u0431\u043e \u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u0441 \u0440\u0430\u0431\u043e\u0442\u043e\u0439, \u043b\u0438\u0431\u043e \u043d\u0435\u0442. \u0412\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043c\u0435\u043b\u043a\u0438\u0435 \u0434\u0435\u0442\u0430\u043b\u0438 \u0432\u0440\u043e\u0434\u0435 \u043e\u0447\u0438\u0441\u0442\u043a\u0438 \u0438 \u0440\u0430\u0441\u0441\u044b\u043b\u043a\u0438 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439 \u043c\u043e\u0436\u043d\u043e \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <i>\u0441\u043e\u0431\u044b\u0442\u0438\u044f<\/i>. \u0423\u0441\u043f\u0435\u0448\u043d\u043e\u0441\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0441\u0442\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0441\u043e\u0431\u044b\u0442\u0438\u0439.<\/p>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u043f\u0440\u0438\u043c\u0435\u0440 (\u0438\u0437 \u0434\u0440\u0443\u0433\u043e\u0433\u043e, \u0432\u043e\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430), \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c \u043f\u043e\u0447\u0435\u043c\u0443.<\/p>\n<p>  \u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u044c\u0442\u0435, \u0447\u0442\u043e \u043c\u044b \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u0443\u0435\u043c \u043e\u043d\u043b\u0430\u0439\u043d-\u043c\u0430\u0433\u0430\u0437\u0438\u043d, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u043e\u0434\u0430\u0435\u0442 \u043f\u0440\u0435\u0434\u043c\u0435\u0442\u044b \u0440\u043e\u0441\u043a\u043e\u0448\u0438. \u041e\u0442\u0434\u0435\u043b \u043c\u0430\u0440\u043a\u0435\u0442\u0438\u043d\u0433\u0430 \u0445\u043e\u0447\u0435\u0442 \u0432\u043e\u0437\u043d\u0430\u0433\u0440\u0430\u0436\u0434\u0430\u0442\u044c \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u0437\u0430 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u044b\u0435 \u0437\u0430\u043a\u0430\u0437\u044b. \u041c\u044b \u0431\u0443\u0434\u0435\u043c \u043e\u0442\u043c\u0435\u0447\u0430\u0442\u044c \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u043a\u0430\u043a VIP-\u043f\u0435\u0440\u0441\u043e\u043d \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043e\u043d\u0438 \u0441\u043e\u0432\u0435\u0440\u0448\u0430\u0442 \u0441\u0432\u043e\u044e \u0442\u0440\u0435\u0442\u044c\u044e \u043f\u043e\u043a\u0443\u043f\u043a\u0443, \u0438 \u044d\u0442\u043e \u0434\u0430\u0441\u0442 \u0438\u043c \u043f\u0440\u0430\u0432\u043e \u043d\u0430 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u043d\u043e\u0435 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u0435 \u0438 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u041a\u0440\u0438\u0442\u0435\u0440\u0438\u0438 \u043f\u0440\u0438\u043d\u044f\u0442\u0438\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043e \u043a\u043b\u0438\u0435\u043d\u0442\u0435 \u043f\u043e \u044d\u0442\u043e\u0439 \u0441\u0445\u0435\u043c\u0435 \u0438\u043c\u0435\u044e\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435:<\/p>\n<p>  \u041f\u0440\u0438 \u043d\u0430\u043b\u0438\u0447\u0438\u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0441 \u0434\u0432\u0443\u043c\u044f \u0437\u0430\u043a\u0430\u0437\u0430\u043c\u0438 \u0432 \u0441\u0432\u043e\u0435\u0439 \u0438\u0441\u0442\u043e\u0440\u0438\u0438,<br \/>  \u043a\u043e\u0433\u0434\u0430 \u043a\u043b\u0438\u0435\u043d\u0442 \u0434\u0435\u043b\u0430\u0435\u0442 \u0442\u0440\u0435\u0442\u0438\u0439 \u0437\u0430\u043a\u0430\u0437,<br \/>  \u043e\u043d \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043f\u043e\u043c\u0435\u0447\u0435\u043d \u043a\u0430\u043a VIP-\u043f\u0435\u0440\u0441\u043e\u043d\u0430.<br \/>  \u041a\u043e\u0433\u0434\u0430 \u043a\u043b\u0438\u0435\u043d\u0442 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f VIP-\u043f\u0435\u0440\u0441\u043e\u043d\u043e\u0439 \u0432\u043f\u0435\u0440\u0432\u044b\u0435,<br \/>  \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0435\u043c\u0443 \u0438\u043c\u0435\u0439\u043b \u0441 \u043f\u043e\u0437\u0434\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f\u043c\u0438<\/p>\n<p>  \u041c\u044b \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043f\u0440\u0438\u0435\u043c\u044b, \u0443\u0436\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043d\u044b\u0435 \u0432 \u044d\u0442\u043e\u0439 \u043a\u043d\u0438\u0433\u0435, \u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043d\u043e\u0432\u044b\u0439 \u0430\u0433\u0440\u0435\u0433\u0430\u0442 History, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442 \u0437\u0430\u043a\u0430\u0437\u044b \u0438 \u043c\u043e\u0436\u0435\u0442 \u0438\u043d\u0438\u0446\u0438\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u043f\u0440\u0435\u0434\u043c\u0435\u0442\u043d\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438, \u043a\u043e\u0433\u0434\u0430 \u044d\u0442\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u044f\u044e\u0442\u0441\u044f. \u041c\u044b \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u0443\u0435\u043c \u043a\u043e\u0434 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<p>  <b>VIP-\u043a\u043b\u0438\u0435\u043d\u0442 (\u043f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u0434\u0430 \u0434\u043b\u044f \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430)<\/b><\/p>\n<pre><code class=\"python\">class History: # \u0410\u0433\u0440\u0435\u0433\u0430\u0442       def __init__(self, customer_id: int):         self.orders = set() # Set[HistoryEntry]         self.customer_id = customer_id       def record_order(self, order_id: str, order_amount: int): 1           entry = HistoryEntry(order_id, order_amount)            if entry in self.orders:              return            self.orders.add(entry)            if len(self.orders) == 3:              self.events.append(                  CustomerBecameVIP(self.customer_id)              )  def create_order_from_basket(uow, cmd: CreateOrder): \u008d2     with uow:            order = Order.from_basket(cmd.customer_id, cmd.basket_items)            uow.orders.add(order)            uow.commit() # \u0438\u043d\u0438\u0446\u0438\u0438\u0440\u0443\u0435\u0442 OrderCreated  def update_customer_history(uow, event: OrderCreated): \u008e3      with uow:           history = uow.order_history.get(event.customer_id)           history.record_order(event.order_id, event.order_amount)           uow.commit() # \u0438\u043d\u0438\u0446\u0438\u0438\u0440\u0443\u0435\u0442 CustomerBecameVIP      def congratulate_vip_customer(uow, event: CustomerBecameVip): \u008f4         with uow:             customer = uow.customers.get(event.customer_id)             email.send(                 customer.email_address,                 f'Congratulations {customer.first_name}!'              )<\/code><\/pre>\n<p>  <b>1<\/b> \u0410\u0433\u0440\u0435\u0433\u0430\u0442 History \u0443\u043b\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0432 VIP-\u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044e. \u041e\u0442\u043b\u0438\u0447\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043d\u0430 \u0441\u043b\u0443\u0447\u0430\u0439, \u0435\u0441\u043b\u0438 \u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0441\u0442\u0430\u043d\u0443\u0442 \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u043c\u0438.<br \/>  <b>2<\/b> \u041f\u0435\u0440\u0432\u044b\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0437\u0430\u043a\u0430\u0437 \u0434\u043b\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0438 \u0438\u043d\u0438\u0446\u0438\u0438\u0440\u0443\u0435\u0442 \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u043f\u0440\u0435\u0434\u043c\u0435\u0442\u043d\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 OrderCreated.<br \/>  <b>3<\/b> \u0412\u0442\u043e\u0440\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442 \u043e\u0431\u044a\u0435\u043a\u0442 History, \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u044f \u0437\u0430\u043a\u0430\u0437.<br \/>  <b>4<\/b> \u041d\u0430\u043a\u043e\u043d\u0435\u0446, \u043c\u044b \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u0438\u043c\u0435\u0439\u043b \u043a\u043b\u0438\u0435\u043d\u0442\u0443, \u043a\u043e\u0433\u0434\u0430 \u043e\u043d \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f VIP-\u043f\u0435\u0440\u0441\u043e\u043d\u043e\u0439.<\/p>\n<p>  \u041f\u043e \u044d\u0442\u043e\u043c\u0443 \u043a\u043e\u0434\u0443 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e\u0431 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043e\u0448\u0438\u0431\u043e\u043a \u0432 \u0441\u043e\u0431\u044b\u0442\u0438\u0439\u043d\u043e-\u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435.<\/p>\n<p>  \u0412 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043c\u044b \u0438\u043d\u0438\u0446\u0438\u0438\u0440\u0443\u0435\u043c \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u043e\u0431 \u0430\u0433\u0440\u0435\u0433\u0430\u0442\u0435 <i>\u043f\u043e\u0441\u043b\u0435<\/i> \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u043b\u0438 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0432 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445. \u0427\u0442\u043e, \u0435\u0441\u043b\u0438 \u043c\u044b \u0438\u043d\u0438\u0446\u0438\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u044d\u0442\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0434\u043e \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0438 \u0437\u0430\u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0432\u0441\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e? \u0412\u0435\u0434\u044c, \u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0431\u044b, \u0442\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u044b\u043c\u0438 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0432\u0441\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u0431\u044b\u043b\u0430 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0430. \u0420\u0430\u0437\u0432\u0435 \u044d\u0442\u043e \u043d\u0435 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u0435\u0435?<\/p>\n<p>  \u041d\u043e \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0435\u0442, \u0435\u0441\u043b\u0438 \u043f\u043e\u0447\u0442\u043e\u0432\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d? \u0415\u0441\u043b\u0438 \u0432\u0441\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0430 \u0432 \u043e\u0434\u043d\u043e \u0438 \u0442\u043e \u0436\u0435 \u0432\u0440\u0435\u043c\u044f, \u0442\u043e \u0437\u0430\u043d\u044f\u0442\u044b\u0439 \u043f\u043e\u0447\u0442\u043e\u0432\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0435 \u0434\u0430\u0441\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u0435\u043d\u044c\u0433\u0438 \u0437\u0430 \u0437\u0430\u043a\u0430\u0437\u044b.<\/p>\n<p>  \u0427\u0442\u043e \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0435\u0442, \u0435\u0441\u043b\u0438 \u0432 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0430\u0433\u0440\u0435\u0433\u0430\u0442\u0430 History \u0435\u0441\u0442\u044c \u0431\u0430\u0433? \u041d\u0435\u0443\u0436\u0435\u043b\u0438 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u0437\u0430\u0431\u0440\u0430\u0442\u044c \u0434\u0435\u043d\u044c\u0433\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u0432 \u043a\u043b\u0438\u0435\u043d\u0442\u0435 \u043d\u0435 \u0443\u0434\u0430\u0435\u0442\u0441\u044f \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0442\u044c VIP-\u043f\u0435\u0440\u0441\u043e\u043d\u0443?<\/p>\n<p>  \u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u044e \u043e\u0431\u044f\u0437\u0430\u043d\u043d\u043e\u0441\u0442\u0435\u0439 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u0443\u0434\u0430\u0447\u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0447\u0430\u0441\u0442\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u0447\u0442\u043e \u043f\u043e\u0432\u044b\u0441\u0438\u043b\u043e \u0435\u0435 \u043e\u0431\u0449\u0443\u044e \u043d\u0430\u0434\u0435\u0436\u043d\u043e\u0441\u0442\u044c. \u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e <i>\u0434\u043e\u043b\u0436\u043d\u0430<\/i> \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044c\u0441\u044f \u2014 \u044d\u0442\u043e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043a\u043e\u043c\u0430\u043d\u0434, \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0437\u0430\u043a\u0430\u0437. \u042d\u0442\u043e \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442 \u043a\u043b\u0438\u0435\u043d\u0442\u0430, \u0438 \u0441\u0442\u0430\u0432\u0438\u0442\u0441\u044f \u0432 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442 \u0443 \u0441\u0442\u0435\u0439\u043a\u0445\u043e\u043b\u0434\u0435\u0440\u043e\u0432.<\/p>\n<p>  \u0417\u0430\u043c\u0435\u0442\u044c\u0442\u0435, \u043a\u0430\u043a \u043b\u043e\u0432\u043a\u043e \u043c\u044b \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043b\u0438 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0433\u0440\u0430\u043d\u0438\u0446\u044b \u0441 \u043d\u0430\u0447\u0430\u043b\u043e\u043c \u0438 \u043a\u043e\u043d\u0446\u043e\u043c \u0431\u0438\u0437\u043d\u0435\u0441-\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u0432 \u043a\u043e\u0434\u0435 \u0438\u043c\u0435\u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u0436\u0430\u0440\u0433\u043e\u043d\u0443 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438, \u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u2014 \u044d\u0442\u0430\u043f\u0430\u043c \u043d\u0430\u0448\u0438\u0445 \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u0435\u0432 \u043d\u0430 \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u043c \u044f\u0437\u044b\u043a\u0435. \u042d\u0442\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u0438\u043c\u0435\u043d \u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u043b\u0443\u0447\u0448\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043f\u043e \u043c\u0435\u0440\u0435 \u0438\u0445 \u0440\u0430\u0437\u0440\u0430\u0441\u0442\u0430\u043d\u0438\u044f.<\/p>\n<h3>\u0421\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0435 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u0441\u043b\u0435 \u043e\u0448\u0438\u0431\u043e\u043a<\/h3>\n<p>  \u041d\u0430\u0434\u0435\u0435\u043c\u0441\u044f, \u043c\u044b \u0443\u0431\u0435\u0434\u0438\u043b\u0438 \u0432\u0430\u0441 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u043e\u0442\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u043e\u0442 \u043a\u043e\u043c\u0430\u043d\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0445 \u0438\u043d\u0438\u0446\u0438\u0438\u0440\u043e\u0432\u0430\u043b\u0438, \u0442\u043e \u044d\u0442\u043e \u0432\u043f\u043e\u043b\u043d\u0435 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e. \u0427\u0442\u043e \u0436\u0435 \u0434\u0435\u043b\u0430\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u043e\u043f\u0440\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u043e\u0442 \u043d\u0435\u0438\u0437\u0431\u0435\u0436\u043d\u044b\u0445 \u043e\u0448\u0438\u0431\u043e\u043a?<\/p>\n<p>  \u041f\u0435\u0440\u0432\u043e\u0435 \u2014 \u0437\u043d\u0430\u0442\u044c, <i>\u043a\u043e\u0433\u0434\u0430<\/i> \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u0430 \u043e\u0448\u0438\u0431\u043a\u0430, \u0438 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u043e\u0431\u044b\u0447\u043d\u043e \u043f\u043e\u043b\u0430\u0433\u0430\u0435\u043c\u0441\u044f \u043d\u0430 \u043b\u043e\u0433\u0438.<\/p>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0435\u0449\u0435 \u0440\u0430\u0437 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u043c\u0435\u0442\u043e\u0434 handle_event \u0438\u0437 \u0448\u0438\u043d\u044b \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439.<\/p>\n<p>  <b>\u0422\u0435\u043a\u0443\u0449\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f-\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a (src\/allocation\/service_layer\/messagebus.py)<\/b><\/p>\n<pre><code class=\"python\">def handle_event(        event: events.Event,        queue: List[Message],        uow: unit_of_work.AbstractUnitOfWork ):     for handler in EVENT_HANDLERS[type(event)]:        try:            logger.debug('\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u044f %s \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u043c %s',            event, handler)            handler(event, uow=uow)            queue.extend(uow.collect_new_events())         except Exception:            logger.exception('\u0418\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043f\u0440\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u044f %s',                             event)            continue<\/code><\/pre>\n<p>  \u041a\u043e\u0433\u0434\u0430 \u043c\u044b \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435, \u0442\u043e \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0432 \u043b\u043e\u0433, \u0447\u0442\u043e \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c\u0441\u044f \u0441\u0434\u0435\u043b\u0430\u0442\u044c. \u0414\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f CustomerBecameVIP (\u043a\u043b\u0438\u0435\u043d\u0442 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f VIP) \u043b\u043e\u0433\u0438 \u043c\u043e\u0433\u0443\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"python\">\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u044f CustomerBecameVIP(customer_id=12345) \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u043c &lt;\u0444\u0443\u043d\u043a\u0446\u0438\u044f congratulate_vip_customer at 0x10ebc9a60><\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0434\u043b\u044f \u0442\u0438\u043f\u043e\u0432 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c dataclasses, \u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0430\u043a\u043a\u0443\u0440\u0430\u0442\u043d\u043e \u0432\u044b\u0432\u0435\u0434\u0435\u043d\u043d\u0443\u044e \u0441\u0432\u043e\u0434\u043a\u0443 \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0432 \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0443 Python, \u0447\u0442\u043e\u0431\u044b \u0432\u043e\u0441\u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442.<\/p>\n<p>  \u041f\u0440\u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u0438 \u043e\u0448\u0438\u0431\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u0447\u0442\u043e\u0431\u044b \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0432 \u044e\u043d\u0438\u0442-\u0442\u0435\u0441\u0442\u0435 \u0438\u043b\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435.<\/p>\n<p>  \u0420\u0443\u0447\u043d\u043e\u0435 \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0445\u043e\u0440\u043e\u0448\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432 \u0442\u0435\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445, \u043a\u043e\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0431\u0430\u0433, \u043f\u0435\u0440\u0435\u0434 \u0442\u0435\u043c \u043a\u0430\u043a \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e. \u041e\u0434\u043d\u0430\u043a\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u044b <i>\u0432\u0441\u0435\u0433\u0434\u0430<\/i> \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u044b\u0442\u044b\u0432\u0430\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0444\u043e\u043d\u043e\u0432\u044b\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u0441\u0430\u043c\u043e\u0443\u0441\u0442\u0440\u0430\u043d\u044f\u044e\u0449\u0435\u0433\u043e\u0441\u044f \u043e\u0442\u043a\u0430\u0437\u0430. \u0421\u044e\u0434\u0430 \u0432\u0445\u043e\u0434\u044f\u0442, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u0431\u043e\u0438 \u0432 \u0441\u0435\u0442\u0438, \u0432\u0437\u0430\u0438\u043c\u043e\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0438 \u0442\u0430\u0431\u043b\u0438\u0446 \u0438 \u043a\u0440\u0430\u0442\u043a\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0438, \u0432\u044b\u0437\u0432\u0430\u043d\u043d\u044b\u0435 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435\u043c.<\/p>\n<p>  \u0412 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u043c\u043e\u0436\u043d\u043e \u044d\u043b\u0435\u0433\u0430\u043d\u0442\u043d\u043e \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c\u0441\u044f, \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0432 \u0435\u0449\u0435 \u0440\u0430\u0437. \u041d\u0430\u0440\u043e\u0434\u043d\u0430\u044f \u043c\u0443\u0434\u0440\u043e\u0441\u0442\u044c \u0433\u043b\u0430\u0441\u0438\u0442: \u00ab\u0415\u0441\u043b\u0438 \u0441 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0440\u0430\u0437\u0430 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c, \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044e \u0441 \u044d\u043a\u0441\u043f\u043e\u043d\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u043c \u043e\u0442\u043a\u0430\u0442\u043e\u043c\u00bb.<\/p>\n<p>  <b>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0441 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0439 \u043f\u043e\u043f\u044b\u0442\u043a\u043e\u0439 (src\/allocation\/service_layer\/messagebus.py)<\/b><\/p>\n<pre><code class=\"python\">from tenacity import Retrying, RetryError, stop_after_attempt, wait_ exponential 1  ...  def handle_event(       event: events.Event,       queue: List[Message],       uow: unit_of_work.AbstractUnitOfWork ):       for handler in EVENT_HANDLERS[type(event)]:          try:              for attempt in Retrying( \u008d2                  stop=stop_after_attempt(3),                  wait=wait_exponential()       ):                  with attempt:                       logger.debug('\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u044f %s \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u043c                       %s', event, handler)                       handler(event, uow=uow)                       queue.extend(uow.collect_new_events())             except RetryError as retry_failure:                logger.error(                     '\u041d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0441\u043e\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441\u043e\u0431\u044b\u0442\u0438\u0435 %s \u0440\u0430\u0437, \u043e\u0442\u043a\u0430\u0437!,                     retry_failure.last_attempt.attempt_number                )                continue<\/code><\/pre>\n<p>  <b>1<\/b> Tenacity \u2014 \u044d\u0442\u043e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b \u0447\u0430\u0441\u0442\u043e \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u044e\u0449\u0438\u0435\u0441\u044f \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u044b \u0434\u043b\u044f \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u044b\u0445 \u043f\u043e\u043f\u044b\u0442\u043e\u043a.<br \/>  <b>2<\/b> \u0417\u0434\u0435\u0441\u044c \u043c\u044b \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u0448\u0438\u043d\u0443 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u043d\u0430 \u043f\u043e\u0432\u0442\u043e\u0440\u0435\u043d\u0438\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u0434\u043e \u0442\u0440\u0435\u0445 \u0440\u0430\u0437 \u0441 \u044d\u043a\u0441\u043f\u043e\u043d\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u044e\u0449\u0438\u043c\u0441\u044f \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u0435\u043c \u043c\u0435\u0436\u0434\u0443 \u043f\u043e\u043f\u044b\u0442\u043a\u0430\u043c\u0438.<\/p>\n<p>  \u041f\u043e\u0432\u0442\u043e\u0440\u043d\u0430\u044f \u043f\u043e\u043f\u044b\u0442\u043a\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044c\u0441\u044f \u043d\u0435\u0443\u0434\u0430\u0447\u043d\u043e, \u2014 \u044d\u0442\u043e, \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043b\u0443\u0447\u0448\u0438\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u043e\u0432\u044b\u0441\u0438\u0442\u044c \u043e\u0442\u043a\u0430\u0437\u043e\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0441\u0442\u044c \u041f\u041e. \u041e\u043f\u044f\u0442\u044c \u0436\u0435 \u0438\u0437 \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u043e\u0432 UoW \u0438 \u00ab\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043a\u043e\u043c\u0430\u043d\u0434\u00bb \u0441\u043b\u0435\u0434\u0443\u0435\u0442, \u0447\u0442\u043e \u043a\u0430\u0436\u0434\u0430\u044f \u043f\u043e\u043f\u044b\u0442\u043a\u0430 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0441 \u0441\u043e\u0433\u043b\u0430\u0441\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0438 \u043d\u0435 \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0434\u0435\u043b\u0430 \u043d\u0430\u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0443 \u0437\u0430\u043a\u043e\u043d\u0447\u0435\u043d\u043d\u044b\u043c\u0438.  <\/p>\n<blockquote><p>\u0412 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043c\u043e\u043c\u0435\u043d\u0442 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043e\u0442\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u043f\u043e\u043f\u044b\u0442\u043e\u043a \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435. \u0421\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0441 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f\u043c\u0438 \u0441\u043b\u043e\u0436\u043d\u043e, \u0438 \u0437\u0434\u0435\u0441\u044c \u043c\u044b \u043e\u043f\u0443\u0441\u0442\u0438\u043c \u0445\u0438\u0442\u0440\u043e\u0441\u0442\u0438. \u0412 \u044d\u043f\u0438\u043b\u043e\u0433\u0435 \u0435\u0441\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0438.<\/p><\/blockquote>\n<p>  <\/p>\n<h2>\u0412\u044b\u0432\u043e\u0434\u044b<\/h2>\n<p>  \u0412 \u044d\u0442\u043e\u0439 \u043a\u043d\u0438\u0433\u0435 \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043e <i>\u0441\u043e\u0431\u044b\u0442\u0438\u044f\u0445<\/i>, \u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0442\u043e\u043c \u043e <i>\u043a\u043e\u043c\u0430\u043d\u0434\u0430\u0445<\/i>, \u0445\u043e\u0442\u044f \u0432 \u0434\u0440\u0443\u0433\u0438\u0445 \u043a\u043d\u0438\u0433\u0430\u0445 \u043e\u0431\u044b\u0447\u043d\u043e \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442. \u0421\u0434\u0435\u043b\u0430\u0442\u044c \u044f\u0432\u043d\u044b\u043c\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u044b, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u0448\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043c\u043e\u0436\u0435\u0442 \u043e\u0442\u0432\u0435\u0442\u0438\u0442\u044c, \u0434\u0430\u0432 \u0438\u043c \u0438\u043c\u044f \u0438 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0434\u0430\u043d\u043d\u044b\u0445, \u2014 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0444\u0443\u043d\u0434\u0430\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u0430\u044f \u0432\u0435\u0449\u044c. \u0412\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u0432\u044b \u0441\u0442\u043e\u043b\u043a\u043d\u0435\u0442\u0435\u0441\u044c \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u043b\u044e\u0434\u0438 \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u043e\u043c \u00ab\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043a\u043e\u043c\u0430\u043d\u0434\u00bb \u0442\u043e, \u0447\u0442\u043e \u043c\u044b \u0434\u0435\u043b\u0430\u0435\u043c \u0441 \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u0430\u043c\u0438 \u00ab\u0421\u043e\u0431\u044b\u0442\u0438\u0435\u00bb, \u00ab\u041a\u043e\u043c\u0430\u043d\u0434\u0430\u00bb \u0438 \u00ab\u0428\u0438\u043d\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439\u00bb.<\/p>\n<p>  \u0412 \u0442\u0430\u0431\u043b. 10.2 \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u044b, \u043e \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043f\u043e\u0434\u0443\u043c\u0430\u0442\u044c, \u043f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0430\u0442\u044c \u043a \u0440\u0430\u0431\u043e\u0442\u0435.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/8k\/4i\/x5\/8k4ix50wbc7_kkfn5nt0nmlg-7y.jpeg\" alt=\"image\" data-src=\"https:\/\/habrastorage.org\/webt\/8k\/4i\/x5\/8k4ix50wbc7_kkfn5nt0nmlg-7y.jpeg\" data-blurred=\"true\"\/><\/div>\n<p>  \u0412 \u0433\u043b\u0430\u0432\u0435 11 \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043e\u0431 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u0430 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438.<\/p>\n<p>  \u0411\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0441 \u043a\u043d\u0438\u0433\u043e\u0439 \u043c\u043e\u0436\u043d\u043e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u043d\u0430 <a href=\"https:\/\/www.piter.com\/collection\/new\/product\/patterny-razrabotki-na-python-tdd-ddd-i-sobytiyno-orientirovannaya-arhitektura\">\u0441\u0430\u0439\u0442\u0435 \u0438\u0437\u0434\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430<\/a><br \/>  \u00bb <a href=\"https:\/\/www.piter.com\/collection\/new\/product\/patterny-razrabotki-na-python-tdd-ddd-i-sobytiyno-orientirovannaya-arhitektura#Oglavlenie-1\">\u041e\u0433\u043b\u0430\u0432\u043b\u0435\u043d\u0438\u0435<\/a><br \/>  \u00bb <a href=\"https:\/\/www.piter.com\/collection\/new\/product\/patterny-razrabotki-na-python-tdd-ddd-i-sobytiyno-orientirovannaya-arhitektura#Otryvok-1\">\u041e\u0442\u0440\u044b\u0432\u043e\u043a<\/a><\/p>\n<p>  \u0414\u043b\u044f \u0425\u0430\u0431\u0440\u043e\u0436\u0438\u0442\u0435\u043b\u0435\u0439 \u0441\u043a\u0438\u0434\u043a\u0430 25% \u043f\u043e \u043a\u0443\u043f\u043e\u043d\u0443 \u2014 <b>Python<\/b><\/p>\n<p>  \u041f\u043e \u0444\u0430\u043a\u0442\u0443 \u043e\u043f\u043b\u0430\u0442\u044b \u0431\u0443\u043c\u0430\u0436\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043a\u043d\u0438\u0433\u0438 \u043d\u0430 e-mail \u0432\u044b\u0441\u044b\u043b\u0430\u0435\u0442\u0441\u044f \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u0430\u044f \u043a\u043d\u0438\u0433\u0430.<\/p><\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/588060\/\"> https:\/\/habr.com\/ru\/articles\/588060\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\"><a href=\"https:\/\/habr.com\/ru\/company\/piter\/blog\/588060\/\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/4w\/rp\/0v\/4wrp0vpx7tinjxig7npb__fsdzm.jpeg\" align=\"left\" alt=\"image\" data-src=\"https:\/\/habrastorage.org\/webt\/4w\/rp\/0v\/4wrp0vpx7tinjxig7npb__fsdzm.jpeg\" data-blurred=\"true\"\/><\/a> \u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440\u043e\u0436\u0438\u0442\u0435\u043b\u0438! \u041f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0441\u0442\u044c Python \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u0442 \u0440\u0430\u0441\u0442\u0438, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442, \u043f\u0440\u043e\u0435\u043a\u0442\u044b, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 \u044d\u0442\u043e\u043c \u044f\u0437\u044b\u043a\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0441\u0442\u0430\u043d\u043e\u0432\u044f\u0442\u0441\u044f \u0432\u0441\u0435 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u043d\u0435\u0435 \u0438 \u0441\u043b\u043e\u0436\u043d\u0435\u0435. \u041c\u043d\u043e\u0433\u0438\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043f\u0440\u043e\u044f\u0432\u043b\u044f\u044e\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441 \u043a \u0432\u044b\u0441\u043e\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u044b\u043c \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u0430\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0442\u0430\u043a\u0438\u043c \u043a\u0430\u043a \u0447\u0438\u0441\u0442\u0430\u044f \u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u0439\u043d\u043e-\u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u0430\u044f \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u0438 \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u044b \u043f\u0440\u0435\u0434\u043c\u0435\u0442\u043d\u043e-\u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f (DDD). \u041d\u043e \u0438\u0445 \u0430\u0434\u0430\u043f\u0442\u0430\u0446\u0438\u044f \u043f\u043e\u0434 Python \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u0430.<\/p>\n<p>  \u0413\u0430\u0440\u0440\u0438 \u041f\u0435\u0440\u0441\u0438\u0432\u0430\u043b\u044c \u0438 \u0411\u043e\u0431 \u0413\u0440\u0435\u0433\u043e\u0440\u0438 \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u044f\u0442 \u0432\u0430\u0441 \u0441 \u043f\u0440\u043e\u0432\u0435\u0440\u0435\u043d\u043d\u044b\u043c\u0438 \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u0430\u043c\u0438, \u0447\u0442\u043e\u0431\u044b \u043a\u0430\u0436\u0434\u044b\u0439 \u043f\u0438\u0442\u043e\u043d\u0438\u0441\u0442 \u043c\u043e\u0433 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0443\u044e \u043e\u0442\u0434\u0430\u0447\u0443 \u043e\u0442 \u0442\u0435\u0441\u0442\u043e\u0432. \u0422\u0435\u043e\u0440\u0438\u044f \u043f\u043e\u0434\u043a\u0440\u0435\u043f\u043b\u0435\u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438 \u043d\u0430 \u0447\u0438\u0441\u0442\u043e\u043c Python, \u043b\u0438\u0448\u0435\u043d\u043d\u043e\u043c \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0438\u0437\u0431\u044b\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 Java \u0438 C#.<\/p>\n<p>  \u0412 \u044d\u0442\u043e\u0439 \u043a\u043d\u0438\u0433\u0435:<\/p>\n<ul>\n<li>\u00ab\u0418\u043d\u0432\u0435\u0440\u0441\u0438\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439\u00bb \u0438 \u0435\u0435 \u0441\u0432\u044f\u0437\u0438 \u0441 \u043f\u043e\u0440\u0442\u0430\u043c\u0438 \u0438 \u0430\u0434\u0430\u043f\u0442\u0435\u0440\u0430\u043c\u0438 (\u0433\u0435\u043a\u0441\u0430\u0433\u043e\u043d\u0430\u043b\u044c\u043d\u0430\u044f\/\u0447\u0438\u0441\u0442\u0430\u044f \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430).<\/li>\n<li>\u0420\u0430\u0437\u043b\u0438\u0447\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u0430\u043c\u0438 \u00ab\u0421\u0443\u0449\u043d\u043e\u0441\u0442\u044c\u00bb, \u00ab\u041e\u0431\u044a\u0435\u043a\u0442-\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u00bb \u0438 \u00ab\u0410\u0433\u0440\u0435\u0433\u0430\u0442\u00bb \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 DDD.<\/li>\n<li>\u041f\u0430\u0442\u0442\u0435\u0440\u043d\u044b \u00ab\u0420\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439\u00bb \u0438 UoW, \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u044e\u0449\u0438\u0435 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u0441\u0442\u0432\u043e \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445.<\/li>\n<li>\u041f\u0430\u0442\u0442\u0435\u0440\u043d\u044b \u00ab\u0421\u043e\u0431\u044b\u0442\u0438\u0435\u00bb, \u00ab\u041a\u043e\u043c\u0430\u043d\u0434\u0430\u00bb \u0438 \u00ab\u0428\u0438\u043d\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439\u00bb.<\/li>\n<li>\u0420\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043d\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u044b (CQRS).<\/li>\n<li>\u0421\u043e\u0431\u044b\u0442\u0438\u0439\u043d\u043e-\u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u0430\u044f \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u0438 \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f.<\/li>\n<\/ul>\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-410683","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/410683","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=410683"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/410683\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=410683"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=410683"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=410683"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}