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
Nostr x Gorilla Vim Collaboration
Search
Takuma Shinohara
February 10, 2024
Technology
0
440
Nostr x Gorilla Vim Collaboration
Takuma Shinohara
February 10, 2024
Tweet
Share
More Decks by Takuma Shinohara
See All by Takuma Shinohara
いまのBlueskyってどうなの
shinoharata
0
100
四谷ラボとは ※2025/05/31
shinoharata
0
89
What's is Bluesky
shinoharata
0
1.3k
dissolute fat
shinoharata
0
210
20240520_toranoana_lab.pdf
shinoharata
0
200
民主的なSNSは日本を救う
shinoharata
0
350
press_on_nostr_book
shinoharata
0
280
abc2023_slide_upload.pdf
shinoharata
0
350
LNBits で始める 家電Hack
shinoharata
0
210
Other Decks in Technology
See All in Technology
クマ×共生 HACKATHON - 熊対策を『特別な行動」から「生活の一部」に -
pharaohkj
0
180
少人数でも回る! DevinとPlaybookで支える運用改善
ishikawa_pro
4
1.7k
データエンジニアがクラシルでやりたいことの現在地
gappy50
3
660
alecthomas/kong はいいぞ
fujiwara3
6
1.1k
新規事業におけるAIリサーチの活用例
ranxxx
0
170
M365アカウント侵害時の初動対応
lhazy
7
5.1k
Turn Your Community into a Fundraising Catalyst for Black Philanthropy Month
auctria
PRO
0
190
CSPヘッダー導入で実現するWebサイトの多層防御:今すぐ試せる設定例と運用知見
llamakko
1
260
大規模組織にAIエージェントを迅速に導入するためのセキュリティの勘所 / AI agents for large-scale organizations
i35_267
6
330
メモ整理が苦手な者による頑張らないObsidian活用術
optim
0
150
Microsoft Learn MCP/Fabric データエージェント/Fabric MCP/Copilot Studio-簡単・便利なAIエージェント作ってみた -"Building Simple and Powerful AI Agents with Microsoft Learn MCP, Fabric Data Agent, Fabric MCP, and Copilot Studio"-
reireireijinjin6
1
140
増え続ける脆弱性に立ち向かう: 事前対策と優先度づけによる 持続可能な脆弱性管理 / Confronting the Rise of Vulnerabilities: Sustainable Management Through Proactive Measures and Prioritization
nttcom
1
210
Featured
See All Featured
Into the Great Unknown - MozCon
thekraken
40
1.9k
Why You Should Never Use an ORM
jnunemaker
PRO
58
9.5k
Adopting Sorbet at Scale
ufuk
77
9.5k
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
15
1.6k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
7
760
Art, The Web, and Tiny UX
lynnandtonic
301
21k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
50k
Build The Right Thing And Hit Your Dates
maggiecrowley
37
2.8k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
138
34k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
Transcript
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