<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Alexander Uryadov on Medium]]></title>
        <description><![CDATA[Stories by Alexander Uryadov on Medium]]></description>
        <link>https://medium.com/@uryadov212?source=rss-95d7d5af6e4e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*a4y0Ueq_SJH3zWGc</url>
            <title>Stories by Alexander Uryadov on Medium</title>
            <link>https://medium.com/@uryadov212?source=rss-95d7d5af6e4e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 00:59:46 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@uryadov212/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Spring Boot with gRPC[EN]]]></title>
            <link>https://medium.com/@uryadov212/spring-boot-with-grpc-en-a3ae4d49d25d?source=rss-95d7d5af6e4e------2</link>
            <guid isPermaLink="false">https://medium.com/p/a3ae4d49d25d</guid>
            <category><![CDATA[spring]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[grpc]]></category>
            <category><![CDATA[spring-boot]]></category>
            <dc:creator><![CDATA[Alexander Uryadov]]></dc:creator>
            <pubDate>Mon, 05 Dec 2022 09:02:01 GMT</pubDate>
            <atom:updated>2022-12-05T09:18:04.973Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b54bYuwn-SsraMWp2slxig.jpeg" /></figure><p>After a long search for an elegant and concise implementation of <a href="https://grpc.io/">gRPC</a> with <a href="https://spring.io/projects/spring-boot">Spring Boot</a> and <a href="https://gradle.org/">Gradle</a>, reading the documentation, and also resorting to the help of <a href="https://stackoverflow.com/">Stack Overflow</a>, I decided to write an article(<a href="https://medium.com/@uryadov212/spring-boot-with-grpc-718c71ac44c7"><strong>russian</strong></a>). Here I would like to describe only the process of creating a server and a client, without resorting to theory and explaining what <a href="https://grpc.io/">gRPC</a> is.</p><p>To go directly to the task at hand, you must have minimal knowledge of working with Spring Boot. If you are reading this article, you are probably already familiar with the above technologies.</p><h3>1. Server</h3><p><strong>1.1. Adding dependencies.</strong></p><p>First, let’s create a <a href="https://spring.io/projects/spring-boot">Spring Boot</a> project and add a plugin and one dependency to the <strong><em>build.gradle</em></strong> file.</p><p>Plugin:</p><pre>id &#39;com.google.protobuf&#39; version &#39;0.8.19&#39;</pre><p>Dependency:</p><pre>implementation &#39;net.devh:grpc-<strong>server</strong>-spring-boot-starter:2.13.1.RELEASE&#39;</pre><p>This is what the final file will look like <strong><em>build.gradle</em></strong>:</p><pre>plugins {<br>    id &#39;org.springframework.boot&#39; version &#39;2.7.4&#39;<br>    id &#39;io.spring.dependency-management&#39; version &#39;1.0.14.RELEASE&#39;<br>    id &#39;java&#39;<br>    id &#39;idea&#39;<br>    // protobuf plugin<br>    id &#39;com.google.protobuf&#39; version &#39;0.8.19&#39;<br>}<br><br>group = &#39;com.example&#39;<br>version = &#39;0.0.1-SNAPSHOT&#39;<br>sourceCompatibility = &#39;8&#39;<br><br>repositories {<br>    mavenCentral()<br>}<br><br>dependencies {<br>    implementation &#39;org.springframework.boot:spring-boot-starter&#39;<br><br>    // grpc server<br>    implementation &#39;net.devh:grpc-server-spring-boot-starter:2.13.1.RELEASE&#39;<br>}</pre><p>Let’s create a helper file <strong><em>grpc.gradle</em></strong> for <a href="https://grpc.io/">gRPC</a> configuration. This configuration could be written in the original <strong><em>build.gradle</em></strong> file, but it’s better not to litter it, and to keep everything related to gRPC separately.</p><p>File <strong><em>grpc.gradle</em></strong>:</p><pre>protobuf {<br>    protoc {<br>        artifact = &quot;com.google.protobuf:protoc:3.7.1&quot;<br>    }<br>    plugins {<br>        grpc {<br>            artifact = &quot;io.grpc:protoc-gen-grpc-java:1.19.0&quot;<br>        }<br>    }<br>    generateProtoTasks {<br>        ofSourceSet(&#39;main&#39;).each { task -&gt;<br>            task.builtins {<br>                java {<br>                    outputSubDir = &#39;proto_gen&#39;<br>                }<br>            }<br>            task.plugins {<br>                grpc {<br>                    outputSubDir = &#39;proto_gen&#39;<br>                }<br>            }<br>        }<br>    }<br>    generatedFilesBaseDir = &quot;$projectDir/src/&quot;<br>}<br>task cleanProtoGen {<br>    doFirst {<br>        delete(&quot;$projectDir/src/main/proto_gen&quot;)<br>    }<br>}<br><br>clean.dependsOn cleanProtoGen</pre><p>That’s all about dependencies.</p><p><strong>1.2. Implementation.</strong></p><p>Let’s create a <strong><em>test.proto</em></strong> file along the path <strong><em>src/main/proto/test.proto</em></strong>:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c0ccfc0f4d19fa9b59db606c08595f8f/href">https://medium.com/media/c0ccfc0f4d19fa9b59db606c08595f8f/href</a></iframe><p>The next step is to implement the test method defined in the <strong><em>proto.test </em></strong>file<strong><em>. </em></strong>To do this, let’s create the <strong><em>MyServiceImpl </em></strong>class<strong><em>:</em></strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1c64d449c662be0c5f486aa98853a1f1/href">https://medium.com/media/1c64d449c662be0c5f486aa98853a1f1/href</a></iframe><p>This completes the creation of the server, but another configuration that can be skipped is changing the server port. The server port is 9090 by default, you can set it in the <strong><em>application.properties</em></strong>:</p><pre>grpc.port=9090</pre><p><strong>1.3. Testing.</strong></p><p>To check the performance of our server, you can use <a href="https://www.postman.com/">Postman</a>.</p><p>Let’s create a new <strong><em>gRPC Request</em></strong> type:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*guDxHkpGdsru2Hxt.png" /></figure><p>Import the <strong><em>test.proto</em></strong> file from the project Choose a <strong><em>File =&gt; Next</em></strong>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*sWPTrQd2s5Nyr94q.png" /></figure><p>Let’s write the address of our server <strong><em>localhost:9090</em></strong> and from the drop-down list select the remote method (procedure) <strong><em>test</em></strong>. In the <strong><em>message</em></strong> tab, let’s pass our request:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*B1r2gNKqRp7NVnJz.png" /></figure><p>In the <strong><em>Response</em></strong> tab, we get a response from our server.</p><h3>2. Client</h3><p><strong>2.1.Adding dependencies.</strong></p><p>The process of adding dependencies to the client is identical to the server but differs in only one dependency. Let’s create another <a href="https://spring.io/projects/spring-boot">Spring Boot</a> project and add a plugin and one dependency to the <strong><em>build.gradle</em></strong> file.</p><p>Plugin:</p><pre>id &#39;com.google.protobuf&#39; version &#39;0.8.19&#39;</pre><p>Dependency:</p><pre>implementation &#39;net.devh:grpc-<strong>client</strong>-spring-boot-starter:2.13.1.RELEASE&#39;</pre><p>This is how the final <strong><em>build.gradle</em></strong> file will look like:</p><pre>plugins {<br>    id &#39;org.springframework.boot&#39; version &#39;2.7.4&#39;<br>    id &#39;io.spring.dependency-management&#39; version &#39;1.0.14.RELEASE&#39;<br>    id &#39;java&#39;<br>    id &#39;idea&#39;<br>    // protobuf plugin<br>    id &#39;com.google.protobuf&#39; version &#39;0.8.19&#39;<br>}<br><br>group = &#39;com.example&#39;<br>version = &#39;0.0.1-SNAPSHOT&#39;<br>sourceCompatibility = &#39;8&#39;<br>repositories {<br>    mavenCentral()<br>}<br>dependencies {<br>    implementation &#39;org.springframework.boot:spring-boot-starter&#39;<br>    // grpc client<br>    implementation &#39;net.devh:grpc-client-spring-boot-starter:2.13.1.RELEASE&#39;<br>}</pre><p>Let’s create a helper file <strong><em>grpc.gradle</em></strong> for the <a href="https://grpc.io/">gRPC</a> configuration.</p><p>File <strong><em>grpc.gradle</em></strong>:</p><pre>protobuf {<br>    protoc {<br>        artifact = &quot;com.google.protobuf:protoc:3.7.1&quot;<br>    }<br>    plugins {<br>        grpc {<br>            artifact = &quot;io.grpc:protoc-gen-grpc-java:1.19.0&quot;<br>        }<br>    }<br>    generateProtoTasks {<br>        ofSourceSet(&#39;main&#39;).each { task -&gt;<br>            task.builtins {<br>                java {<br>                    outputSubDir = &#39;proto_gen&#39;<br>                }<br>            }<br>            task.plugins {<br>                grpc {<br>                    outputSubDir = &#39;proto_gen&#39;<br>                }<br>            }<br>        }<br>    }<br>    generatedFilesBaseDir = &quot;$projectDir/src/&quot;<br>}<br>task cleanProtoGen {<br>    doFirst {<br>        delete(&quot;$projectDir/src/main/proto_gen&quot;)<br>    }<br>}<br><br>clean.dependsOn cleanProtoGen</pre><p>That’s all about dependencies.</p><p><strong>2.2. Implementation.</strong></p><p>Let’s create a <strong><em>test.proto</em></strong> file along the path <strong><em>src/main/proto/test.proto</em></strong>:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/20317332fbb8694d2a0d09d4e3f96f7f/href">https://medium.com/media/20317332fbb8694d2a0d09d4e3f96f7f/href</a></iframe><p>The next step is to create a class that uses the <strong><em>test</em></strong> method of our <strong><em>GrpcTestService</em></strong> service:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a84207cb9989d96f29407663ec4bca1e/href">https://medium.com/media/a84207cb9989d96f29407663ec4bca1e/href</a></iframe><p>The last step is to add our server address to the <strong>application.yaml</strong> file:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/cb24a3cbe10af4dd8508f71a24f4549e/href">https://medium.com/media/cb24a3cbe10af4dd8508f71a24f4549e/href</a></iframe><h3>3. Testing</h3><p>To test the client’s interaction with the server, let’s add a call to the <strong><em>printResponse</em></strong> method after the client starts. For this purpose, we will use the <strong><em>ApplicationRunner</em></strong>:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2bb5b3f1a3d3281828f23e8016735454/href">https://medium.com/media/2bb5b3f1a3d3281828f23e8016735454/href</a></iframe><p>Let’s run both applications and in the client logs we can observe the result of the <strong><em>printResponse</em></strong> method execution:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*mgEFWBwzNFvhEI4j.png" /></figure><h3>Conclusion</h3><p>In this article, I tried to briefly describe the process of creating a server and client with a minimum amount of code and configuration. I hope the article was useful and you can use it in your projects.<br>Repository links:</p><p>Server: <a href="https://github.com/UryadovAlex/grpc-server.git">https://github.com/UryadovAlex/grpc-server.git</a></p><p>Client: <a href="https://github.com/UryadovAlex/grpc-client.git">https://github.com/UryadovAlex/grpc-client.git</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a3ae4d49d25d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Spring Boot with gRPC[RU]]]></title>
            <link>https://medium.com/@uryadov212/spring-boot-with-grpc-718c71ac44c7?source=rss-95d7d5af6e4e------2</link>
            <guid isPermaLink="false">https://medium.com/p/718c71ac44c7</guid>
            <category><![CDATA[spring-boot]]></category>
            <category><![CDATA[grpc]]></category>
            <category><![CDATA[java]]></category>
            <dc:creator><![CDATA[Alexander Uryadov]]></dc:creator>
            <pubDate>Sun, 04 Dec 2022 19:11:43 GMT</pubDate>
            <atom:updated>2022-12-05T09:18:42.773Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b54bYuwn-SsraMWp2slxig.jpeg" /></figure><p>После долгих поисков изящной и лаконичной реализации <a href="https://grpc.io/">gRPC</a> c <a href="https://spring.io/projects/spring-boot">Spring Boot</a> и <a href="https://gradle.org/">Gradle</a>, прочтения документации, а также прибегая к помощи <a href="https://stackoverflow.com/">Stack Overflow</a> (куда же без него) я все таки решился написать статью(<a href="https://medium.com/@uryadov212/spring-boot-with-grpc-en-a3ae4d49d25d"><strong>english</strong></a>). Здесь я хотел бы описать только процесс создания сервера и клиента, не прибегая к теории и не объясняя что такое <a href="https://grpc.io/">gRPC</a>.</p><p>Чтобы перейти непосредственно к выполнению поставленной задачи вы должны иметь минимальные навыки работы со <a href="https://spring.io/projects/spring-boot">Spring Boot</a>. Если читаете эту статью, вероятно, вы уже знакомы с вышеупомянутыми технологиями.</p><h3>1. Сервер</h3><p><strong>1.1. Добавление зависимостей.</strong></p><p>Для начала создадим <a href="https://spring.io/projects/spring-boot">Spring Boot</a> проект и добавим в файл <strong><em>build.gradle</em></strong> плагин и одну зависимость.</p><p>Плагин:</p><pre>id &#39;com.google.protobuf&#39; version &#39;0.8.19&#39;</pre><p>Зависимость:</p><pre>implementation &#39;net.devh:grpc-<strong>server</strong>-spring-boot-starter:2.13.1.RELEASE&#39;</pre><p>Вот так будет выглядеть конечный файл <strong><em>build.gradle</em></strong>:</p><pre>plugins {<br>    id &#39;org.springframework.boot&#39; version &#39;2.7.4&#39;<br>    id &#39;io.spring.dependency-management&#39; version &#39;1.0.14.RELEASE&#39;<br>    id &#39;java&#39;<br>    id &#39;idea&#39;<br>    // protobuf plugin<br>    id &#39;com.google.protobuf&#39; version &#39;0.8.19&#39;<br>}<br><br>group = &#39;com.example&#39;<br>version = &#39;0.0.1-SNAPSHOT&#39;<br>sourceCompatibility = &#39;8&#39;<br><br>repositories {<br>    mavenCentral()<br>}<br><br>dependencies {<br>    implementation &#39;org.springframework.boot:spring-boot-starter&#39;<br><br>    // grpc server<br>    implementation &#39;net.devh:grpc-server-spring-boot-starter:2.13.1.RELEASE&#39;<br>}</pre><p>Теперь создадим один вспомогательный файл <strong><em>grpc.gradle</em></strong> для конфигурации <a href="https://grpc.io/">gRPC</a>. Эту конфигурацию можно было бы написать в исходном <strong><em>build.gradle</em></strong> файле, но лучше не засорять его, а держать всё относящееся к <a href="https://grpc.io/">gRPC</a> отдельно.</p><p>Файл <strong><em>grpc.gradle</em></strong>:</p><pre>protobuf {<br>    protoc {<br>        artifact = &quot;com.google.protobuf:protoc:3.7.1&quot;<br>    }<br>    plugins {<br>        grpc {<br>            artifact = &quot;io.grpc:protoc-gen-grpc-java:1.19.0&quot;<br>        }<br>    }<br>    generateProtoTasks {<br>        ofSourceSet(&#39;main&#39;).each { task -&gt;<br>            task.builtins {<br>                java {<br>                    outputSubDir = &#39;proto_gen&#39;<br>                }<br>            }<br>            task.plugins {<br>                grpc {<br>                    outputSubDir = &#39;proto_gen&#39;<br>                }<br>            }<br>        }<br>    }<br>    generatedFilesBaseDir = &quot;$projectDir/src/&quot;<br>}<br>task cleanProtoGen {<br>    doFirst {<br>        delete(&quot;$projectDir/src/main/proto_gen&quot;)<br>    }<br>}<br><br>clean.dependsOn cleanProtoGen</pre><p>На этом все, что связано с зависимостями.</p><p><strong>1.2. Реализация.</strong></p><p>Создадим <strong><em>test.proto</em></strong> файл по пути <strong><em>src/main/proto/test.proto</em></strong>:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c0ccfc0f4d19fa9b59db606c08595f8f/href">https://medium.com/media/c0ccfc0f4d19fa9b59db606c08595f8f/href</a></iframe><p>Следующий шаг будет реализация метода <strong><em>test</em></strong> определенного в файле <strong><em>test.proto. </em></strong>Для этого создадим класс <strong><em>MyServiceImpl:</em></strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1c64d449c662be0c5f486aa98853a1f1/href">https://medium.com/media/1c64d449c662be0c5f486aa98853a1f1/href</a></iframe><p>На этом создание сервера закончено, но еще одна конфигурация которую можно пропустить - это изменение порта сервера. По умолчанию порт сервера <strong><em>9090</em></strong>, его можно установить в файле <strong><em>application.properties</em></strong>:</p><pre>grpc.port=9090</pre><p><strong>1.3. Тестирование.</strong></p><p>Чтобы проверить работоспособность нашего сервера можно воспользоваться <a href="https://www.postman.com/">Postman</a>.</p><p>Создадим новый тип запроса <strong><em>gRPC Request:</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/944/1*zlmNBrdjYH2cqzPX66Wxxg.png" /></figure><p>Импортируем <strong><em>test.proto</em></strong> файл из проекта <strong>Choose a File =&gt; Next</strong>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Knzlsz2yFa5DvclVcwk2rw.png" /></figure><p>Пропишем адрес нашего сервера <strong><em>localhost:9090</em></strong> и из выпадающего списка выберем удаленный метод(процедуру) <strong><em>test. </em></strong>Во вкладке <strong><em>message</em></strong> передадим наш запрос:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dux8bi2HYt8LvbzPTDyRyA.png" /></figure><p>Во вкладке <strong><em>Response</em></strong> получим ответ от нашего сервера.</p><h3>2. Клиент</h3><p><strong>2.1. Добавление зависимостей.</strong></p><p>Процес добавления зависимостей в клиент идентичен серверу, но оличается только одной зависимостью. Создадим еще один <a href="https://spring.io/projects/spring-boot">Spring Boot</a> проект и добавим в файл <strong><em>build.gradle</em></strong> плагин и одну зависимость.</p><p>Плагин:</p><pre>id &#39;com.google.protobuf&#39; version &#39;0.8.19&#39;</pre><p>Зависимость:</p><pre>implementation &#39;net.devh:grpc-<strong>client</strong>-spring-boot-starter:2.13.1.RELEASE&#39;</pre><p>Вот так будет выглядеть конечный файл <strong><em>build.gradle</em></strong>:</p><pre>plugins {<br>    id &#39;org.springframework.boot&#39; version &#39;2.7.4&#39;<br>    id &#39;io.spring.dependency-management&#39; version &#39;1.0.14.RELEASE&#39;<br>    id &#39;java&#39;<br>    id &#39;idea&#39;<br>    // protobuf plugin<br>    id &#39;com.google.protobuf&#39; version &#39;0.8.19&#39;<br>}<br><br>group = &#39;com.example&#39;<br>version = &#39;0.0.1-SNAPSHOT&#39;<br>sourceCompatibility = &#39;8&#39;<br><br>repositories {<br>    mavenCentral()<br>}<br><br>dependencies {<br>    implementation &#39;org.springframework.boot:spring-boot-starter&#39;<br><br>    // grpc client<br>    implementation &#39;net.devh:grpc-client-spring-boot-starter:2.13.1.RELEASE&#39;<br>}</pre><p>Теперь создадим один вспомогательный файл <strong><em>grpc.gradle</em></strong> для конфигурации <a href="https://grpc.io/">gRPC</a>.</p><p>Файл <strong><em>grpc.gradle</em></strong>:</p><pre>protobuf {<br>    protoc {<br>        artifact = &quot;com.google.protobuf:protoc:3.7.1&quot;<br>    }<br>    plugins {<br>        grpc {<br>            artifact = &quot;io.grpc:protoc-gen-grpc-java:1.19.0&quot;<br>        }<br>    }<br>    generateProtoTasks {<br>        ofSourceSet(&#39;main&#39;).each { task -&gt;<br>            task.builtins {<br>                java {<br>                    outputSubDir = &#39;proto_gen&#39;<br>                }<br>            }<br>            task.plugins {<br>                grpc {<br>                    outputSubDir = &#39;proto_gen&#39;<br>                }<br>            }<br>        }<br>    }<br>    generatedFilesBaseDir = &quot;$projectDir/src/&quot;<br>}<br>task cleanProtoGen {<br>    doFirst {<br>        delete(&quot;$projectDir/src/main/proto_gen&quot;)<br>    }<br>}<br><br>clean.dependsOn cleanProtoGen</pre><p>На этом все, что связано с зависимостями.</p><p><strong>2.2. Реализация.</strong></p><p>Создадим <strong><em>test.proto</em></strong> файл по пути <strong><em>src/main/proto/test.proto</em></strong>:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/20317332fbb8694d2a0d09d4e3f96f7f/href">https://medium.com/media/20317332fbb8694d2a0d09d4e3f96f7f/href</a></iframe><p>Следующий шаг будет создание класса использующего метод <strong><em>test </em></strong>нашего сервиса<strong><em> GrpcTestService:</em></strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a84207cb9989d96f29407663ec4bca1e/href">https://medium.com/media/a84207cb9989d96f29407663ec4bca1e/href</a></iframe><p>Последний шаг будет добавление адреса нашего сервера в файл <strong><em>application.yaml</em></strong>:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/cb24a3cbe10af4dd8508f71a24f4549e/href">https://medium.com/media/cb24a3cbe10af4dd8508f71a24f4549e/href</a></iframe><h3>3. Тестирование</h3><p>Чтобы проверить работу клиента с сервером, добавим вызов метода <strong><em>printResponse </em></strong>после запуска клиента. Для этой цели будем использовать <strong><em>ApplicationRunner:</em></strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2bb5b3f1a3d3281828f23e8016735454/href">https://medium.com/media/2bb5b3f1a3d3281828f23e8016735454/href</a></iframe><p>Запустим оба приложения и в логах клиента можем наблюдать результат выполнения метода <strong><em>printResponse</em></strong>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/794/1*9pN88iEgscDBcdk_A4F3LA.png" /></figure><h3>Заключение</h3><p>В этой статье я постарался кратко описать процес создание сервера и клиента с миниматьным количеством кода и конфигурации. Надеюсь статья была полезной и вы сможете использовать ее в ваших проектах.</p><p>Ссылки репозиториев:</p><p>Сервер: <a href="https://github.com/UryadovAlex/grpc-server.git">https://github.com/UryadovAlex/grpc-server.git</a></p><p>Клиент: <a href="https://github.com/UryadovAlex/grpc-client.git">https://github.com/UryadovAlex/grpc-client.git</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=718c71ac44c7" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>