-
Notifications
You must be signed in to change notification settings - Fork 79
Docs/grpc #417
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docs/grpc #417
Changes from 9 commits
f6ddddc
550e03d
1cfbdc5
43120be
ddabd98
46ed559
53eb2dd
e29cb25
53b4beb
32f1a3c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export default { | ||
"overview": "Overview", | ||
"grpc-request": "Create Request", | ||
"grpc-proto": "Proto Files", | ||
"grpc-streams": "Streams" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# gRPC Proto Files | ||
|
||
Proto files (`.proto`) are the foundation of gRPC services, defining the contract between clients and servers. Bruno supports adding proto files to enhance your gRPC development experience with better IntelliSense, method discovery, and type safety. | ||
|
||
## Adding Proto Files | ||
|
||
1. Open your gRPC request in Bruno | ||
2. In the gRPC interface, locate the **Using Reflection** section | ||
3. Click on the **Select Proto File** button or toggle the proto file option | ||
4. Click the file browser to select `.proto` files from your local system | ||
|
||
 | ||
|
||
Bruno will validate that the selected files are valid proto files. | ||
You can add multiple proto files if your service uses imports or multiple definitions. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# gRPC Request | ||
|
||
Bruno provides comprehensive support for gRPC requests, enabling you to test and interact with gRPC services directly from the interface. With Bruno's gRPC support, you can: | ||
|
||
- **Add Proto files** for enhanced IntelliSense and method discovery | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @ganesh-bruno can talk about serve reflection which is the alternative for protofiles |
||
- **Call server methods** with full parameter support | ||
- **Test real-time streaming APIs** including unary, server streaming, client streaming, and bidirectional streaming | ||
- **Debug gRPC services** with detailed request/response inspection | ||
|
||
## gRPC Interface | ||
|
||
 | ||
|
||
## Creating a gRPC Request | ||
|
||
### Step 1: Enable gRPC Support | ||
|
||
First, you need to enable gRPC support in Bruno's beta features: | ||
|
||
1. Go to **Settings** > **Beta** | ||
2. Check the **Enable** checkbox for gRPC support | ||
|
||
 | ||
|
||
### Step 2: Create a gRPC Request | ||
|
||
1. Open collection context menu and select **New Request** from dropdown. | ||
2. Select **gRPC** as your request type. | ||
3. Enter the **service endpoint** in the URL field. | ||
|
||
 | ||
|
||
### Step 3: Configure the Request | ||
|
||
1. Choose the **method** you want to call from the dropdown | ||
2. Add any **required inputs** in the message section. | ||
|
||
 | ||
|
||
### Step 4: Send the Request | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @ganesh-bruno can add details on how refresh methods work. |
||
|
||
Click the **Send** button to execute your gRPC request. | ||
|
||
 | ||
|
||
You'll see relevant response in the **Response** section. | ||
|
||
To learn about proto files, navigate to the [Adding Proto file section.](./grpc-proto.mdx) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# gRPC Streams | ||
|
||
gRPC streaming enables real-time, bidirectional communication between clients and servers. Bruno supports all four types of gRPC streaming patterns, allowing you to test and interact with streaming APIs efficiently. | ||
|
||
## Understanding gRPC Streaming | ||
|
||
gRPC streaming allows you to send and receive multiple messages over a single connection, making it ideal for: | ||
- **Real-time applications** (chat, notifications, live updates) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Some of these real world use cases are still not well adopted among web world! for example, it is really cumbersome to integrate gRPC to a client website, Is it best used within server to server communication, file uploads is still debatable Microservices Communication Real-Time Streaming IoT & Edge Computing Service Mesh & API Gateways Machine Learning & Data Systems |
||
- **Large data transfers** (file uploads, bulk operations) | ||
- **Continuous data processing** (sensor data, analytics) | ||
- **Bidirectional communication** (collaborative editing, gaming) | ||
|
||
## Streaming Workflow | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess we need to explain 4 types of methods available in gRPC like unary, client streaming, server streaming, bi directional streaming etc. rather than |
||
|
||
### Step 1: Configure Request | ||
|
||
1. Open your collection and create a new gRPC request | ||
2. Add your gRPC server URL (e.g., `https://grpcb.in/`) | ||
3. Select a streaming method from the dropdown | ||
|
||
 | ||
|
||
### Step 2: Auto-Generate or Add Proto Files | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. auto generation and proto files are independent, we can auto generate from reflection as well as protofiles |
||
|
||
You have two options to add message schema: | ||
|
||
**Option A: Auto-Generate Messages** | ||
- Bruno can auto-generate message templates based on server reflection (Click the **Auto Fill** 🔄 button) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
- This works when your gRPC server has reflection enabled | ||
|
||
**Option B: Add Proto Files** | ||
- Upload your `.proto` files for enhanced IntelliSense | ||
- Provides better type safety and method discovery | ||
|
||
 | ||
|
||
### Step 3: Build Stream Connection | ||
|
||
1. **Start Stream**: Click the send button to establish the bidirectional connection | ||
|
||
 | ||
|
||
### Step 4: Send Multiple Messages | ||
|
||
Once the stream is active: | ||
|
||
1. **Send Message**: Click the send button to transmit your message (next to **Auto Fill** button) | ||
2. **Add More Messages**: Continue sending additional messages as needed | ||
|
||
 | ||
|
||
### Step 5: End Stream and View Timeline | ||
|
||
1. **End Message Stream**: Click the ✓ icon (end stream button) to stop sending messages | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. End Message Stream and Complete Request i guess these terminologies can be a bit confusing |
||
2. **Complete Request**: End the entire streaming session | ||
3. **View Response Timeline**: See the complete conversation timeline with timestamps | ||
|
||
 | ||
|
||
|
||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import {Callout} from "nextra/components"; | ||
|
||
# Overview | ||
|
||
<Callout emoji=""> | ||
gRPC is available in beta mode in [Bruno 2.9.0](https://www.usebruno.com/downloads) and higher versions. | ||
</Callout> | ||
|
||
gRPC (Google Remote Procedure Call) is a modern, high-performance Remote Procedure Call (RPC) framework developed by Google. It's designed for efficient communication when one service needs to interact with another. | ||
|
||
Imagine your Authentication Service needs to tell your Notification Service to send an OTP. In a high-traffic scenario, traditional request-response calls (like REST over HTTP/1.1) can be less efficient and introduce latency. | ||
|
||
gRPC solves this by faster communication, efficient data transfer and streaming capabilities. | ||
|
||
|
||
Feel free to explore our sample [gRPC collection](https://github.com/bruno-collections/gRPC-api-collection) to play around. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ganesh-bruno i guess we have
Browse for proto file
optionThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ganesh-bruno we also support collection level protofiles, we can be setup from
collection settings/grpc
, we should mention the same within docs to