gRPC Service Development

gRPC Service Development

Teaches an agent to build gRPC services with Protocol Buffers, covering unary and streaming calls, with Node.js and Python server and client references.

Skill files7 files

references/

scripts/

templates/

SKILL.md96 lines
1
---
2
name: grpc-service-development
3
description: >
4
Build high-performance gRPC services with Protocol Buffers, bidirectional
5
streaming, and microservice communication. Use when building gRPC servers,
6
defining service contracts, or implementing inter-service communication.
7
---
8
9
# gRPC Service Development
10
11
## Table of Contents
12
13
- [Overview](#overview)
14
- [When to Use](#when-to-use)
15
- [Quick Start](#quick-start)
16
- [Reference Guides](#reference-guides)
17
- [Best Practices](#best-practices)
18
19
## Overview
20
21
Develop efficient gRPC services using Protocol Buffers for service definition, with support for unary calls, client streaming, server streaming, and bidirectional streaming patterns.
22
23
## When to Use
24
25
- Building microservices that require high performance
26
- Defining service contracts with Protocol Buffers
27
- Implementing real-time bidirectional communication
28
- Creating internal service-to-service APIs
29
- Optimizing bandwidth-constrained environments
30
- Building polyglot service architectures
31
32
## Quick Start
33
34
Minimal working example:
35
36
```protobuf
37
syntax = "proto3";
38
39
package user.service;
40
41
message User {
42
string id = 1;
43
string email = 2;
44
string first_name = 3;
45
string last_name = 4;
46
string role = 5;
47
int64 created_at = 6;
48
int64 updated_at = 7;
49
}
50
51
message CreateUserRequest {
52
string email = 1;
53
string first_name = 2;
54
string last_name = 3;
55
string role = 4;
56
}
57
58
message UpdateUserRequest {
59
string id = 1;
60
string email = 2;
61
string first_name = 3;
62
// ... (see reference guides for full implementation)
63
```
64
65
## Reference Guides
66
67
Detailed implementations in the `references/` directory:
68
69
| Guide | Contents |
70
|---|---|
71
| [Protocol Buffer Service Definition](references/protocol-buffer-service-definition.md) | Protocol Buffer Service Definition |
72
| [Node.js gRPC Server Implementation](references/nodejs-grpc-server-implementation.md) | Node.js gRPC Server Implementation |
73
| [Python gRPC Server (grpcio)](references/python-grpc-server-grpcio.md) | Python gRPC Server (grpcio) |
74
| [Client Implementation](references/client-implementation.md) | Client Implementation |
75
76
## Best Practices
77
78
### ✅ DO
79
80
- Use clear message and service naming
81
- Implement proper error handling with gRPC status codes
82
- Add metadata for logging and tracing
83
- Version your protobuf definitions
84
- Use streaming for large datasets
85
- Implement timeouts and deadlines
86
- Monitor gRPC metrics
87
88
### ❌ DON'T
89
90
- Use gRPC for browser-based clients (use gRPC-Web)
91
- Expose sensitive data in proto definitions
92
- Create deeply nested messages
93
- Ignore error status codes
94
- Send uncompressed large payloads
95
- Skip security with TLS in production
96

© AJ Geddes · MIT · source · posted by @OpenSourceBuffGuy on promptparty.com

@OpenSourceBuffGuy

I find openly licensed prompts and post them here.

0 followers · 14,621 prompts

More by @OpenSourceBuffGuy

See all
Sea turtle carrying floating film studio island prompt image

Sea turtle carrying floating film studio island

Draws a giant sea turtle carrying a floating island film studio through a starry sky, where fairies polish rough film strips into golden film.

image-prompt, nano-banana, 3d-render, cartoon, fantasy-world, creatures, animals, whimsical, dreamy, cinematic, dramatic-lighting, vibrant-colors, bokeh, miniature, widescreen, night-scene, illustration, concept-art, surreal, storytelling, clay-3d

Desert buggy escapes drones past industrial outpost prompt image

Desert buggy escapes drones past industrial outpost

Builds a 15-second desert chase video where a racer in an armored buggy escapes drones past an industrial outpost, using five reference images with set jobs.

video-prompt, hailuo, action, multi-shot, timed-beats, camera-movement, reference-image, character-consistency, negative-prompt, cinematic, sci-fi, cars, landscape, aerial-view, tracking-shot, photorealistic, sound-effects, structured-output, long-form, widescreen

1 view
Cozy Pixel Art Farm Island Village prompt image

Cozy Pixel Art Farm Island Village

Draws a cozy 16-bit pixel-art farming village across six small islands joined by bridges, with exact counts for buildings, animals and crops.

image-prompt, gpt-image, pixel-art, isometric, game-assets, concept-art, maps, worldbuilding, cozy, vibrant-colors, ocean, landscape, wide-shot, widescreen, game-development, video-games, structured-output, whimsical, summer, high-angle, aerial-view, animals, negative-prompt, cityscape

1 view

Reviews

Loading reviews…

Discussion

Loading comments…