{"id":302847,"date":"2020-04-30T21:00:42","date_gmt":"2020-04-30T21:00:42","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=302847"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=302847","title":{"rendered":"\u0421\u0435\u0440\u0432\u0435\u0440 \u0418\u0433\u0440\u044b \u043d\u0430 MS Orleans \u2014 \u0447\u0430\u0441\u0442\u044c 3: \u0418\u0442\u043e\u0433\u0438"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/499556\/\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/2l\/n1\/j0\/2ln1j0xw4cm-reechlymcdrx86q.png\"><\/p>\n<p>  \u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440! \u042f \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u044e \u0438\u0437\u0443\u0447\u0430\u0442\u044c MS Orleans \u0438 \u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u0435\u043d\u044c\u043a\u0443\u044e \u043e\u043d\u043b\u0430\u0439\u043d \u0438\u0433\u0440\u0443 \u0441 \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u044b\u043c \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u043c \u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u043c \u0441 Orleans \u0433\u0440\u0435\u0439\u043d\u0430\u043c\u0438. \u041d\u0430 \u044d\u0442\u043e\u0442 \u0440\u0430\u0437 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u0447\u0435\u043c \u0432\u0441\u0435 \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b\u043e\u0441\u044c \u0438 \u043a\u0430\u043a\u0438\u0435 \u044f \u0434\u043b\u044f \u0441\u0435\u0431\u044f \u0432\u044b\u0432\u043e\u0434\u044b \u0441\u0434\u0435\u043b\u0430\u043b. \u0417\u0430 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u0434\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434 \u043a\u0430\u0442. <br \/>  <a name=\"habracut\"><\/a><br \/>  \u0422\u0430\u043a\u0438 \u0434\u0430, \u0435\u0441\u043b\u0438 \u0432\u0430\u043c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u0432\u043e\u043e\u0431\u0449\u0435 \u043a\u0430\u043a \u0438\u0433\u0440\u043e\u0432\u044b\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0434\u043b\u044f \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0438\u0433\u0440 \u0434\u0435\u043b\u0430\u044e\u0442\u0441\u044f, \u0430 \u043d\u0435 \u043c\u043e\u0439 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442 \u0441 MS Orleans \u0442\u043e \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u0433\u043b\u044f\u043d\u0443\u0442\u044c <a href=\"https:\/\/github.com\/pixonic\/pixockets\" rel=\"nofollow\">\u044d\u0442\u043e\u0442 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439<\/a> (UDP) \u0438 \u044d\u0442\u0438 \u0441\u0442\u0430\u0442\u044c\u0438 \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c: <\/p>\n<ol>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/303006\/\">habr.com\/ru\/post\/303006<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/328118\/\">habr.com\/ru\/post\/328118<\/a> <\/li>\n<li> <a href=\"https:\/\/habr.com\/ru\/company\/pixonic\/blog\/499642\/\">habr.com\/ru\/company\/pixonic\/blog\/499642<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/company\/pixonic\/blog\/420019\/\">habr.com\/ru\/company\/pixonic\/blog\/420019<\/a> <\/li>\n<\/ol>\n<p>  <\/p>\n<h2>\u0421\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435<\/h2>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/498326\/\">\u0421\u0435\u0440\u0432\u0435\u0440 \u0418\u0433\u0440\u044b \u043d\u0430 MS Orleans \u2014 \u0447\u0430\u0441\u0442\u044c 1: \u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u0410\u043a\u0442\u043e\u0440\u044b<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/499188\/\">\u0421\u0435\u0440\u0432\u0435\u0440 \u0418\u0433\u0440\u044b \u043d\u0430 MS Orleans \u2014 \u0447\u0430\u0441\u0442\u044c 2: \u0414\u0435\u043b\u0430\u0435\u043c \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u0443\u044e \u0442\u043e\u0447\u043a\u0443<\/a><\/li>\n<li>\u0421\u0435\u0440\u0432\u0435\u0440 \u0418\u0433\u0440\u044b \u043d\u0430 MS Orleans \u2014 \u0447\u0430\u0441\u0442\u044c 3: \u0418\u0442\u043e\u0433\u0438<\/li>\n<\/ul>\n<p>  <\/p>\n<h2>\u0418\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438<\/h2>\n<p>  <a href=\"https:\/\/gitlab.com\/VictorWinbringer\/msorleansonlinegame\" rel=\"nofollow\">MsOrleansOnlineGame <\/a><\/p>\n<h2>\u041e \u0438\u0433\u0440\u0435<\/h2>\n<p>  \u041f\u043e\u043b\u0443\u0447\u0438\u043b\u0430\u0441\u044c \u043f\u0440\u043e\u0441\u0442\u0435\u043d\u044c\u043a\u0430\u044f \u0441\u0442\u0440\u0435\u043b\u044f\u043b\u043a\u0430. \u0417\u0435\u043b\u0435\u043d\u044b\u0435 # \u044d\u0442\u043e \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u0438\u043a\u0438. \u0416\u0435\u043b\u0442\u044b\u0439 # \u044d\u0442\u043e \u0432\u0430\u0448 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436. \u041a\u0440\u0430\u0441\u043d\u044b\u0439 $ \u044d\u0442\u043e \u043f\u0443\u043b\u044f. \u0421\u0442\u0440\u0435\u043b\u044c\u0431\u0430 \u0432\u0435\u0434\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u043a\u0443\u0434\u0430 \u0432\u044b \u0438\u0434\u0435\u0442\u0435. \u041d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043a\u043d\u043e\u043f\u043a\u0430\u043c\u0438 W A S D \u0438\u043b\u0438 \u0441\u0442\u0440\u0435\u043b\u043e\u0447\u043a\u0430\u043c\u0438. \u0414\u043b\u044f \u0432\u044b\u0441\u0442\u0440\u0435\u043b\u0430 \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0430 \u043a\u043b\u0430\u0432\u0438\u0448\u0430 \u043f\u0440\u043e\u0431\u0435\u043b\u0430. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043a\u043e\u0434 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u043d\u0435 \u0432\u0438\u0436\u0443 \u0441\u043c\u044b\u0441\u043b\u0430 \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0435\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0430 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u0439. \u0413\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0439. <\/p>\n<h2>O \u0430\u043a\u0442\u043e\u0440\u0430\u0445 (\u0433\u0440\u0435\u0439\u043d\u0430\u0445)<\/h2>\n<p>  \u0415\u0441\u043b\u0438 \u043a\u0440\u0430\u0442\u043a\u043e: \u041c\u043e\u0435 \u0418\u041c\u0425\u041e \u0447\u0442\u043e \u041e\u0440\u043b\u0435\u0430\u043d\u0441 \u044d\u0442\u043e gRPC \u043d\u0430 \u0441\u0442\u0435\u0440\u043e\u0438\u0434\u0430\u0445 \u0437\u0430\u0442\u043e\u0447\u0435\u043d\u043d\u044b\u0439 \u043f\u043e\u0434 Azure, \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u0438\u043d \u043c\u0435\u043c\u043e\u0440\u0438 \u0441\u0442\u0435\u0439\u0442\u043e\u043c. \u0421 \u043a\u0435\u0448\u0435\u043c \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440. \u0425\u043e\u0442\u044f \u0438 \u0431\u0435\u0437 \u0441\u0442\u0435\u0439\u0442\u0430 \u043a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u044b\u0439 RPC \u0447\u0435\u0440\u0435\u0437 Stateless Worker Grains \u0443\u043c\u0435\u0435\u0442 \u043e\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c. \u0413\u0440\u0435\u0439\u043d (\u0410\u043a\u0442\u043e\u0440) \u0432 \u041e\u0440\u043b\u0435\u0430\u043d\u0441 \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0441\u0442\u0443\u043f\u0430\u0442\u044c \u0432 \u0440\u043e\u043b\u0438 \u0442\u043e\u0447\u043a\u0438 \u0432\u0445\u043e\u0434\u0430 \u043a\u0430\u043a Controller \u0432 Asp.Net. \u041d\u043e \u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0438 \u043e\u0442 \u041a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 \u0443 \u0433\u0440\u0435\u0439\u043d\u0430 \u043e\u0434\u0438\u043d \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0430\u043d\u0441 \u0443 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0435\u0441\u0442\u044c \u0441\u0432\u043e\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440. \u0413\u0440\u0435\u0439\u043d\u044b \u0445\u043e\u0440\u043e\u0448\u0438 \u0442\u043e\u0433\u0434\u0430 \u043a\u043e\u0433\u0434\u0430 \u0432\u0430\u043c \u0438\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u0438\u043b\u0438 \u043e\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043d\u0430\u0434\u043e \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043a\u0430\u043a\u0438\u043c-\u0442\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435\u043c. \u041e\u043d\u0438 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u044e\u0442 \u043f\u043e\u0442\u043e\u043a\u043e\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u0443\u044e \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u043d\u0438\u043c.<\/p>\n<p>  \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0432\u043e\u0442 \u0430\u043a\u0442\u043e\u0440 \u0434\u043b\u044f \u043a\u043e\u0440\u0437\u0438\u043d\u044b \u0442\u043e\u0432\u0430\u0440\u043e\u0432. \u041f\u0440\u0438 \u043f\u0435\u0440\u0432\u043e\u043c \u0432\u044b\u0437\u043e\u0432\u0435 \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u043d \u0438 \u0431\u0443\u0434\u0435\u0442 \u0432\u0438\u0441\u0435\u0442\u044c \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \u0438\u0433\u0440\u0430\u044f \u0440\u043e\u043b\u044c \u043a\u0435\u0448\u0430. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043a \u043d\u0435\u043c\u0443 \u043c\u043e\u0433\u0443\u0442 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0438 \u043d\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u0435\u0434\u043c\u0435\u0442\u043e\u0432 \u0442\u044b\u0441\u044f\u0447\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0438\u0437 \u0442\u044b\u0441\u044f\u0447\u0438 \u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u043e\u0442\u043e\u043a\u043e\u0432. \u0412\u0441\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u0435\u0433\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435\u043c \u0432\u043d\u0443\u0442\u0440\u0438 \u043d\u0435\u0433\u043e \u0431\u0443\u0434\u0435\u0442 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u043f\u043e\u0442\u043e\u043a\u043e\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0439. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0430\u043a\u0442\u043e\u0440 Shop \u0443 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0431\u0443\u0434\u0435\u0442 \u043c\u0435\u0442\u043e\u0434 List GetBaskets() \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u043a\u043e\u0440\u0437\u0438\u043d. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c Shop \u0442\u043e\u0436\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u0438\u0441\u0435\u0442\u044c \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \u043a\u0430\u043a \u043a\u0435\u0448 \u0438 \u0432\u0441\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u043d\u0438\u043c \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0442\u043e\u043a\u043e\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0439.<\/p>\n<pre><code class=\"cs\">    public interface IBasket : IGrainWithGuidKey     {         Task Add(string item);         Task Remove(string item);         Task&lt;List&lt;string&gt;&gt; GetItems();     }      public class BasketGrain : Grain, IBasket     {         private readonly ILogger&lt;BasketGrain&gt; _logger;         private readonly IPersistentState&lt;List&lt;string&gt;&gt; _store;          public BasketGrain(             ILogger&lt;BasketGrain&gt; logger,             [PersistentState(&quot;basket&quot;, &quot;shopState&quot;)] IPersistentState&lt;List&lt;string&gt;&gt; store         )         {             _logger = logger;             _store = store;         }           public override Task OnActivateAsync()         {              var shop = GrainFactory.GetGrain&lt;IShop&gt;();            \/\/\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u0441\u043f\u0438\u0441\u043e\u043a \u043a\u043e\u0440\u0437\u0438\u043d \u043d\u0430\u0448\u0443 \u0435\u0441\u043b\u0438 \u0435\u0435 \u0435\u0449\u0435 \u043d\u0435\u0442 \u0432 \u0441\u043f\u0438\u0441\u043a\u0435.             await shop.AddBasketIfNotContains(this.GetPrimaryKey())             return base.OnActivateAsync();         }          public override async Task OnDeactivateAsync()         {           \/\/\u041e\u0440\u043b\u0435\u0430\u043d\u0441 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0435\u0442 \u0433\u0440\u0435\u0439\u043d\u044b \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u0438\u0445 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c          \/\/ \u0422\u0430\u043a \u0436\u0435 \u043a\u0430\u043a Asp.Net \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u044b.          \/\/ \u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0438 \u043e\u0442 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 \u0433\u0440\u0435\u0439\u043d \u0432\u0438\u0441\u0438\u0442 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \u043f\u043e\u043a\u0430 \u0435\u0433\u043e \u043a\u0442\u043e-\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442.         \/\/ \u0415\u0441\u043b\u0438 \u0435\u0433\u043e \u0434\u043e\u043b\u0433\u043e \u043d\u0438\u043a-\u0442\u043e \u043d\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u0442\u043e \u041e\u0440\u043b\u0435\u0430\u043d\u0441 \u0443\u0431\u0438\u0432\u0430\u0435\u0442 \u0433\u0440\u0435\u0439\u043d.         \/\/\u041f\u0435\u0440\u0435\u0434 \u0442\u0435\u043c \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u044d\u0442\u043e\u0442 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434.      \/\/ \u0422\u0443\u0442 \u043c\u044b \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043d\u0430\u0448\u0435\u0433\u043e \u0433\u0440\u0435\u0439\u043d\u0430 \u0432 \u0411\u0414             await _store.WriteStateAsync();             await base.OnDeactivateAsync();         }           public Task Add(string item)         {             _store.State.Add(item);             return Task.CompletedTask;         }          public Task Remove(string item)         {             _store.State.Remove(item);             return Task.CompletedTask;         }          public Task&lt;List&lt;string&gt;&gt; GetItems()         {            \/\/\u0413\u0440\u0435\u0439\u043d\u044b \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0443\u044e\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0435 \u0438 \u0434\u0435\u0441\u0435\u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u043c\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f.           \/\/ \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043b\u0443\u0447\u0448\u0435 \u0438\u0437 \u0433\u0440\u0435\u0439\u043d\u0430 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u043a\u043e\u043f\u0438\u044e \u0435\u0433\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f          \/\/ \u0427\u0442\u043e\u0431\u044b \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0435 \u0432\u044b\u0441\u043a\u043e\u0447\u0438\u043b\u0430 \u043e\u0448\u0438\u0431\u043a\u0430 \u0430\u043a\u0430 \u041a\u043e\u043b\u043b\u0435\u043a\u0448\u043d \u0445\u0430\u0437 \u0447\u0435\u0439\u043d\u0434\u0436\u0435\u0434             return Task.FromResult(new List&lt;string&gt;(_store.State));         }     } <\/code><\/pre>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u043a\u0430\u043a\u043e\u043c \u043d\u0438\u0431\u0443\u0434\u044c \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u043e\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438:<\/p>\n<pre><code class=\"cs\">         private static async Task DoClientWork(IClusterClient client, Guid baskeId)         {             var basket = client.GetGrain&lt;IBasket&gt;(baskeId);            \/\/\u043a\u0430\u043a \u0438 \u0441 gRPC - \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u044d\u0442\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u0433\u0434\u0435 \u0438 \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432 \u0441\u043f\u0438\u0441\u043e\u043a             await basket.Add(&quot;Apple&quot;);         } <\/code><\/pre>\n<p>  <\/p>\n<h2>\u041a\u043e\u0434 \u0438\u0433\u0440\u044b<\/h2>\n<p>  \u041a\u0430\u0440\u0442\u0430 \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0441\u0440\u0430\u0436\u0430\u044e\u0442\u0441\u044f \u0438\u0433\u0440\u043e\u043a\u0438:<\/p>\n<pre><code class=\"cs\">   public interface IFrame : IGrainWithIntegerKey     {         Task Update(Frame frame);         Task&lt;Frame&gt; GetState();     }      public class FrameGrain : Grain, IFrame     {         private readonly ILogger&lt;FrameGrain&gt; _logger;         private readonly IPersistentState&lt;Frame&gt; _store;          public FrameGrain(             ILogger&lt;FrameGrain&gt; logger,             [PersistentState(&quot;frame&quot;, &quot;gameState&quot;)] IPersistentState&lt;Frame&gt; store         )         {             _logger = logger;             _store = store;         }          public override Task OnActivateAsync()         {             _logger.LogInformation(&quot;ACTIVATED&quot;);            \/\/\u0421\u0432\u044f\u0437\u044c \u0438\u0433\u0440\u044b \u0438 \u043a\u0430\u0440\u0442\u044b 1 \u043a 1 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0430\u0439\u0434\u0438 \u043a\u0430\u0440\u0442\u044b \u0438 \u0438\u0433\u0440\u044b \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b.             _store.State.GameId = this.GetPrimaryKeyLong();             return base.OnActivateAsync();         }          public override async Task OnDeactivateAsync()         {             _logger.LogInformation(&quot;DEACTIVATED&quot;);             await _store.WriteStateAsync();             await base.OnDeactivateAsync();         }          public Task Update(Frame frame)         {             _store.State = frame;             return Task.CompletedTask;         }          public Task&lt;Frame&gt; GetState() =&gt; Task.FromResult(_store.State.Clone());     } <\/code><\/pre>\n<p>  \u0413\u0440\u0435\u0439\u043d \u0438\u0433\u0440\u044b \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0445\u0440\u0430\u043d\u0438\u0442 \u043e\u0431\u0449\u0435\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0438\u0433\u0440\u044b \u0438 20 \u0440\u0430\u0437 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0435\u0433\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u0443 \u043f\u043e SignalR.<\/p>\n<pre><code class=\"cs\">    public interface IGame : IGrainWithIntegerKey     {         Task Update(Player player);         Task Update(Bullet bullet);         Task&lt;List&lt;Player&gt;&gt; GetAlivePlayers();     }      public class GameGrain : Grain, IGame     {         private const byte WIDTH = 100;         private const byte HEIGHT = 50;         private readonly ILogger&lt;GameGrain&gt; _logger;         private readonly IPersistentState&lt;Game&gt; _store;         private readonly IHubContext&lt;GameHub&gt; _hub;         private IDisposable _timer;         public GameGrain(             ILogger&lt;GameGrain&gt; logger,             [PersistentState(&quot;game&quot;, &quot;gameState&quot;)] IPersistentState&lt;Game&gt; store,             IHubContext&lt;GameHub&gt; hub             )         {             _logger = logger;             _store = store;             _hub = hub;         }          public override async Task OnActivateAsync()         {             _store.State.Id = this.GetPrimaryKeyLong();             _store.State.Frame = new Frame(WIDTH, HEIGHT) { GameId = _store.State.Id };             var frame = GrainFactory.GetGrain&lt;IFrame&gt;(_store.State.Id);             await frame.Update(_store.State.Frame.Clone());             _logger.LogWarning(&quot;ACTIVATED&quot;);             \/\/\u0422\u0443\u0442 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044f \u0442\u0430\u0439\u043c\u0435\u0440\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043a\u0430\u0436\u0434\u044b\u0435 50 \u043c\u0438\u043b\u043b\u0438\u0441\u0435\u043a\u0443\u043d\u0434 \u0431\u0443\u0434\u0435\u0442 \u0434\u0435\u0440\u0433\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434 \u043d\u0430\u0448\u0435\u0433\u043e \u0433\u0440\u0435\u0439\u043d\u0430. \u042d\u0442\u043e \u043c\u0435\u0442\u043e\u0434 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0438\u0433\u0440\u044b \u043a\u043b\u0438\u0435\u043d\u0442\u0443.             _timer = RegisterTimer(Draw, null, TimeSpan.FromMilliseconds(100), TimeSpan.FromMilliseconds(50));             await base.OnActivateAsync();         }          public override async Task OnDeactivateAsync()         {             _logger.LogWarning(&quot;DEACTIVATED&quot;);             _timer?.Dispose();             _timer = null;             await _store.WriteStateAsync();             await base.OnDeactivateAsync();         }          public async Task Draw(object obj)         {             var state = _store.State;             state.Bullets.RemoveAll(b =&gt; !b.IsAlive);             state.Players.RemoveAll(p =&gt; !p.IsAlive);             try             {                 await _hub.Clients.All.SendAsync(&quot;gameUpdated&quot;, state.Clone());             }             catch (Exception e)             {                 _logger.LogError(e, &quot;Error on send s&quot;);             }         }          public Task Update(Player player)         {             _store.State.Players.RemoveAll(x =&gt; x.Id == player.Id);             _store.State.Players.Add(player);             return Task.CompletedTask;         }         public Task Update(Bullet bullet)         {             _store.State.Bullets.RemoveAll(x =&gt; x.Id == bullet.Id);             _store.State.Bullets.Add(bullet);             return Task.CompletedTask;         }          public Task&lt;List&lt;Player&gt;&gt; GetAlivePlayers() =&gt;             Task.FromResult(_store.State.Players.Where(p =&gt; p.IsAlive).Select(p =&gt; p.Clone()).ToList());     } <\/code><\/pre>\n<p>  SignalR \u0445\u0430\u0431 \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u043e\u0431\u0449\u0430\u0435\u043c\u0441\u044f \u0441 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u043c. \u041e\u043d \u0432\u044b\u0441\u0442\u0443\u043f\u0430\u0435\u0442 \u0432 \u0440\u043e\u043b\u0438 \u043f\u0440\u043e\u043a\u0441\u0438 \u043c\u0435\u0436\u0434\u0443 WebGl \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u043c \u0438 Orleans. \u041f\u043e\u043a\u0430 \u0447\u0442\u043e \u043a\u043b\u0438\u0435\u043d\u0442 \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u044b\u0439 \u0438 \u043e\u043d \u0434\u0438\u043a\u043e \u0441\u0442\u0440\u0435\u043c\u043d\u044b\u0439. \u042f \u0445\u043e\u0447\u0443 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u043c \u0432\u0435\u0431 \u043a\u043b\u0438\u0435\u043d\u0442 \u0438\u0433\u0440\u044b \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u043d\u0430 Three.js \u0438 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043f\u043e \u0432\u0435\u0431\u0441\u043e\u043a\u0435\u0442\u0443 SignalR. \u0421\u0430\u043c Orleans \u043a\u043b\u0438\u0435\u043d\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 C# \u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0438 \u043e\u0442 gRPC \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u043d\u0430 \u043c\u043d\u043e\u0433\u0438\u0445 \u044f\u0437\u044b\u043a\u0430\u0445 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043b\u044f \u0432\u0435\u0431 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u043c \u043c\u0435\u0436\u0434\u0443 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c Orleans \u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u0430\u043c\u0438 \u043d\u0430\u0434\u043e \u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u043e\u043a\u0441\u0438 (Gateway asp.net core). <\/p>\n<pre><code class=\"cs\">    public class GameHub : Hub     {         private readonly IGrainFactory _client;          public GameHub(IGrainFactory client)         {             _client = client;         }          public async Task GameInput(Input input)         {             var player = _client.GetGrain&lt;IPlayer&gt;(input.PlayerId);             await player.Handle(input);         }     } <\/code><\/pre>\n<p>  \u0413\u0440\u0435\u0439\u043d \u0438\u0433\u0440\u043e\u043a\u0430. \u041e\u043d \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u043e \u0442\u0430\u0439\u043c\u0435\u0440\u0443 \u0434\u0432\u0438\u0436\u0435\u0442\u0441\u044f \u0438 \u0440\u0435\u0430\u0433\u0438\u0440\u0443\u0435\u0442 \u043d\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u0415\u0441\u043b\u0438 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0441\u0442\u0440\u0435\u043b\u044f\u0442\u044c \u0442\u043e \u043e\u043d \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0433\u0440\u0435\u0439\u043d \u043f\u0443\u043b\u0438 \u0438 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0434\u043b\u044f \u043d\u0435\u0433\u043e \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f.<\/p>\n<pre><code class=\"cs\">    public class PlayerGrain : Grain, IPlayer     {         private readonly ILogger&lt;PlayerGrain&gt; _logger;         private readonly IPersistentState&lt;Player&gt; _store;         private IDisposable _timer;         private readonly Queue&lt;Input&gt; _inputs;         public PlayerGrain(             ILogger&lt;PlayerGrain&gt; logger,             [PersistentState(&quot;player&quot;, &quot;gameState&quot;)] IPersistentState&lt;Player&gt; store         )         {             _logger = logger;             _store = store;             _inputs = new Queue&lt;Input&gt;();         }          public override Task OnActivateAsync()         {             _logger.LogInformation(&quot;ACTIVATED&quot;);             \/\/ State \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e POCO \u043a\u043b\u0430\u0441\u0441 \u0441 \u0433\u0435\u0442\u0442\u0435\u0440\u0430\u043c\u0438 \u0438 \u0441\u0435\u0442\u0442\u0435\u0440\u0430\u043c\u0438. Entity Player \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435             _store.State.Id = this.GetPrimaryKey();             _timer = RegisterTimer(Update, null, TimeSpan.FromMilliseconds(1), TimeSpan.FromMilliseconds(200));             return base.OnActivateAsync();         }          public override async Task OnDeactivateAsync()         {             _logger.LogInformation(&quot;ACTIVATED&quot;);             _timer?.Dispose();             _timer = null;             await _store.WriteStateAsync();             await base.OnDeactivateAsync();         }          public async Task Handle(Input input)         {             _store.State.GameId = input.GameId;             _inputs.Enqueue(input);         }          public async Task Update(object obj)         {             if (!_store.State.IsAlive)             {                 await _store.ClearStateAsync();                \/\/\u0413\u043e\u0432\u043e\u0440\u0438\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u041e\u0440\u043b\u0435\u0430\u0441 \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0433\u0440\u0435\u0439\u043d \u0438\u0437 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438.              \/\/ \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u043d \u043d\u0430\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u043d\u0443\u0436\u0435\u043d. \u042d\u0442\u043e \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0435\u0442 \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u0445\u043e\u0434\u0430 \u0438\u0437 \u044d\u0442\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430.                 DeactivateOnIdle();                 return;             }              while (_inputs.Count &gt; 0)             {                 var input = _inputs.Dequeue();                 foreach (var direction in input.Directions.Where(d =&gt; d != Direction.None))                 {                     _store.State.Direction = direction;                 }                  foreach (var command in input.Commands.Where(c =&gt; c != Command.None))                 {                     if (command == Command.Shoot)                     {                         var bulletId = Guid.NewGuid();                         var bullet = GrainFactory.GetGrain&lt;IBullet&gt;(bulletId);                         \/\/ \u041c\u0435\u0442\u043e\u0434 Shot() \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u0443\u0434\u0430 \u0441\u043c\u043e\u0442\u0440\u0438\u0442 \u0438\u0433\u0440\u043e\u043a \u0438 \u043c\u0435\u0441\u0442\u043e \u0433\u0434\u0435 \u043e\u043d \u0441\u0442\u043e\u0438\u0442.                         bullet.Update(_store.State.Shot()).Ignore(); \/\/Ignore() \u044d\u0432\u0435\u0439\u0442\u0438\u0442 \u0442\u0430\u0441\u043a\u0443 \u0438 \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u0443\u0435\u0442 \u043e\u0448\u0438\u0431\u043a\u0443 \u0435\u0441\u043b\u0438 \u043e\u043d\u0430 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442                     }                 }             }             _store.State.Move();             if (_store.State.GameId.HasValue)             {                 var frame = GrainFactory.GetGrain&lt;IFrame&gt;(_store.State.GameId.Value);                 var fs = await frame.GetState();                 if (fs.Collide(_store.State))                     _store.State.MoveBack();                 GrainFactory.GetGrain&lt;IGame&gt;(_store.State.GameId.Value)                     .Update(_store.State.Clone())                     .Ignore();             }         }          public async Task Die()         {             _store.State.IsAlive = false;             if (_store.State.GameId.HasValue)                 await GrainFactory.GetGrain&lt;IGame&gt;(_store.State.GameId.Value).Update(_store.State.Clone());             await _store.ClearStateAsync();             DeactivateOnIdle();         }     } <\/code><\/pre>\n<p>  \u0413\u0440\u0435\u0439\u043d \u043f\u0443\u043b\u0438. \u041e\u043d\u0430 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0434\u0432\u0438\u0436\u0435\u0442\u0441\u044f \u043f\u043e \u0442\u0430\u0439\u043c\u0435\u0440\u0443 \u0438 \u0435\u0441\u043b\u0438 \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0441 \u0438\u0433\u0440\u043e\u043a\u043e\u043c \u0442\u043e \u043f\u0440\u0438\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0435\u043c\u0443 \u0443\u043c\u0435\u0440\u0435\u0442\u044c. \u0415\u0441\u043b\u0438 \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0441 \u043f\u0440\u0435\u043f\u044f\u0442\u0441\u0442\u0432\u0438\u0435\u043c \u043d\u0430 \u043a\u0430\u0440\u0442\u0435 \u0442\u043e \u0443\u043c\u0438\u0440\u0430\u0435\u0442 \u0441\u0430\u043c\u0430.  <\/p>\n<pre><code class=\"cs\">  public interface IBullet : IGrainWithGuidKey     {         Task Update(Bullet dto);     }      public class BulletGrain : Grain, IBullet     {         private readonly ILogger&lt;BulletGrain&gt; _logger;         private readonly IPersistentState&lt;Bullet&gt; _store;         private IDisposable _timer;         public BulletGrain(             ILogger&lt;BulletGrain&gt; logger,             [PersistentState(&quot;bullet&quot;, &quot;gameState&quot;)] IPersistentState&lt;Bullet&gt; store         )         {             _logger = logger;             _store = store;         }          public Task Update(Bullet dto)         {             _store.State = dto;             _store.State.Id = this.GetPrimaryKey();             return Task.CompletedTask;         }          public override Task OnActivateAsync()         {             _logger.LogInformation(&quot;ACTIVATED&quot;);             _timer = this.RegisterTimer(Update, null, TimeSpan.FromMilliseconds(1), TimeSpan.FromMilliseconds(50));             return base.OnActivateAsync();         }          public override async Task OnDeactivateAsync()         {             _logger.LogInformation(&quot;DEACTIVATED&quot;);             _timer?.Dispose();             _timer = null;             await _store.WriteStateAsync();             await base.OnDeactivateAsync();         }          public async Task Update(object obj)         {             if (!_store.State.IsAlive)             {                 await _store.ClearStateAsync();                 DeactivateOnIdle();                 return;             }             _store.State.Move();             if (_store.State.GameId.HasValue)             {                 var frame = GrainFactory.GetGrain&lt;IFrame&gt;(_store.State.GameId.Value);                 var fs = await frame.GetState();                 if (fs.Collide(_store.State))                     _store.State.IsAlive = false;                 if (_store.State.Point.X &gt; fs.Width || _store.State.Point.Y &gt; fs.Height)                     _store.State.IsAlive = false;                 var game = GrainFactory.GetGrain&lt;IGame&gt;(_store.State.GameId.Value);                 var players = await game.GetAlivePlayers();                 foreach (var player in players)                 {                     if (player.Collide(_store.State))                     {                         _store.State.IsAlive = false;                         GrainFactory.GetGrain&lt;IPlayer&gt;(player.Id).Die().Ignore();                         break;                     }                 }                 game.Update(_store.State.Clone()).Ignore();             }         }     } <\/code><\/pre>\n<\/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=\"https:\/\/habr.com\/ru\/post\/499556\/\"> https:\/\/habr.com\/ru\/post\/499556\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/499556\/\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/2l\/n1\/j0\/2ln1j0xw4cm-reechlymcdrx86q.png\"><\/p>\n<p>  \u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440! \u042f \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u044e \u0438\u0437\u0443\u0447\u0430\u0442\u044c MS Orleans \u0438 \u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u0435\u043d\u044c\u043a\u0443\u044e \u043e\u043d\u043b\u0430\u0439\u043d \u0438\u0433\u0440\u0443 \u0441 \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u044b\u043c \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u043c \u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u043c \u0441 Orleans \u0433\u0440\u0435\u0439\u043d\u0430\u043c\u0438. \u041d\u0430 \u044d\u0442\u043e\u0442 \u0440\u0430\u0437 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u0447\u0435\u043c \u0432\u0441\u0435 \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b\u043e\u0441\u044c \u0438 \u043a\u0430\u043a\u0438\u0435 \u044f \u0434\u043b\u044f \u0441\u0435\u0431\u044f \u0432\u044b\u0432\u043e\u0434\u044b \u0441\u0434\u0435\u043b\u0430\u043b. \u0417\u0430 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u0434\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434 \u043a\u0430\u0442.   <\/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-302847","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/302847","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=302847"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/302847\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=302847"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=302847"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=302847"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}