Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Nostr x Gorilla Vim Collaboration
Search
Takuma Shinohara
February 10, 2024
Technology
570
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Nostr x Gorilla Vim Collaboration
Takuma Shinohara
February 10, 2024
Transcript
67 slides
Nostr の 耐障害性 と WebSocket を 使い倒す 2024/2/10 Shino3(しのさん)
お題目 • 簡単な自己紹介 • Nostr とは? • 日本国内でのNostr • 耐障害性のお話
• 通信の仕組み • 活用事例の提案 • 実際に作ったもの • これからの展望
自己紹介 通称名: Shino3(しのさん) Twitter: SHINOHARATTT GitHub: ShinoharaTa Nostr: @shino3.net Bluesky:
@shino3.net Domain: shino3.net NostrRelay: relay-jp.shino3.net
自己紹介 • 工業高校出身 • 電気科、電気回路、電子回路メイン • 専門の短大出身 • 電気回路、電子回路 •
メーカー勤務 • 組み込み開発 2年 • システム開発 4年 • 都内、受託開発系 • Webシステム系 5年
自己紹介 • 経験してきた言語 • C言語、C++、C# • PHP、Laravel • JavaScript、TypeScript Vue、Nuxt、Svelte
• 勉強中 • Rust • Flutter(Dart) • インフラ、Grafana等
自己紹介 • 経験してきた言語 • C言語、C++、C# • PHP、Laravel • JavaScript、TypeScript Vue、Nuxt、Svelte
• 勉強中 • Rust • Flutter(Dart) • インフラ、Grafana等 Vim経験:0秒
プライベート • 趣味 • プログラミング • 車の競技(参加者側) • DIY •
好きなもの • キングサーモン • アトランティックサーモン • トラウトサーモン • 信州サーモン • 推し • 檜山沙耶さん • アトランティックサーモン
Nostr とは
Notes and Other Stuff Transmitted by Relays リレーによって通信される ノートやそれ以外のもの
NIP という Nostr Implementation Possibilities プロトコル仕様を 管理する仕組みがある
NIP-01 という仕様で 単一の JSON 構造を 定義する
複数のサーバーと同時接続 冗長化される
複数のサーバーと 複数の管理者が 存在する
接続は WebSocketを 使用する
究極の分散
真の 分散型SNS
日本国内での Nostr
日本国内での Nostr • 2月 : 凍結祭りのときに Damus がリリースされる • 2月
: Nostr 勉強会(日本初)を開催(以降、定期的に開催) • 5月 : 技術書典で Nostr の本を出版した • 7月 : X(Twitter) の API リミットでユーザー数が大幅増加 • 11月 : Nostrasia イベントが開催 Twitter 創設者のジャック・ドーシーが来日 • 11月 : 技術書典で Nostr の本(二冊目)を出版した
SoftwareDesign 誌への連載
技術書典で本を販売 • 物理本:200冊 完売 • 電子版:160冊 販売中 • 物理本:150冊 完売
• 電子版:128冊 販売中
Nostrasia での一幕
Nostrの 耐障害性
Nostrの特徴:冗長性
Nostrの特徴:冗長性 EMERGENCY
Nostrの特徴:冗長性 DOWN DOWN
DOWN DOWN Nostrの特徴:冗長性 つながる!
通信の仕組み
WEB Socket を 使用する
一度接続した コネクションを
無限に 使い倒す
再接続をしないので
爆速!! 鬼速い!!
駅で・・・
街中で・・・
つながる!
{ "id": "シリアライズされたイベントデータのSHA-256(32バイト)を 小文字の16進数で表記したもの", "pubkey": "公開鍵(32バイト)を小文字の16進数で表記したもの", “created_at”: “秒単位の生成時刻", "kind": "イベントの種類",
"tags": [ ["e", "..."], ["...", "他の種類のタグが後に追加される可能性がある"] ], "content":"任意の文字列", "sig": "シリアライズされたイベントデータのSHA-256 (IDフィールドと同じ)に対する署名を16進数で表記したもの" } NIP-01 に基づく JSON 構造
データ種別の定義 • Kind 0 : ユーザーのプロフィールなど • Kind 1 :
みんなの投稿 • Kind 6 : リポスト • Kind 7 : いいねなどのリアクション • Kind 40 : パブリックチャット(チャットルームなど • Kind 42 : パブリックチャットのコメント
Kind 30023 Long-form content
Habla
Nosli
Kind 30078 Application-specific data
野洲田川 定点観測所
流速ちゃん Bot
活用事例の 提案
通信の軽さ
即時性
耐障害性
災害時 情報配信サービス
2024/1/1
能登半島地震
起きていたこと •インターネットが繋がらない • 被災地周辺でのパケ詰まり
実際に 作ったもの
気象 警戒 システム
仕組み 緊急地震速報
WEB クライアント 仕組み 緊急地震速報 Kind 1 投稿 Kind 1 投稿
Kind 1 投稿 Kind 1 投稿
補足 https://www.docswell.com/s/matsuu/KNRMQG-2023-02-23-002146
リアルタイム 緊急地震速報 表示システム
https://github.com/ShinoharaTa - eew2nostr - eew2nostr-viewer
緊急地震速報表示システム WEB クライアント 仕組み 緊急地震速報 Kind 1 投稿 Kind 1
投稿 Kind 1 投稿 Kind 1 投稿 Kind 30078 アプリ利用 データ
今後やりたいこと •Information Dashboard • 災害情報、警戒情報 • 津波、震度情報 • 潮位、河川水位 •
etc
開発の協力者も 募集してます
大量の情報社会
確実に情報を 届けるための 手段
必要なくなる日を 期待します
最後に
#とは
None
More Decks by Takuma Shinohara
See All by Takuma Shinohara
Bluesky Meetup in Tokyo vol.4 - 2023to2026
shinoharata
0
300
MCPとは?
shinoharata
0
210
BlueskyMeetup in Fukuoka アイデアソン
shinoharata
1
170
BlueskyMeetup in Fukuoka アイデアソン結果発表
shinoharata
1
140
いまのBlueskyってどうなの
shinoharata
0
200
四谷ラボとは ※2025/05/31
shinoharata
0
200
What's is Bluesky
shinoharata
0
2.1k
dissolute fat
shinoharata
0
290
20240520_toranoana_lab.pdf
shinoharata
0
270
Other Decks in Technology
See All in Technology
Claude Certified Developer – Professional 試験対策
shinoisa
0
300
New Relicのアラート対応をClaude Codeで自動修正するワークフローを作った話
manabuseki
3
750
メルカリの小規模チーム「Pod」で、 エンジニアがデータアナリストなしで、 AIを使ってデータ分析の自走を目指す取り組み
jackojacko_
1
390
認知負荷の減らし方 ~開発にも日常業務にも活かせるノウハウ~
minorun365
PRO
20
19k
PMの私の 最近のAgent Skills活用法
haru860
0
100
AI-DLCでソフトウェア開発の速さは 上がったのか?
rfdnxbro
0
190
信頼性を犠牲にせず、PR マージからデプロイまで人の介入を完全にゼロにするまでの道のり
knwoop
4
2.2k
PR 生成AIガバナンスの全体像がわかる本
yoshimura_datam
0
130
Welcome JXL!
dynamis
0
1.2k
Kiro Enterprise Management: 管理者が 1 か所で決め、全員の Kiro に届ける
inariku
PRO
1
170
Kiro Crew の Conductor mode: 1 つのチャットに渡したゴールを、コンダクターがワーカーに分けて任せる
inariku
PRO
1
140
テスト自動化の先、テスト自律化に向けて
mineo_matsuya
3
1.1k
Featured
See All Featured
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1.1k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
121
130k
How STYLIGHT went responsive
nonsquared
100
6.4k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
850
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
480
Rails Girls Zürich Keynote
gr2m
96
14k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
56
3.5k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
620
Building Flexible Design Systems
yeseniaperezcruz
330
41k
ラッコキーワード サービス紹介資料
rakko
5
6.1M
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
560
Web Performance Is a Journey [PerfNow 2026]
tammyeverts
3
190