Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Spring gRPC について / About Spring gRPC
Search
mackey0225
January 30, 2025
Programming
1.4k
0
Share
Spring gRPC について / About Spring gRPC
2025-01-30 に開催された 関ジャバ'25 1月度 で LT した資料です。
https://kanjava.connpass.com/event/342465/
mackey0225
January 30, 2025
More Decks by mackey0225
See All by mackey0225
「なんか〇〇ライブラリで脆弱性あるみたいなんだけど。。。」から始める脆弱性対応 / First Steps in Vulnerability Response
mackey0225
2
53
RSAが破られる前に知っておきたい 耐量子計算機暗号(PQC)入門 / Intro to PQC: Preparing for the Post-RSA Era
mackey0225
3
140
今こそ知るべき耐量子計算機暗号(PQC)入門 / PQC: What You Need to Know Now
mackey0225
3
510
JEP 496 と JEP 497 から学ぶ耐量子計算機暗号入門 / Learning Post-Quantum Crypto Basics from JEP 496 & 497
mackey0225
2
970
「社内LT会」を1年続けてみた! / Our Year-Long Journey of Internal Lightning Talks
mackey0225
1
200
プロポーザル駆動学習 / Proposal-Driven Learning
mackey0225
2
3k
コーディングは技術者(エンジニア)の嗜みでして / Learning the System Development Mindset from Rock Lady
mackey0225
2
1.2k
Spring gRPC で始める gRPC 入門 / Introduction to gRPC with Spring gRPC
mackey0225
2
1.5k
JFR in Minecraft
mackey0225
1
90
Other Decks in Programming
See All in Programming
事業会社でのセキュリティ長期インターンについて
masachikaura
1
270
Don't Prompt Harder, Structure Better
kitasuke
0
780
Programming with a DJ Controller — not vibe coding
m_seki
3
170
2026_04_15_量子計算をパズルとして解く
hideakitakechi
0
110
CursorとClaudeCodeとCodexとOpenCodeを実際に比較してみた
terisuke
1
490
🦞OpenClaw works with AWS
licux
1
240
Agentic Elixir
whatyouhide
0
410
煩雑なSkills管理をSoC(関心の分離)により解決する――関心を分離し、プロンプトを部品として育てるためのOSSを作った話 / Solving Complex Skills Management Through SoC (Separation of Concerns)
nrslib
4
1k
AWSコミュニティ活動は顧客のクラウド推進に効くのか / Do AWS community activities help customers adopt the cloud?
seike460
PRO
0
150
JOAI2026 1st solution - heron0519 -
heron0519
0
150
AIエージェントで業務改善してみた
taku271
0
540
AI時代のエンジニアリングの原則 / Engineering Principles in the AI Era
haru860
0
620
Featured
See All Featured
Optimising Largest Contentful Paint
csswizardry
37
3.7k
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
62
53k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
170
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
160
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
500
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
55k
KATA
mclloyd
PRO
35
15k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
260
Product Roadmaps are Hard
iamctodd
PRO
55
12k
Writing Fast Ruby
sferik
630
63k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
340
Testing 201, or: Great Expectations
jmmastey
46
8.1k
Transcript
Spring gRPC について 2025-01-30 関ジャバ'25 1月度 BABY JOB株式会社 浅野 正貴
(@mackey0225)
Spring gRPC について 自己紹介 名前:浅野 正貴 所属:BABY JOB株式会社 最近はインフラや SRE がメイン
X: @mackey0225 明けましておめでとうございます
Spring gRPC について 先に諸注意 • gRPC そのもの説明はしません(というか、できません) • 雰囲気重視です ◦
正確性や実際にどうなんは各自でお願いします ◦ 間違ってたら「おくすり飲めたね」に包んで伝えて ◦ LT(5 分)だと限界がある • 後半でコードが出ますが、字が小さいです ◦ 資料は公開しますので、後でじっくり見てください
それはそうと、
今年から 関ジャバのスタッフに なりました!
今年から 関ジャバのスタッフに なりました! とはいえ、ゴールではなくスタート なにとぞよろしくおねがいしますー
てなわけで、本題!
Spring gRPC について Spring gRPC とは(1) • Spring プロジェクトのひとつ ◦
ただし、Experimental Project • 公開は 2024 年 9 月 • 現在最新は 0.3.0 ◦ GitHub のタグは 0.2.0 ◦ ドキュメントは 0.4.0-SNAPSHOT
Spring gRPC について Spring gRPC とは(1) • Spring プロジェクトのひとつ ◦
ただし、Experimental Project • 公開は 2024 年 9 月 • 現在最新は 0.3.0 ◦ GitHub のタグは 0.2.0 ◦ ドキュメントは 0.4.0-SNAPSHOT https://github.com/spring-projects-experimental
Spring gRPC について • Spring プロジェクトのひとつ ◦ ただし、Experimental Project •
公開は 2024 年 9 月 • 現在最新は 0.3.0 ◦ GitHub のタグは 0.2.0 ◦ ドキュメントは 0.4.0-SNAPSHOT Spring gRPC とは(1) https://github.com/spring-projects-experimental/spring-grpc/activity
Spring gRPC について • Spring プロジェクトのひとつ ◦ ただし、Experimental Project •
公開は 2024 年 9 月 • 現在最新は 0.3.0 ◦ GitHub のタグは 0.2.0 ◦ ドキュメントは 0.4.0-SNAPSHOT Spring gRPC とは(1) https://mvnrepository.com/artifact/org.springframework.grpc/spring-grpc
Spring gRPC について • Spring プロジェクトのひとつ ◦ ただし、Experimental Project •
公開は 2024 年 9 月 • 現在最新は 0.3.0 ◦ GitHub のタグは 0.2.0 ◦ ドキュメントは 0.4.0-SNAPSHOT Spring gRPC とは(1) https://github.com/spring-projects-experimental/spring-grpc/tags
Spring gRPC について • Spring プロジェクトのひとつ ◦ ただし、Experimental Project •
公開は 2024 年 9 月 • 現在最新は 0.3.0 ◦ GitHub のタグは 0.2.0 ◦ ドキュメントは 0.4.0-SNAPSHOT Spring gRPC とは(1) https://docs.spring.io/spring-grpc/reference/
Spring gRPC について Spring gRPC とは(2) 先週、こんな記事が、、、 https://blogs.vmware.com/tanzu/this-month-in-spring-january-2025/
Spring gRPC について Spring gRPC とは(2) 先週、こんな記事が、、、 https://blogs.vmware.com/tanzu/this-month-in-spring-january-2025/
Spring gRPC について Spring gRPC とは(2) 先週、こんな記事が、、、 https://blogs.vmware.com/tanzu/this-month-in-spring-january-2025/ 手順はシンプルで、proto フォルダに
gRPC のサービ ス定義を記述するだけです。
Spring gRPC について Spring gRPC とは(2) 先週、こんな記事が、、、 https://blogs.vmware.com/tanzu/this-month-in-spring-january-2025/ まず start.spring.io
にアクセスし、gRPC を選択して プロジェクトを生成します。 その後、選択したビルドツールでプロジェクトをビル ドすると、自動的にサービスのスタブが生成されま す。
Spring gRPC について Spring gRPC とは(2) 先週、こんな記事が、、、 https://blogs.vmware.com/tanzu/this-month-in-spring-january-2025/ まず start.spring.io
にアクセスし、gRPC を選択して プロジェクトを生成します。 その後、選択したビルドツールでプロジェクトをビル ドすると、自動的にサービスのスタブが生成されま す。
Spring gRPC について Spring gRPC とは(2) 先週、こんな記事が、、、 まず start.spring.io にアクセスし、gRPC
を選択して プロジェクトを生成します。 その後、選択したビルドツールでプロジェクトをビル ドすると、自動的にサービスのスタブが生成されま す。 https://start.spring.io/
Spring gRPC について Spring gRPC とは(2) 先週、こんな記事が、、、 まず start.spring.io にアクセスし、gRPC
を選択して プロジェクトを生成します。 その後、選択したビルドツールでプロジェクトをビル ドすると、自動的にサービスのスタブが生成されま す。 https://start.spring.io/ というわけで、やってみた!
Spring gRPC について お試し Spring gRPC
Spring gRPC について お試し Spring gRPC
Spring gRPC について お試し Spring gRPC プロジェクト作成時点で proto ディレクトリが作成されている。 (併せて、依存関係も追加済み)
Spring gRPC について お試し Spring gRPC コード参考: https://github.com/spring-projects-experimental/spring-grpc/blob/main/samples/grpc-server/src/ main/proto/hello.proto proto
ディレクトリ内に .proto ファイルを追加。
Spring gRPC について お試し Spring gRPC ビルドすると左のコードが作成。 (Gradle だと build
ディレクトリ)
Spring gRPC について お試し Spring gRPC コード参考: https://github.com/spring-projects-experimental/spring-grpc/blob/main/samples/grpc-server/src/ main/java/org/springframework/grpc/sample/GrpcServerService.java 生成されたコードに対して、処理を
定義していく。
Spring gRPC について お試し Spring gRPC いつも通り、Spring Boot を起動。
Spring gRPC について お試し Spring gRPC .proto で定義したエンドポイントを叩くと結果が返る。 (「\u003e」は「>」がエスケープされている)
Spring gRPC について お試し Spring gRPC .proto で定義したエンドポイントを叩くと結果が返る。 (「\u003e」は「>」がエスケープされている) できた!簡単!
Spring gRPC について まとめのようなもの • Spring Boot 上での gRPC 通信を簡単に導入・実現できる
• まだ Experimental なので、仕様は変わるかも ◦ 実戦投入はまだ厳しいかな(不安) • 公式のブログでも以下の内容もあるので期待は高い ◦ GraalVM での実行 ◦ Spring Security との連携 など
Spring gRPC について 参考情報 • Spring gRPC Reference ◦ https://docs.spring.io/spring-grpc/reference/index.html
• GitHub の Project ◦ https://github.com/spring-projects-experimental/spring-grpc • This Month in Spring – January 2025 ◦ https://blogs.vmware.com/tanzu/this-month-in-spring-january-2025/ • 例で使用したサンプルコード ◦ https://github.com/spring-projects-experimental/spring-grpc/tree/m ain/samples/grpc-server
ご静聴いただき ありがとうございました!