Skip to content

Commit 989e19c

Browse files
committed
GH comments
1 parent 0090f0c commit 989e19c

File tree

5 files changed

+60
-19
lines changed

5 files changed

+60
-19
lines changed

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -156,17 +156,18 @@ When using kRPC you only need to provide a transport or choose from the official
156156

157157
Besides that, one can even provide their own protocol or integration with one to use with services and `kotlinx.rpc` API with it.
158158
Though possible, it is much more complicated way to use the library and generally not needed.
159-
`kotlinx.rpc` aims to provide most common protocols integrations as well as the in-house one called kRPC.
159+
`kotlinx.rpc` aims to provide support for the most common protocol integrations, as well as the in-house protocol called kRPC.
160160

161161
## gRPC integration
162-
Library provides experimental support for the [gRPC](https://grop.io) protocol.
163-
The artifacts are published separately in our [Space repository](https://public.jetbrains.space/p/krpc/packages/maven/grpc)
162+
The library provides experimental support for the [gRPC](https://grop.io) protocol.
163+
The artifacts are published separately in our [Space repository](https://public.jetbrains.space/p/krpc/packages/maven/grpc).
164164
Current latest version:
165165

166166
![Dynamic XML Badge](https://img.shields.io/badge/dynamic/xml?url=https%3A%2F%2Fmaven.pkg.jetbrains.space%2Fpublic%2Fp%2Fkrpc%2Fgrpc%2Forg%2Fjetbrains%2Fkotlinx%2Fkotlinx-rpc-core%2Fmaven-metadata.xml&query=%2F%2Fmetadata%2Fversioning%2Flatest&label=Latest%20dev%20version&color=forest-green&cacheSeconds=60)
167167

168-
See more on gRPC usage in the [docs](https://kotlin.github.io/kotlinx-rpc/grpc-configuration.html).
169-
See also [sample gRPC project](/samples/grpc-app).
168+
For more information on gRPC usage,
169+
see the [official documentation](https://kotlin.github.io/kotlinx-rpc/grpc-configuration.html).
170+
For a working example, see the [sample gRPC project](/samples/grpc-app).
170171

171172
## Kotlin compatibility
172173
We support all stable Kotlin versions starting from 2.0.0:

docs/pages/kotlinx-rpc/topics/grpc-client.topic

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,9 @@
2323

2424
grpcClient.cancel()
2525
</code-block>
26+
<list>
27+
<li>
28+
<code>usePlaintext()</code> - is a JVM binding to Java gRPC runtime. Other bindings are also present.
29+
</li>
30+
</list>
2631
</topic>

docs/pages/kotlinx-rpc/topics/grpc-configuration.topic

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77

88
<tldr>
99
<p>
10-
Artifacts for gRPC integration are published <a href="">separately</a>
11-
and updated frequently not in sync with main releases.
10+
Artifacts for gRPC integration are published <a href="https://public.jetbrains.space/p/krpc/packages/maven/grpc">separately</a>
11+
and updated frequently, independent of the main releases.
1212
</p>
1313
<p>
1414
<a href="https://maven.pkg.jetbrains.space/public/p/krpc/grpc">
@@ -22,7 +22,6 @@
2222
<a href="https://grpc.io">gRPC</a> integration is available in an experimental state.
2323
The artifacts are published separately in our <a
2424
href="https://public.jetbrains.space/p/krpc/packages/maven/grpc">Space repository</a>.
25-
Current latest version can be seen in the badge on top of the page.
2625
</p>
2726
<chapter title="Dependencies configuration" id="dependencies-configuration">
2827
<p>Below is an example of a project setup.</p>
@@ -103,5 +102,29 @@
103102
}
104103
}
105104
</code-block>
105+
<list>
106+
<li>
107+
Four source sets will be generated:
108+
<list>
109+
<li><code>java</code> - protobuf Java declarations</li>
110+
<li><code>grpc</code> - gRPC Java declarations</li>
111+
<li><code>grpckt</code> - gRPC Kotlin wrappers for Java</li>
112+
<li><code>kotlinx-rpc</code> - pur wrappers for all of the above</li>
113+
</list>
114+
<p>
115+
You won't need to use the first three directly, only the declarations from the <code>kotlinx-rpc</code>
116+
source set are intended to be used.
117+
</p>
118+
Source sets are generated into <code>$BUILD_DIR/generated/source/proto/main</code> directory
119+
unless specified otherwise.
120+
</li>
121+
<li>
122+
<code>option("debugOutput=protobuf-plugin.log")</code> lets you specify the file
123+
for the <code>protoc</code> plugin debug output.
124+
</li>
125+
<li>
126+
<code>option("messageMode=interface")</code> is intended to be like so. Don't change it.
127+
</li>
128+
</list>
106129
</chapter>
107130
</topic>

docs/pages/kotlinx-rpc/topics/grpc-server.topic

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,14 @@
1616
grpcServer.start()
1717
grpcServer.awaitTermination()
1818
</code-block>
19+
<list>
20+
<li>
21+
<code>GrpcServer</code> allows to register multiple services, like regular <code>RpcServer</code>.
22+
However, <code>CoroutineContext</code> parameter is not needed and should not be used.
23+
</li>
24+
<li>
25+
<code>GrpcServer</code> does <b>not</b> bind to Java gRPC <code>Server</code>,
26+
but provides some functions to cover for that.
27+
</li>
28+
</list>
1929
</topic>

docs/pages/kotlinx-rpc/topics/grpc-services.topic

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
title="Services" id="grpc-services">
77

88
<p>
9-
Define a service in the <code>proto</code> folder next to your source sets:
9+
To define a service, create a new <code>.proto</code> file in the <code>proto</code> folder next to your source sets:
1010
</p>
1111
<code-block>
1212
├── build.gradle.kts
@@ -24,7 +24,7 @@
2424
</code-block>
2525

2626
<p>
27-
Inside the file define a service:
27+
Inside the <code>.proto</code> file define your service:
2828
</p>
2929
<code-block lang="protobuf">
3030
syntax = "proto3";
@@ -42,8 +42,8 @@
4242
}
4343
</code-block>
4444
<p>
45-
Some code will be generated. The most important ones are <code>interface ImageRecognizer</code>,
46-
<code>interface Image</code> and <code>interface RecogniseResult</code>:
45+
This will generate the necessary code, including the most important interfaces:
46+
<code>ImageRecognizer</code>, <code>Image</code>, <code>RecogniseResult</code>:
4747
</p>
4848
<code-block lang="Kotlin">
4949
@Grpc
@@ -79,24 +79,26 @@
7979
}
8080
</code-block>
8181
<p>
82-
Here you can also see the usage of <code>interface RecogniseResult</code>.
83-
To create an instance simple use its <code>invoke</code> extension function:
82+
Here you can also see the usage of the <code>RecogniseResult</code> interface.
83+
To create an instance, use its <code>.invoke()</code> extension function:
8484
</p>
8585
<code-block lang="Kotlin">
8686
RecogniseResult {
8787
category = 0
8888
}
8989
</code-block>
9090

91-
<warning>
92-
Current known limitations:
91+
<chapter title="Limitations" id="limitations">
92+
<p>Current known limitations:</p>
9393
<list>
9494
<li>No streaming</li>
9595
<li>Only primitive types in messages</li>
9696
<li>Mandatory java and kotlin protoc generation in addition to our codegen</li>
9797
<li>Kotlin/JVM project only</li>
9898
</list>
99-
If you encounter other unexpected limitations or bugs,
100-
please <a href="https://github.com/Kotlin/kotlinx-rpc/issues/new?template=bug_report.md">report</a> them
101-
</warning>
99+
<p>
100+
If you encounter other unexpected limitations or bugs,
101+
please <a href="https://github.com/Kotlin/kotlinx-rpc/issues/new?template=bug_report.md">report</a> them
102+
</p>
103+
</chapter>
102104
</topic>

0 commit comments

Comments
 (0)