$30 off During Our Annual Pro Sale. View Details »
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
NIP-78 nostr relay storage
Search
Takuma Shinohara
August 04, 2023
Technology
0
290
NIP-78 nostr relay storage
Takuma Shinohara
August 04, 2023
Tweet
Share
More Decks by Takuma Shinohara
See All by Takuma Shinohara
MCPとは?
shinoharata
0
82
BlueskyMeetup in Fukuoka アイデアソン
shinoharata
1
95
BlueskyMeetup in Fukuoka アイデアソン結果発表
shinoharata
1
77
いまのBlueskyってどうなの
shinoharata
0
140
四谷ラボとは ※2025/05/31
shinoharata
0
130
What's is Bluesky
shinoharata
0
1.8k
dissolute fat
shinoharata
0
220
20240520_toranoana_lab.pdf
shinoharata
0
220
民主的なSNSは日本を救う
shinoharata
0
380
Other Decks in Technology
See All in Technology
今年のデータ・ML系アップデートと気になるアプデのご紹介
nayuts
1
410
MLflowダイエット大作戦
lycorptech_jp
PRO
1
140
Sansanが実践する Platform EngineeringとSREの協創
sansantech
PRO
2
880
Gemini でコードレビュー知見を見える化
zozotech
PRO
1
260
AWSセキュリティアップデートとAWSを育てる話
cmusudakeisuke
0
280
【AWS re:Invent 2025速報】AIビルダー向けアップデートをまとめて解説!
minorun365
4
530
OCI Oracle Database Services新機能アップデート(2025/09-2025/11)
oracle4engineer
PRO
1
200
Kiro Autonomous AgentとKiro Powers の紹介 / kiro-autonomous-agent-and-powers
tomoki10
0
510
年間40件以上の登壇を続けて見えた「本当の発信力」/ 20251213 Masaki Okuda
shift_evolve
PRO
1
130
re:Inventで気になったサービスを10分でいけるところまでお話しします
yama3133
1
120
エンジニアリングをやめたくないので問い続ける
estie
2
1.2k
20251209_WAKECareer_生成AIを活用した設計・開発プロセス
syobochim
7
1.6k
Featured
See All Featured
The Cult of Friendly URLs
andyhume
79
6.7k
RailsConf 2023
tenderlove
30
1.3k
Typedesign – Prime Four
hannesfritz
42
2.9k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
34k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Mobile First: as difficult as doing things right
swwweet
225
10k
Rebuilding a faster, lazier Slack
samanthasiow
84
9.3k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
37
2.6k
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
Producing Creativity
orderedlist
PRO
348
40k
How GitHub (no longer) Works
holman
316
140k
Designing for humans not robots
tammielis
254
26k
Transcript
NIP-78 nostr relay storage 2023/08/04 – t.shinohara
NIP-78
アプリケーション固有データ / 任意のアプリ独自データ 出典:Scrapbox (和訳) https://scrapbox.io/nostr/NIP-78
特徴 出典:Scrapbox (和訳) https://scrapbox.io/nostr/NIP-78 NIP-33 (kind: 30023) の拡張 有名な例 :
Nosli contentや、d以外のタグ利用は何でも OK
リレーをストレージと して使用したいという 思惑? 出典:Scrapbox (和訳) https://scrapbox.io/nostr/NIP-78
Key-value storageとして使え たら便利じゃ ん!!!!!!! 出典:Scrapbox (和訳) https://scrapbox.io/nostr/NIP-78
作った!!!
None
タイムラインの流速を 計測したい
なんで?
タイムラインの流速を 計測したい から
計測データどうする?
Firebase cloud firestore
手間!!!
維持管理!!
なら
リレーに保存しよう 唐突に流れる NIP-78
投げるコードは
殆どが 演習の 1-3
神様ありがとう
どうやって保存してい るの?
データ 構造 const ev = { kind: 30078, content: "none",
tags: [ ["d", "table_name"], ["title", "table_title"], ["t", "table_name"], ["202308041938", "20"], ["202308041938", "17"], ... // 続く ], created_at: currUnixtime(), };
一時的に保存したい データを Post します
僕の使い方
Key-value Storage
なにこれ?
名前:データ で 保存したいものが ひも付きます
Key-value Storage データ 識別名 データ 識別名 データ 識別名 データ 識別名
データ 識別名 データ 識別名 データ 識別名 データ 識別名 データ 識別名 データ 識別名 データ 識別名 データ 識別名 データ 識別名 データ 識別名 データ 識別名 データ 識別名 データ 識別名 データ 識別名 データ 識別名 データ 識別名 データ 識別名 データ 識別名 データ 識別名 データ 識別名
よくある使い方
コード例 const value = getKeyValueStorage(key);
Nostr の NIP-78 使用したライブラリあ るかな?
npm で検索
None
None
None
ないやんけ!!!
作ろ!!
仕 様 検 討 • Key-Values Storage としての利用 • Post
は nostr-tools 等に任せる想定 • 欲しい機能 • DB 初期化 • Get All Table • Get Table • Get Item • Create Table • Insert Table • Update Table • Clear Table
作ってみて
Get Table 便利
Upsert Table 便利
今思っていること
・ Update, Insert 時にテーブルがなかった ら? 自動生成して欲しい ・ テーブルの存在検査をしてから、 テーブル定義を作りたい (なかったら初期化コマンド実行したいなど)
早速つかっています。
野洲田川水系 定点観測所 https://nostr-hotter- site.vercel.app/
None
NIP-78ばり便利