Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/PrimalHQ/primal-caching-service
Primal’s caching service for Nostr connects to the specified set of relays, collects all events in real time, stores them locally, and makes them available to nostr clients through a web socket-based API.
https://github.com/PrimalHQ/primal-caching-service
caching decentralization infrastructure nostr scaling
Last synced: 3 months ago
JSON representation
Primal’s caching service for Nostr connects to the specified set of relays, collects all events in real time, stores them locally, and makes them available to nostr clients through a web socket-based API.
- Host: GitHub
- URL: https://github.com/PrimalHQ/primal-caching-service
- Owner: PrimalHQ
- License: mit
- Created: 2023-05-10T12:56:20.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-05-16T21:26:45.000Z (6 months ago)
- Last Synced: 2024-05-16T22:28:22.100Z (6 months ago)
- Topics: caching, decentralization, infrastructure, nostr, scaling
- Language: Julia
- Homepage: https://primal.net
- Size: 520 KB
- Stars: 81
- Watchers: 6
- Forks: 12
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-nostr - Primal - Caching service for Nostr connects to the specified set of relays, collects all events in real time, stores them locally, and makes them available to nostr clients through a web socket-based API. (Cache services / Client reviews and/or comparisons)
README
### Overview
Primal’s caching service for Nostr connects to the specified set of relays, collects all events in real time, stores them locally, and makes them available to nostr clients through a web socket-based API.
### Usage
Running the caching service if you have nix package manager installed:
nix develop -c sh -c '$start_primal_caching_service'
Running the caching service if you have docker installed:
docker run -it --rm -v `pwd`:`pwd` -w `pwd` -p 8801:8801 -e PRIMALSERVER_HOST=0.0.0.0 nixos/nix nix --extra-experimental-features 'nix-command flakes' develop -c sh -c '$start_primal_caching_service'
Log files for fetched messages and sqlite database files will be located in `var` sub-directory by default.
Monitor fetching (press enter to stop monitoring):
Fetching.mon()
To safely stop the process:
Fetching.stop(); close(cache_storage); exit()
### API requests
Read `app.jl` for list of all supported arguments.
Examples:
["REQ", "amelx49c18", {"cache": ["net_stats"]}]
["CLOSE", "amelx49c18"]["REQ", "p0xren2axa", {"cache": ["feed", {"pubkey": "64-hex digits of pubkey id"}]}]
["REQ", "vqvv4vc6us", {"cache": ["thread_view", {"event_id": "64-hex digits of event id"}]}]
["REQ", "ay4if6pykg", {"cache": ["user_infos", {"pubkeys": ["64-hex digits of pubkey id"]}]}]
["REQ", "2t6z17orjp", {"cache": ["events", {"event_ids": ["64-hex digits of event id"]}]}]
["REQ", "1uddc0a2fv", {"cache": ["user_profile", {"pubkey": "64-hex digits of pubkey id"}]}]