<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Interoperability with gRPC on Apache Dubbo</title><link>https://dubbo.apache.org/en/overview/mannual/golang-sdk/tutorial/interoperability/grpc/</link><description>Recent content in Interoperability with gRPC on Apache Dubbo</description><generator>Hugo</generator><language>en</language><atom:link href="https://dubbo.apache.org/en/overview/mannual/golang-sdk/tutorial/interoperability/grpc/index.xml" rel="self" type="application/rss+xml"/><item><title>Intercommunication with gRPC applications</title><link>https://dubbo.apache.org/en/overview/mannual/golang-sdk/tutorial/interoperability/grpc/call_grpc/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://dubbo.apache.org/en/overview/mannual/golang-sdk/tutorial/interoperability/grpc/call_grpc/</guid><description>&lt;h2 id="1-introduction"&gt;1. Introduction&lt;/h2&gt;
&lt;p&gt;The triple protocol is 100% compatible with gRPC. This example demonstrates using dubbo-go to develop applications that interoperate with gRPC. You can view the &lt;a href="https://github.com/apache/dubbo-go-samples/tree/main/rpc/grpc" target="_blank"&gt;complete example source code&lt;/a&gt; here.&lt;/p&gt;
&lt;h2 id="2-how-to-intercommunicate"&gt;2. How to Intercommunicate&lt;/h2&gt;
&lt;p&gt;The Triple protocol of Dubbo-go is compatible with the gRPC protocol. When creating the server, you can set &lt;code&gt;protocol.WithTriple()&lt;/code&gt; to use the Triple protocol.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-go" data-lang="go"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;	srv, err &lt;span style="color:#719e07"&gt;:=&lt;/span&gt; server.&lt;span style="color:#268bd2"&gt;NewServer&lt;/span&gt;(
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; server.&lt;span style="color:#268bd2"&gt;WithServerProtocol&lt;/span&gt;(
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; protocol.&lt;span style="color:#268bd2"&gt;WithPort&lt;/span&gt;(&lt;span style="color:#2aa198"&gt;20000&lt;/span&gt;),
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; protocol.&lt;span style="color:#268bd2"&gt;WithTriple&lt;/span&gt;(),
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; ),
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; )
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="3-example"&gt;3. Example&lt;/h2&gt;
&lt;h3 id="31-server-introduction"&gt;3.1 Server Introduction&lt;/h3&gt;
&lt;h4 id="server-proto-file"&gt;Server proto File&lt;/h4&gt;
&lt;p&gt;Source file path: dubbo-go-sample/rpc/grpc/proto/greet.proto&lt;/p&gt;</description></item></channel></rss>