{"id":325967,"date":"2021-07-05T09:00:27","date_gmt":"2021-07-05T09:00:27","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=325967"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=325967","title":{"rendered":"gRPC \u0441\u0435\u0440\u0432\u0435\u0440 \u0441 \u043d\u0443\u043b\u044f"},"content":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<p>&nbsp;   \u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442\u044b. \u0412 \u043f\u0440\u043e\u0448\u043b\u043e\u043c \u043f\u043e\u0441\u0442\u0435 <a href=\"https:\/\/habr.com\/en\/post\/565020\/\" rel=\"noopener noreferrer nofollow\">https:\/\/habr.com\/en\/post\/565020\/<\/a> \u043c\u044b \u0441\u0440\u0430\u0432\u043d\u0438\u043b\u0438 gRPC \u0438 REST. \u0418 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043f\u0438\u0441\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0430 gRPC, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043f\u043e\u043d\u044f\u0442\u044c \u043d\u0443\u0436\u0435\u043d \u043b\u0438 \u043e\u043d \u043d\u0430\u043c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e. \u041d\u0430\u0448\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u0435 \u0431\u044b\u043b\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0430 \u043a\u043e\u0434\u043e\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043d\u0430 \u0440\u0430\u0437\u043d\u044b\u0435 \u044f\u0437\u044b\u043a\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u041d\u0430 \u044d\u0442\u0443 \u0440\u043e\u043b\u044c \u043d\u0435 \u043f\u043b\u043e\u0445\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u043b Swagger, Thrift \u0438 gRPC \u0441\u043e \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u043c. \u041e\u0442 Thrift, \u0441\u043f\u0443\u0441\u0442\u044f \u043a\u0430\u043a\u043e\u0435-\u0442\u043e \u0432\u0440\u0435\u043c\u044f, \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043e\u0442\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f, \u0438\u0437-\u0437\u0430 \u0435\u0433\u043e \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0435\u0439 \u0438 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438 \u043d\u0430 c# (\u043f\u043e-\u043c\u043e\u0435\u043c\u0443 \u044d\u0442\u043e \u0431\u044b\u043b\u0430 \u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u043f\u0440\u0438\u0447\u0438\u043d\u0430 \u043e\u0442\u043a\u0430\u0437\u0430). \u0414\u0430\u043b\u044c\u0448\u0435 \u0431\u044b\u043b \u0432\u044b\u0431\u043e\u0440 \u043c\u0435\u0436\u0434\u0443 Swagger + REST \u0438 gRPC. \u0412 \u0446\u0435\u043b\u043e\u043c \u043e\u0431\u0430 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 \u0445\u043e\u0440\u043e\u0448\u0438, \u043d\u043e \u0435\u0441\u043b\u0438 \u043c\u044b \u0434\u0443\u043c\u0430\u0435\u043c \u0433\u043e\u043d\u044f\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u0438 \u0447\u0430\u0441\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0435 \u043c\u0435\u0436\u0434\u0443 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u043c \u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c, \u0442\u043e \u043f\u043e\u0447\u0435\u043c\u0443 \u0431\u044b \u043d\u0435 \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c gRPC? &nbsp;<\/p>\n<p>   \u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0431\u0443\u0434\u0435\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<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/1cd\/d76\/ff1\/1cdd76ff1fabc4615664faa5cf5b9de3.png\" alt=\"\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\" title=\"\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\" width=\"610\" height=\"686\"><figcaption>\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/figcaption><\/figure>\n<p>&nbsp;&nbsp; \u042f \u0431\u0443\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c maven \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u042d\u0442\u043e \u0432\u0430\u0436\u043d\u043e\u0435 \u0443\u0442\u043e\u0447\u043d\u0435\u043d\u0438\u0435, \u043f\u043e\u0442\u043e\u043c\u0443 \u043a\u0430\u043a \u0431\u0443\u0434\u0443\u0449\u0430\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f .proto \u0444\u0430\u0439\u043b\u043e\u0432 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f \u0434\u043b\u044f gradle \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440.&nbsp;<\/p>\n<p>&nbsp;&nbsp; \u0414\u043b\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 gRPC \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435\u0433\u043e \u043e\u0434\u043d\u0443 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c:<\/p>\n<pre><code>&lt;dependency&gt;  &nbsp; &nbsp; &lt;groupId&gt;io.github.lognet&lt;\/groupId&gt;  &nbsp; &nbsp; &lt;artifactId&gt;grpc-spring-boot-starter&lt;\/artifactId&gt;  &nbsp; &nbsp; &lt;version&gt;4.5.4&lt;\/version&gt;  &lt;\/dependency&gt;<\/code><\/pre>\n<p>\u041e\u0442\u043b\u0438\u0447\u043d\u044b\u0439 Spring Boot \u0441\u0442\u0430\u0440\u0442\u0435\u0440 \u0434\u043b\u044f \u0441\u0442\u0430\u0440\u0442\u0430 \u043d\u0430\u0448\u0435\u0433\u043e gRPC \u0441\u0435\u0440\u0432\u0435\u0440\u0430.&nbsp; &nbsp;<\/p>\n<p>   \u041f\u043e\u0441\u043b\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439, \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c .proto \u0444\u0430\u0439\u043b\u044b. \u0412 proto \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0438 \u0414\u0422\u041e \u0434\u043b\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430\/\u043e\u0442\u0432\u0435\u0442\u0430. \u0412\u0441\u0435 \u043f\u0438\u0448\u0435\u0442\u0441\u044f \u0438\u043d\u0442\u0443\u0438\u0442\u0438\u0432\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e:<\/p>\n<figure class=\"float\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e4f\/26b\/3ea\/e4f26b3ea4519580352f76fac9975332.png\" alt=\"Profile Descriptor. Like DTO.\" title=\"Profile Descriptor. Like DTO.\" width=\"518\" height=\"306\"><figcaption>Profile Descriptor. Like DTO.<\/figcaption><\/figure>\n<p><em>ProfileDescriptor<\/em> &#8212; \u044d\u0442\u043e \u0443\u0441\u043b\u043e\u0432\u043d\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0444\u0438\u043b\u044f\/\u044e\u0437\u0435\u0440\u0430, \u0442\u043e \u0447\u0442\u043e \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u043e\u0431\u043c\u0435\u043d\u0430 \u043c\u0435\u0436\u0434\u0443 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c \u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u043c.&nbsp;<\/p>\n<p><em>int64<\/em> &#8212; \u0434\u043b\u044f Java \u044d\u0442\u043e \u0442\u0438\u043f Long. \u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c&nbsp; id \u043f\u0440\u043e\u0444\u0438\u043b\u044f \u0431\u0443\u0434\u0443\u0442 long.<\/p>\n<p><em>string<\/em> &#8212; \u0442\u0430\u043a\u0436\u0435 \u043a\u0430\u043a \u0438 \u0432 Java \u044d\u0442\u043e \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f.&nbsp;<\/p>\n<p>\u041e\u0442\u043b\u0438\u0447\u043d\u043e \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0414\u0422\u041e \u0434\u043b\u044f \u043e\u0431\u043c\u0435\u043d\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f\u043c\u0438. \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u0441\u0435\u0440\u0432\u0438\u0441:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/3f2\/0c1\/6c7\/3f20c16c766f78a70aaf0b6185d76b42.png\" alt=\"Proto Service Example\" title=\"Proto Service Example\" width=\"1184\" height=\"324\"><figcaption>Proto Service Example<\/figcaption><\/figure>\n<p>   gRPC \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0438\u0434\u043e\u0432 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043a\u043b\u0438\u0435\u043d\u0442\/\u0441\u0435\u0440\u0432\u0435\u0440:<\/p>\n<ul>\n<li>\n<p>\u0417\u0430\u043f\u0440\u043e\u0441-\u043e\u0442\u0432\u0435\u0442<\/p>\n<\/li>\n<li>\n<p>\u041a\u043b\u0438\u0435\u043d\u0442 \u0441\u0442\u0440\u0438\u043c<\/p>\n<\/li>\n<li>\n<p>\u0421\u0435\u0440\u0432\u0435\u0440 \u0441\u0442\u0440\u0438\u043c<\/p>\n<\/li>\n<li>\n<p>\u0414\u0432\u0443\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0441\u0442\u0440\u0438\u043c<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e \u0442\u0430\u043a\u043e\u043c \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0438 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u043d\u043e \u0442\u0443\u0442 &#8212; <a href=\"https:\/\/habr.com\/en\/post\/565020\/\" rel=\"noopener noreferrer nofollow\">https:\/\/habr.com\/en\/post\/565020\/<\/a><\/p>\n<p>   \u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0438\u0441, \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432 pom.xml \u043d\u0430\u043c \u0432 build \u0441\u0435\u043a\u0446\u0438\u044e \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u043b\u0430\u0433\u0438\u043d:<\/p>\n<pre><code>&lt;build&gt;         &lt;extensions&gt;             &lt;extension&gt;                 &lt;groupId&gt;kr.motd.maven&lt;\/groupId&gt;                 &lt;artifactId&gt;os-maven-plugin&lt;\/artifactId&gt;                 &lt;version&gt;1.6.2&lt;\/version&gt;             &lt;\/extension&gt;         &lt;\/extensions&gt;         &lt;plugins&gt;             &lt;plugin&gt;                 &lt;groupId&gt;org.xolstice.maven.plugins&lt;\/groupId&gt;                 &lt;artifactId&gt;protobuf-maven-plugin&lt;\/artifactId&gt;                 &lt;version&gt;0.6.1&lt;\/version&gt;                 &lt;configuration&gt;                     &lt;protoSourceRoot&gt;${project.basedir}\/src\/main\/proto&lt;\/protoSourceRoot&gt;                     &lt;outputDirectory&gt;${basedir}\/target\/generated-sources\/grpc-java&lt;\/outputDirectory&gt;                     &lt;protocArtifact&gt;com.google.protobuf:protoc:3.12.0:exe:${os.detected.classifier}&lt;\/protocArtifact&gt;                     &lt;pluginId&gt;grpc-java&lt;\/pluginId&gt;                     &lt;pluginArtifact&gt;io.grpc:protoc-gen-grpc-java:1.38.0:exe:${os.detected.classifier}&lt;\/pluginArtifact&gt;                     &lt;clearOutputDirectory&gt;false&lt;\/clearOutputDirectory&gt;                 &lt;\/configuration&gt;                 &lt;executions&gt;                     &lt;execution&gt;                         &lt;goals&gt;                             &lt;goal&gt;compile&lt;\/goal&gt;                             &lt;goal&gt;compile-custom&lt;\/goal&gt;                         &lt;\/goals&gt;                     &lt;\/execution&gt;                 &lt;\/executions&gt;             &lt;\/plugin&gt;         &lt;\/plugins&gt;     &lt;\/build&gt; <\/code><\/pre>\n<p><em>protoSourceRoot<\/em> &#8212; \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438, \u0433\u0434\u0435 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f .proto \u0444\u0430\u0439\u043b\u044b.&nbsp;<\/p>\n<p><em>outputDirectory<\/em> &#8212; \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e, \u043a\u0443\u0434\u0430 \u0431\u0443\u0434\u0443\u0442 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0444\u0430\u0439\u043b\u044b.&nbsp;<\/p>\n<p><em>clearOutputDirectory<\/em> &#8212; \u0444\u043b\u0430\u0433 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u043d\u0435 \u043e\u0447\u0438\u0449\u0430\u0442\u044c \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b.<\/p>\n<p>   \u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u0432\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0441\u0431\u043e\u0440\u043a\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u043a\u0440\u044b\u0442\u044c \u043f\u0430\u043f\u043a\u0443 target \u0438 \u043d\u0430\u0439\u0442\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/1fb\/007\/cbb\/1fb007cbbc5affc36f969627241a7ba2.png\" alt=\"Generated Structure\" title=\"Generated Structure\" width=\"868\" height=\"464\"><figcaption>Generated Structure<\/figcaption><\/figure>\n<p>   \u0415\u0441\u043b\u0438 \u0432\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443, \u0442\u043e \u043f\u043e\u0437\u0434\u0440\u0430\u0432\u043b\u044f\u044e. \u0412\u0441\u0435 \u0438\u0434\u0435\u0442 \u043f\u043e \u043f\u043b\u0430\u043d\u0443 \u0438 \u0443 \u043d\u0430\u0441 \u0432\u0441\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f. \u0415\u0441\u043b\u0438 \u0447\u0442\u043e \u0442\u043e \u043f\u043e\u0448\u043b\u043e \u043d\u0435 \u0442\u0430\u043a, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u043a\u043e\u0434 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 <a href=\"https:\/\/github.com\/deft1991\/petproject\/tree\/master\/grpc-server\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/deft1991\/petproject\/tree\/master\/grpc-server<\/a>.<\/p>\n<p>   \u0418\u0442\u0430\u043a, \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u044b. \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0438\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c.<\/p>\n<figure class=\"float full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/cb0\/59d\/0ef\/cb059d0ef94b977a2526a7cc77c44699.png\" alt=\"Service Structure\" title=\"Service Structure\" width=\"524\" height=\"252\"><figcaption>Service Structure<\/figcaption><\/figure>\n<p>\u041d\u0430\u043f\u0438\u0448\u0435\u043c \u0441\u0432\u043e\u0439 GrpcProfileService, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c&nbsp; ProfileServiceGrpc.ProfileServiceImplBase.&nbsp;\u041f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e. \u0423 \u043d\u0430\u0441 \u0433\u043e\u0442\u043e\u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0441\u0435\u0440\u0432\u0438\u0441.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u043c\u0435\u0442\u043e\u0434\u044b, \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u0435 :&nbsp;<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/86b\/99b\/66c\/86b99b66c0318b2b093bb4c51c805f00.png\" alt=\"Request Response\" title=\"Request Response\" width=\"1184\" height=\"266\"><figcaption>Request Response<\/figcaption><\/figure>\n<p>   \u041c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043d\u0430\u0434 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u043c \u0441\u0442\u043e\u0438\u0442 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f GRpcService. \u042d\u0442\u0430 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f \u043f\u043e\u043c\u0435\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u043a\u043b\u0430\u0441\u0441 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d \u043a\u0430\u043a gRPC \u0431\u0438\u043d.<\/p>\n<p>   \u0412\u0435\u0440\u043d\u0435\u043c\u0441\u044f \u043a \u043d\u0430\u0448\u0435\u043c\u0443 \u043c\u0435\u0442\u043e\u0434\u0443. \u041f\u043e\u043a\u0430 \u044f \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b \u0432\u0441\u0435\u0433\u043e 1 \u043c\u0435\u0442\u043e\u0434 &#8212; \u043c\u0435\u0442\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u043f\u0440\u043e\u0444\u0438\u043b\u044c. \u0414\u043b\u044f \u043e\u0442\u0432\u0435\u0442\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0443 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c responseObserver. \u0427\u0442\u043e \u0431\u044b \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0443\u0448\u043b\u043e \u043d\u0430 \u043a\u043b\u0438\u0435\u043d\u0442 \u043c\u044b \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c responseObserver.onNext \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u043c \u0442\u0435\u043b\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f. \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e ProfileDescriptorOuterClass.ProfileDescriptor. \u0423 \u0432\u0441\u0435\u0445 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0441\u0440\u0430\u0437\u0443 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f Builder \u0438 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043d\u0435\u0433\u043e \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u201c\u0441\u0431\u043b\u0438\u0434\u0438\u0442\u044c\u201d \u043e\u0431\u044a\u0435\u043a\u0442. \u041f\u043e\u0441\u043b\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c responseObserver.onCompleted &#8212; \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435 \u043e\u0431 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u043c \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0438 \u0441\u0442\u0440\u0438\u043c\u0430.<\/p>\n<p>&nbsp;&nbsp; \u0414\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0438 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0439 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0432 REST \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043e\u0431\u044b\u0447\u043d\u043e Postman. \u0422\u0430\u043a\u0436\u0435 \u0441 \u0435\u0433\u043e \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c gRPC \u0437\u0430\u043f\u0440\u043e\u0441\u044b. \u041d\u043e \u0434\u043b\u044f \u043c\u0435\u043d\u044f \u0431\u043e\u043b\u0435\u0435 \u0443\u0434\u043e\u0431\u043d\u044b\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f BloomRPC. \u0415\u043c\u0443 \u043d\u0443\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u0443\u0442\u044c \u043a proto \u0444\u0430\u0439\u043b\u0430\u043c \u0438 \u0445\u043e\u0441\u0442, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441.&nbsp;<\/p>\n<p>   \u041f\u0440\u0438 \u043e\u043f\u0440\u0430\u0432\u043a\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 <em>getCurrentProfile<\/em> \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c:<\/p>\n<pre><code>{   \"profile_id\": \"1\",   \"name\": \"test\" }<\/code><\/pre>\n<p>   \u041e\u0442\u043b\u0438\u0447\u043d\u043e. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0434\u0432\u0438\u043d\u0435\u043c\u0441\u044f \u0434\u0430\u043b\u044c\u0448\u0435 \u0438 \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c <em>client stream<\/em>. \u041f\u0440\u0438 \u0442\u0430\u043a\u043e\u043c \u0442\u0438\u043f\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u043a\u043b\u0438\u0435\u043d\u0442 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0441\u044b\u043b\u0430\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u044b, \u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u0440\u0435\u0430\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u0435 \u0438\u0437 \u043d\u0438\u0445 \u0438\/\u0438\u043b\u0438, \u043f\u0440\u0438 \u043f\u043e\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0438 \u0432\u0441\u0435\u0445 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0438\u0445 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439, \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0438\u0445. \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0440\u0435\u0434\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a86\/d14\/431\/a86d144316791db1b3d5f05f29164a35.png\" alt=\"Client Stream\" title=\"Client Stream\" width=\"1184\" height=\"470\"><figcaption>Client Stream<\/figcaption><\/figure>\n<p>\u041c\u044b \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u043d\u043e\u0432\u044b\u0439 <em>StreamObserver<\/em> \u043a\u043b\u0438\u0435\u043d\u0442\u0443. \u0422\u0430\u043a \u043a\u0430\u043a <em>StreamObserver &#8212; <\/em>\u044d\u0442\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u0442\u043e \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u044b. \u041d\u0430\u0441 \u043f\u043e\u043a\u0430 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442 \u043c\u0435\u0442\u043e\u0434 onNext. \u0412 \u044d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043e\u0442 \u043a\u043b\u0438\u0435\u043d\u0442\u0430. \u041f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u043a\u043e\u0434\u0430 \u0438 \u043f\u043e\u0441\u044b\u043b\u043a\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u043e\u0442 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440, \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0441\u0447\u0435\u0442\u0447\u0438\u043a <em>pointCount <\/em>\u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0438 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435.&nbsp;<\/p>\n<p><em>   Server stream. <\/em>\u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0442\u0438\u043f\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u043a\u043b\u0438\u0435\u043d\u0442 \u043f\u043e\u0441\u043b\u0430\u043b \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441, \u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u043f\u043e\u0441\u044b\u043b\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u0430. \u042d\u0442\u043e \u0431\u0435\u0437\u0443\u043c\u043d\u043e \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u043c \u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c. \u041f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0434\u0430\u043d\u043d\u043e\u0439 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0440\u0430\u0441\u0441\u044b\u043b\u0430\u0442\u044c \u043a\u043b\u0438\u0435\u043d\u0442\u0430\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f, \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0438 \u043d\u043e\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438. \u041f\u0440\u043e\u0441\u0442\u043e\u0439 \u043a\u043e\u0434 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438:&nbsp;<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/72c\/504\/efd\/72c504efd2b59b9e67ea34baafe32ead.png\" alt=\"Server Stream\" title=\"Server Stream\" width=\"1190\" height=\"206\"><figcaption>Server Stream<\/figcaption><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8de\/155\/58f\/8de15558fcf64850cdcc636132c7382f.png\" alt=\"BloomRPC Stream Responces\" title=\"BloomRPC Stream Responces\" width=\"1148\" height=\"356\"><figcaption>BloomRPC Stream Responces<\/figcaption><\/figure>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u044f \u0441\u0442\u0440\u0438\u043c\u0430, \u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u043e\u0441\u044b\u043b\u0430\u0435\u0442 5 \u043e\u0442\u0432\u0435\u0442\u043e\u0432. \u0412 \u043a\u0430\u043a\u043e\u043c \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u043e\u0442\u0432\u0435\u0442\u0435 \u043d\u0430\u0439\u0434\u0438 \u043f\u0440\u043e\u0444\u0438\u043b\u044f \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f.&nbsp;<\/p>\n<p>&nbsp;&nbsp; \u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u043c\u044b \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0438 \u0441\u0442\u0440\u0438\u043c\u044b \u0441 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043d\u0430 \u043a\u043b\u0438\u0435\u043d\u0442, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u0442\u044c \u043a \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0438\u044e bidirectional streams. \u0412 \u0442\u0430\u043a\u043e\u043c \u0442\u0438\u043f\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043a\u043b\u0438\u0435\u043d\u0442 \u0438 \u0441\u0435\u0440\u0432\u0435\u0440 \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u043e\u0431\u043c\u0435\u043d\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f\u043c\u0438 \u043d\u0435 \u0431\u043b\u043e\u043a\u0438\u0440\u0443\u044f \u0434\u0440\u0443\u0433 \u0434\u0440\u0443\u0433\u0430.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/75f\/6b1\/304\/75f6b13048729d2257bd60700acc3357.png\" width=\"1190\" height=\"726\"><figcaption><\/figcaption><\/figure>\n<p>&nbsp;\u0412 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0432 \u043e\u0442\u0432\u0435\u0442 \u043d\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u0430, \u0441\u0435\u0440\u0432\u0435\u0440 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0441\u044b\u043b\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0444\u0438\u043b\u044c \u0441 \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u043d\u044b\u043c \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u043e\u043c <em>pointCount.&nbsp;<\/em><\/p>\n<p><em>&nbsp;&nbsp; <\/em>\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0438 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0441 \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435\u043c \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430, \u0442\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0435\u043c <a href=\"https:\/\/github.com\/deft1991\/petproject\/tree\/master\/grpc-server\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/deft1991\/petproject\/tree\/master\/grpc-server<\/a>&nbsp; , \u0433\u0434\u0435 \u043b\u0435\u0436\u0438\u0442 \u043a\u043e\u0434 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0439 \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435.&nbsp;<\/p>\n<p>   \u041c\u044b \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0438 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043c\u043e\u043c\u043c\u0435\u043d\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0442\u043e\u0438\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c, \u0447\u0442\u043e \u0431\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c gRPC. \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u0414\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e BloomRPC &#8212; <a href=\"https:\/\/appimage.github.io\/BloomRPC\/\" rel=\"noopener noreferrer nofollow\">https:\/\/appimage.github.io\/BloomRPC\/<\/a> .<\/p>\n<p>   \u0410 \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 gRPC \u0432 \u043f\u0440\u043e\u0434\u0435? \u041a\u0430\u043a\u0438\u0435 \u0443 \u0432\u0430\u0441 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u043f\u0443\u043d\u043a\u0442\u044b \u043f\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c gRPC?<\/p>\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\/565582\/\"> https:\/\/habr.com\/ru\/post\/565582\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<p>&nbsp;   \u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442\u044b. \u0412 \u043f\u0440\u043e\u0448\u043b\u043e\u043c \u043f\u043e\u0441\u0442\u0435 <a href=\"https:\/\/habr.com\/en\/post\/565020\/\" rel=\"noopener noreferrer nofollow\">https:\/\/habr.com\/en\/post\/565020\/<\/a> \u043c\u044b \u0441\u0440\u0430\u0432\u043d\u0438\u043b\u0438 gRPC \u0438 REST. \u0418 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043f\u0438\u0441\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0430 gRPC, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043f\u043e\u043d\u044f\u0442\u044c \u043d\u0443\u0436\u0435\u043d \u043b\u0438 \u043e\u043d \u043d\u0430\u043c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e. \u041d\u0430\u0448\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u0435 \u0431\u044b\u043b\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0430 \u043a\u043e\u0434\u043e\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043d\u0430 \u0440\u0430\u0437\u043d\u044b\u0435 \u044f\u0437\u044b\u043a\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u041d\u0430 \u044d\u0442\u0443 \u0440\u043e\u043b\u044c \u043d\u0435 \u043f\u043b\u043e\u0445\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u043b Swagger, Thrift \u0438 gRPC \u0441\u043e \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u043c. \u041e\u0442 Thrift, \u0441\u043f\u0443\u0441\u0442\u044f \u043a\u0430\u043a\u043e\u0435-\u0442\u043e \u0432\u0440\u0435\u043c\u044f, \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043e\u0442\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f, \u0438\u0437-\u0437\u0430 \u0435\u0433\u043e \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0435\u0439 \u0438 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438 \u043d\u0430 c# (\u043f\u043e-\u043c\u043e\u0435\u043c\u0443 \u044d\u0442\u043e \u0431\u044b\u043b\u0430 \u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u043f\u0440\u0438\u0447\u0438\u043d\u0430 \u043e\u0442\u043a\u0430\u0437\u0430). \u0414\u0430\u043b\u044c\u0448\u0435 \u0431\u044b\u043b \u0432\u044b\u0431\u043e\u0440 \u043c\u0435\u0436\u0434\u0443 Swagger + REST \u0438 gRPC. \u0412 \u0446\u0435\u043b\u043e\u043c \u043e\u0431\u0430 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 \u0445\u043e\u0440\u043e\u0448\u0438, \u043d\u043e \u0435\u0441\u043b\u0438 \u043c\u044b \u0434\u0443\u043c\u0430\u0435\u043c \u0433\u043e\u043d\u044f\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u0438 \u0447\u0430\u0441\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0435 \u043c\u0435\u0436\u0434\u0443 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u043c \u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c, \u0442\u043e \u043f\u043e\u0447\u0435\u043c\u0443 \u0431\u044b \u043d\u0435 \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c gRPC? &nbsp;<\/p>\n<p>   \u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0431\u0443\u0434\u0435\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<figure class=\"full-width\"><figcaption>\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/figcaption><\/figure>\n<p>&nbsp;&nbsp; \u042f \u0431\u0443\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c maven \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u042d\u0442\u043e \u0432\u0430\u0436\u043d\u043e\u0435 \u0443\u0442\u043e\u0447\u043d\u0435\u043d\u0438\u0435, \u043f\u043e\u0442\u043e\u043c\u0443 \u043a\u0430\u043a \u0431\u0443\u0434\u0443\u0449\u0430\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f .proto \u0444\u0430\u0439\u043b\u043e\u0432 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f \u0434\u043b\u044f gradle \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440.&nbsp;<\/p>\n<p>&nbsp;&nbsp; \u0414\u043b\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 gRPC \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435\u0433\u043e \u043e\u0434\u043d\u0443 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c:<\/p>\n<pre><code>&lt;dependency&gt;  &nbsp; &nbsp; &lt;groupId&gt;io.github.lognet&lt;\/groupId&gt;  &nbsp; &nbsp; &lt;artifactId&gt;grpc-spring-boot-starter&lt;\/artifactId&gt;  &nbsp; &nbsp; &lt;version&gt;4.5.4&lt;\/version&gt;  &lt;\/dependency&gt;<\/code><\/pre>\n<p>\u041e\u0442\u043b\u0438\u0447\u043d\u044b\u0439 Spring Boot \u0441\u0442\u0430\u0440\u0442\u0435\u0440 \u0434\u043b\u044f \u0441\u0442\u0430\u0440\u0442\u0430 \u043d\u0430\u0448\u0435\u0433\u043e gRPC \u0441\u0435\u0440\u0432\u0435\u0440\u0430.&nbsp; &nbsp;<\/p>\n<p>   \u041f\u043e\u0441\u043b\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439, \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c .proto \u0444\u0430\u0439\u043b\u044b. \u0412 proto \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0438 \u0414\u0422\u041e \u0434\u043b\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430\/\u043e\u0442\u0432\u0435\u0442\u0430. \u0412\u0441\u0435 \u043f\u0438\u0448\u0435\u0442\u0441\u044f \u0438\u043d\u0442\u0443\u0438\u0442\u0438\u0432\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e:<\/p>\n<figure class=\"float\"><figcaption>Profile Descriptor. Like DTO.<\/figcaption><\/figure>\n<p><em>ProfileDescriptor<\/em> &#8212; \u044d\u0442\u043e \u0443\u0441\u043b\u043e\u0432\u043d\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0444\u0438\u043b\u044f\/\u044e\u0437\u0435\u0440\u0430, \u0442\u043e \u0447\u0442\u043e \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u043e\u0431\u043c\u0435\u043d\u0430 \u043c\u0435\u0436\u0434\u0443 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c \u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u043c.&nbsp;<\/p>\n<p><em>int64<\/em> &#8212; \u0434\u043b\u044f Java \u044d\u0442\u043e \u0442\u0438\u043f Long. \u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c&nbsp; id \u043f\u0440\u043e\u0444\u0438\u043b\u044f \u0431\u0443\u0434\u0443\u0442 long.<\/p>\n<p><em>string<\/em> &#8212; \u0442\u0430\u043a\u0436\u0435 \u043a\u0430\u043a \u0438 \u0432 Java \u044d\u0442\u043e \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f.&nbsp;<\/p>\n<p>\u041e\u0442\u043b\u0438\u0447\u043d\u043e \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0414\u0422\u041e \u0434\u043b\u044f \u043e\u0431\u043c\u0435\u043d\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f\u043c\u0438. \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u0441\u0435\u0440\u0432\u0438\u0441:<\/p>\n<figure class=\"full-width\"><figcaption>Proto Service Example<\/figcaption><\/figure>\n<p>   gRPC \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0438\u0434\u043e\u0432 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043a\u043b\u0438\u0435\u043d\u0442\/\u0441\u0435\u0440\u0432\u0435\u0440:<\/p>\n<ul>\n<li>\n<p>\u0417\u0430\u043f\u0440\u043e\u0441-\u043e\u0442\u0432\u0435\u0442<\/p>\n<\/li>\n<li>\n<p>\u041a\u043b\u0438\u0435\u043d\u0442 \u0441\u0442\u0440\u0438\u043c<\/p>\n<\/li>\n<li>\n<p>\u0421\u0435\u0440\u0432\u0435\u0440 \u0441\u0442\u0440\u0438\u043c<\/p>\n<\/li>\n<li>\n<p>\u0414\u0432\u0443\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0441\u0442\u0440\u0438\u043c<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e \u0442\u0430\u043a\u043e\u043c \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0438 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u043d\u043e \u0442\u0443\u0442 &#8212; <a href=\"https:\/\/habr.com\/en\/post\/565020\/\" rel=\"noopener noreferrer nofollow\">https:\/\/habr.com\/en\/post\/565020\/<\/a><\/p>\n<p>   \u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0438\u0441, \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432 pom.xml \u043d\u0430\u043c \u0432 build \u0441\u0435\u043a\u0446\u0438\u044e \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u043b\u0430\u0433\u0438\u043d:<\/p>\n<pre><code>&lt;build&gt;         &lt;extensions&gt;             &lt;extension&gt;                 &lt;groupId&gt;kr.motd.maven&lt;\/groupId&gt;                 &lt;artifactId&gt;os-maven-plugin&lt;\/artifactId&gt;                 &lt;version&gt;1.6.2&lt;\/version&gt;             &lt;\/extension&gt;         &lt;\/extensions&gt;         &lt;plugins&gt;             &lt;plugin&gt;                 &lt;groupId&gt;org.xolstice.maven.plugins&lt;\/groupId&gt;                 &lt;artifactId&gt;protobuf-maven-plugin&lt;\/artifactId&gt;                 &lt;version&gt;0.6.1&lt;\/version&gt;                 &lt;configuration&gt;                     &lt;protoSourceRoot&gt;${project.basedir}\/src\/main\/proto&lt;\/protoSourceRoot&gt;                     &lt;outputDirectory&gt;${basedir}\/target\/generated-sources\/grpc-java&lt;\/outputDirectory&gt;                     &lt;protocArtifact&gt;com.google.protobuf:protoc:3.12.0:exe:${os.detected.classifier}&lt;\/protocArtifact&gt;                     &lt;pluginId&gt;grpc-java&lt;\/pluginId&gt;                     &lt;pluginArtifact&gt;io.grpc:protoc-gen-grpc-java:1.38.0:exe:${os.detected.classifier}&lt;\/pluginArtifact&gt;                     &lt;clearOutputDirectory&gt;false&lt;\/clearOutputDirectory&gt;                 &lt;\/configuration&gt;                 &lt;executions&gt;                     &lt;execution&gt;                         &lt;goals&gt;                             &lt;goal&gt;compile&lt;\/goal&gt;                             &lt;goal&gt;compile-custom&lt;\/goal&gt;                         &lt;\/goals&gt;                     &lt;\/execution&gt;                 &lt;\/executions&gt;             &lt;\/plugin&gt;         &lt;\/plugins&gt;     &lt;\/build&gt; <\/code><\/pre>\n<p><em>protoSourceRoot<\/em> &#8212; \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438, \u0433\u0434\u0435 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f .proto \u0444\u0430\u0439\u043b\u044b.&nbsp;<\/p>\n<p><em>outputDirectory<\/em> &#8212; \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e, \u043a\u0443\u0434\u0430 \u0431\u0443\u0434\u0443\u0442 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0444\u0430\u0439\u043b\u044b.&nbsp;<\/p>\n<p><em>clearOutputDirectory<\/em> &#8212; \u0444\u043b\u0430\u0433 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u043d\u0435 \u043e\u0447\u0438\u0449\u0430\u0442\u044c \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b.<\/p>\n<p>   \u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u0432\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0441\u0431\u043e\u0440\u043a\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u043a\u0440\u044b\u0442\u044c \u043f\u0430\u043f\u043a\u0443 target \u0438 \u043d\u0430\u0439\u0442\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443:<\/p>\n<figure class=\"full-width\"><figcaption>Generated Structure<\/figcaption><\/figure>\n<p>   \u0415\u0441\u043b\u0438 \u0432\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443, \u0442\u043e \u043f\u043e\u0437\u0434\u0440\u0430\u0432\u043b\u044f\u044e. \u0412\u0441\u0435 \u0438\u0434\u0435\u0442 \u043f\u043e \u043f\u043b\u0430\u043d\u0443 \u0438 \u0443 \u043d\u0430\u0441 \u0432\u0441\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f. \u0415\u0441\u043b\u0438 \u0447\u0442\u043e \u0442\u043e \u043f\u043e\u0448\u043b\u043e \u043d\u0435 \u0442\u0430\u043a, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u043a\u043e\u0434 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 <a href=\"https:\/\/github.com\/deft1991\/petproject\/tree\/master\/grpc-server\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/deft1991\/petproject\/tree\/master\/grpc-server<\/a>.<\/p>\n<p>   \u0418\u0442\u0430\u043a, \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u044b. \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0438\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c.<\/p>\n<figure class=\"float full-width\"><figcaption>Service Structure<\/figcaption><\/figure>\n<p>\u041d\u0430\u043f\u0438\u0448\u0435\u043c \u0441\u0432\u043e\u0439 GrpcProfileService, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c&nbsp; ProfileServiceGrpc.ProfileServiceImplBase.&nbsp;\u041f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e. \u0423 \u043d\u0430\u0441 \u0433\u043e\u0442\u043e\u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0441\u0435\u0440\u0432\u0438\u0441.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u043c\u0435\u0442\u043e\u0434\u044b, \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u0435 :&nbsp;<\/p>\n<figure class=\"full-width\"><figcaption>Request Response<\/figcaption><\/figure>\n<p>   \u041c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043d\u0430\u0434 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u043c \u0441\u0442\u043e\u0438\u0442 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f GRpcService. \u042d\u0442\u0430 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f \u043f\u043e\u043c\u0435\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u043a\u043b\u0430\u0441\u0441 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d \u043a\u0430\u043a gRPC \u0431\u0438\u043d.<\/p>\n<p>   \u0412\u0435\u0440\u043d\u0435\u043c\u0441\u044f \u043a \u043d\u0430\u0448\u0435\u043c\u0443 \u043c\u0435\u0442\u043e\u0434\u0443. \u041f\u043e\u043a\u0430 \u044f \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b \u0432\u0441\u0435\u0433\u043e 1 \u043c\u0435\u0442\u043e\u0434 &#8212; \u043c\u0435\u0442\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u043f\u0440\u043e\u0444\u0438\u043b\u044c. \u0414\u043b\u044f \u043e\u0442\u0432\u0435\u0442\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0443 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c responseObserver. \u0427\u0442\u043e \u0431\u044b \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0443\u0448\u043b\u043e \u043d\u0430 \u043a\u043b\u0438\u0435\u043d\u0442 \u043c\u044b \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c responseObserver.onNext \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u043c \u0442\u0435\u043b\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f. \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e ProfileDescriptorOuterClass.ProfileDescriptor. \u0423 \u0432\u0441\u0435\u0445 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0441\u0440\u0430\u0437\u0443 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f Builder \u0438 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043d\u0435\u0433\u043e \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u201c\u0441\u0431\u043b\u0438\u0434\u0438\u0442\u044c\u201d \u043e\u0431\u044a\u0435\u043a\u0442. \u041f\u043e\u0441\u043b\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c responseObserver.onCompleted &#8212; \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435 \u043e\u0431 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u043c \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0438 \u0441\u0442\u0440\u0438\u043c\u0430.<\/p>\n<p>&nbsp;&nbsp; \u0414\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0438 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0439 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0432 REST \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043e\u0431\u044b\u0447\u043d\u043e Postman. \u0422\u0430\u043a\u0436\u0435 \u0441 \u0435\u0433\u043e \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c gRPC \u0437\u0430\u043f\u0440\u043e\u0441\u044b. \u041d\u043e \u0434\u043b\u044f \u043c\u0435\u043d\u044f \u0431\u043e\u043b\u0435\u0435 \u0443\u0434\u043e\u0431\u043d\u044b\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f BloomRPC. \u0415\u043c\u0443 \u043d\u0443\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u0443\u0442\u044c \u043a proto \u0444\u0430\u0439\u043b\u0430\u043c \u0438 \u0445\u043e\u0441\u0442, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441.&nbsp;<\/p>\n<p>   \u041f\u0440\u0438 \u043e\u043f\u0440\u0430\u0432\u043a\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 <em>getCurrentProfile<\/em> \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c:<\/p>\n<pre><code>{   \"profile_id\": \"1\",   \"name\": \"test\" }<\/code><\/pre>\n<p>   \u041e\u0442\u043b\u0438\u0447\u043d\u043e. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0434\u0432\u0438\u043d\u0435\u043c\u0441\u044f \u0434\u0430\u043b\u044c\u0448\u0435 \u0438 \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c <em>client stream<\/em>. \u041f\u0440\u0438 \u0442\u0430\u043a\u043e\u043c \u0442\u0438\u043f\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u043a\u043b\u0438\u0435\u043d\u0442 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0441\u044b\u043b\u0430\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u044b, \u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u0440\u0435\u0430\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u0435 \u0438\u0437 \u043d\u0438\u0445 \u0438\/\u0438\u043b\u0438, \u043f\u0440\u0438 \u043f\u043e\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0438 \u0432\u0441\u0435\u0445 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0438\u0445 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439, \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0438\u0445. \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0440\u0435\u0434\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a:<\/p>\n<figure class=\"full-width\"><figcaption>Client Stream<\/figcaption><\/figure>\n<p>\u041c\u044b \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u043d\u043e\u0432\u044b\u0439 <em>StreamObserver<\/em> \u043a\u043b\u0438\u0435\u043d\u0442\u0443. \u0422\u0430\u043a \u043a\u0430\u043a <em>StreamObserver &#8212; <\/em>\u044d\u0442\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u0442\u043e \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u044b. \u041d\u0430\u0441 \u043f\u043e\u043a\u0430 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442 \u043c\u0435\u0442\u043e\u0434 onNext. \u0412 \u044d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043e\u0442 \u043a\u043b\u0438\u0435\u043d\u0442\u0430. \u041f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u043a\u043e\u0434\u0430 \u0438 \u043f\u043e\u0441\u044b\u043b\u043a\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u043e\u0442 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440, \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0441\u0447\u0435\u0442\u0447\u0438\u043a <em>pointCount <\/em>\u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0438 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435.&nbsp;<\/p>\n<p><em>   Server stream. <\/em>\u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0442\u0438\u043f\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u043a\u043b\u0438\u0435\u043d\u0442 \u043f\u043e\u0441\u043b\u0430\u043b \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441, \u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u043f\u043e\u0441\u044b\u043b\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u0430. \u042d\u0442\u043e \u0431\u0435\u0437\u0443\u043c\u043d\u043e \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u043c \u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c. \u041f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0434\u0430\u043d\u043d\u043e\u0439 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0440\u0430\u0441\u0441\u044b\u043b\u0430\u0442\u044c \u043a\u043b\u0438\u0435\u043d\u0442\u0430\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f, \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0438 \u043d\u043e\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438. \u041f\u0440\u043e\u0441\u0442\u043e\u0439 \u043a\u043e\u0434 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438:&nbsp;<\/p>\n<figure class=\"full-width\"><figcaption>Server Stream<\/figcaption><\/figure>\n<figure class=\"full-width\"><figcaption>BloomRPC Stream Responces<\/figcaption><\/figure>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u044f \u0441\u0442\u0440\u0438\u043c\u0430, \u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u043e\u0441\u044b\u043b\u0430\u0435\u0442 5 \u043e\u0442\u0432\u0435\u0442\u043e\u0432. \u0412 \u043a\u0430\u043a\u043e\u043c \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u043e\u0442\u0432\u0435\u0442\u0435 \u043d\u0430\u0439\u0434\u0438 \u043f\u0440\u043e\u0444\u0438\u043b\u044f \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f.&nbsp;<\/p>\n<p>&nbsp;&nbsp; \u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u043c\u044b \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0438 \u0441\u0442\u0440\u0438\u043c\u044b \u0441 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043d\u0430 \u043a\u043b\u0438\u0435\u043d\u0442, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u0442\u044c \u043a \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0438\u044e bidirectional streams. \u0412 \u0442\u0430\u043a\u043e\u043c \u0442\u0438\u043f\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043a\u043b\u0438\u0435\u043d\u0442 \u0438 \u0441\u0435\u0440\u0432\u0435\u0440 \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u043e\u0431\u043c\u0435\u043d\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f\u043c\u0438 \u043d\u0435 \u0431\u043b\u043e\u043a\u0438\u0440\u0443\u044f \u0434\u0440\u0443\u0433 \u0434\u0440\u0443\u0433\u0430.<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>&nbsp;\u0412 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0432 \u043e\u0442\u0432\u0435\u0442 \u043d\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u0430, \u0441\u0435\u0440\u0432\u0435\u0440 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0441\u044b\u043b\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0444\u0438\u043b\u044c \u0441 \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u043d\u044b\u043c \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u043e\u043c <em>pointCount.&nbsp;<\/em><\/p>\n<p><em>&nbsp;&nbsp; <\/em>\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0438 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0441 \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435\u043c \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430, \u0442\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0435\u043c <a href=\"https:\/\/github.com\/deft1991\/petproject\/tree\/master\/grpc-server\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/deft1991\/petproject\/tree\/master\/grpc-server<\/a>&nbsp; , \u0433\u0434\u0435 \u043b\u0435\u0436\u0438\u0442 \u043a\u043e\u0434 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0439 \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435.&nbsp;<\/p>\n<p>   \u041c\u044b \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0438 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043c\u043e\u043c\u043c\u0435\u043d\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0442\u043e\u0438\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c, \u0447\u0442\u043e \u0431\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c gRPC. \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u0414\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e BloomRPC &#8212; <a href=\"https:\/\/appimage.github.io\/BloomRPC\/\" rel=\"noopener noreferrer nofollow\">https:\/\/appimage.github.io\/BloomRPC\/<\/a> .<\/p>\n<p>   \u0410 \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 gRPC \u0432 \u043f\u0440\u043e\u0434\u0435? \u041a\u0430\u043a\u0438\u0435 \u0443 \u0432\u0430\u0441 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u043f\u0443\u043d\u043a\u0442\u044b \u043f\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c gRPC?<\/p>\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\/565582\/\"> https:\/\/habr.com\/ru\/post\/565582\/<\/a><br \/><\/br><\/br><\/div>\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-325967","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/325967","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=325967"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/325967\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=325967"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=325967"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=325967"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}