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
NIP-78 nostr relay storage
Search
Takuma Shinohara
August 04, 2023
Technology
0
170
NIP-78 nostr relay storage
Takuma Shinohara
August 04, 2023
Tweet
Share
More Decks by Takuma Shinohara
See All by Takuma Shinohara
What's is Bluesky
shinoharata
0
360
dissolute fat
shinoharata
0
100
20240520_toranoana_lab.pdf
shinoharata
0
97
民主的なSNSは日本を救う
shinoharata
0
190
Nostr x Gorilla Vim Collaboration
shinoharata
0
300
press_on_nostr_book
shinoharata
0
240
abc2023_slide_upload.pdf
shinoharata
0
220
LNBits で始める 家電Hack
shinoharata
0
160
Blueskyのいろいろ作ってみた
shinoharata
0
210
Other Decks in Technology
See All in Technology
公共領域から学ぶ クラウド移行についてエンジニアが意識していること
kawakawa2222
0
140
Git 研修 Basic【MIXI 24新卒技術研修】
mixi_engineers
PRO
0
310
[NIKKEI Tech Talk]Bias for Action!! 実践から学ぶための仕組とコミュニティ / Community for Practice and Learning
kanamasa
0
260
20240724_cm_odyssey_hibiyatech
hiashisan
0
110
20240717_イケコパ代表Copilot_in_Teams会社でこう使ってます
ponponmikankan
2
430
ゆめみのアクセシビリティの現在地と今後
ryokatsuse
3
290
20240725 LLMによるDXのビジョンと、今何からやるべきか @Azure OpenAI Service Dev Day
nrryuya
3
1.1k
簡単に始めるSnowflakeの機械学習
nayuts
1
190
コンテナ・K8s研修 - 後半 Kubernetes 基礎&ハンズオン【MIXI 24新卒技術研修】
mixi_engineers
PRO
1
120
ABEMAにおけるLLMを用いたコンテンツベース推薦システム導入と効果検証
cyberagentdevelopers
PRO
1
700
テスト・設計研修【MIXI 24新卒技術研修】
mixi_engineers
PRO
0
170
ACRiルーム最新情報とAMD GPUサーバーのご紹介
anjn
0
150
Featured
See All Featured
Reflections from 52 weeks, 52 projects
jeffersonlam
346
19k
Why You Should Never Use an ORM
jnunemaker
PRO
51
8.9k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
16
1.6k
Typedesign – Prime Four
hannesfritz
37
2.2k
KATA
mclloyd
20
13k
GraphQLとの向き合い方2022年版
quramy
36
13k
Why Our Code Smells
bkeepers
PRO
332
56k
Bash Introduction
62gerente
607
210k
Gamification - CAS2011
davidbonilla
78
4.9k
Scaling GitHub
holman
458
140k
Rails Girls Zürich Keynote
gr2m
93
13k
Designing Experiences People Love
moore
136
23k
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ばり便利