https://github.com/dmotz
- 6 points
- I'm the Trystero author and I'd say both libs attempt to accomplish the same goal but with very different APIs. One key difference is PeerJS uses a single centralized server by default for matchmaking, whereas Trystero offers lots of flexibility and redundancy, using various signaling connections in parallel.
- 19 points
- You might be interested in my side project Trystero https://github.com/dmotz/trystero
It abstracts away the work of signaling and connects peers via open decentralized networks like BitTorrent, Nostr, MQTT, IPFS, etc.
- I have a side project that aims to organize your ebook highlight collections with on-device semantic search. [1] Right now it only indexes your own content but I'd like to add a mode that allows you to share your collection and let others find relevant ideas via semantic search -- a discovery platform for ideas found in books. It's open source if you want a sense of how it works now. [2]
- This looks exciting and I'm pleased to see more and more frictionless ways of making p2p apps. I've been building a somewhat similar hobby project [1] that aims to connect peers in the browser by piggybacking on open protocols out on the net (BitTorrent, MQTT, Nostr, IPFS, etc).
This project seems to be using Hyperswarm which I've looked at for use as a peering medium but it seems like it's not supported in the browser. I'd love to implement it if that story changes since it's so easy to distribute apps on the web.
- This is a really nice overview of the nuances of WebRTC.
If you want to try this tech at a higher level, I maintain an experimental hobby project that attempts to abstract all the complicated parts of WebRTC into a simple API. Most importantly, it obviates the need to run your own signaling server by piggybacking on various public protocols like torrent trackers or IPFS to match peers. It's well-suited for quick projects/prototypes.
- 3 points
- 2135 points
- Two personal projects I'd like to get fully-baked eventually:
My attempt to get more out of all my ebook highlights using on-device AI.
https://github.com/dmotz/trystero
My attempt at making it as easy as possible to add p2p to a web app (no server required). A "jQuery for WebRTC" of sorts.
- A decade ago I built a silly JS library for folding up DOM elements like paper [1] and I eagerly anticipated using element() instead of tediously cloning nodes for every fold. Here we are ten years later and this niche CSS feature has yet to be adopted by the other browsers. Similarly, I thought I'd soon be using the CSS custom filter spec from the same era (which allows custom GLSL shaders to be applied to elements), but it also has yet to pick up traction.
- Yes, the demo mode is a random subset of things I've highlighted and it's heavily weighted around certain topics and sparse on others, so that's why some passages don't have the strongest semantic matches.
You're right that it would be nice to see things in situ as you're reading, but it would seem that most e-reading experiences are locked down. I appreciate the feedback!
- I built a tool for myself for the purpose of grokking ideas from books called Emdash [1]. Over the years I've collected reams of highlights from books and articles but until recently, rarely reviewed or absorbed them. The core of this app uses on-device ML to show related passages with similar ideas from other books you've read, and I find that going broad and exploring concepts from different angles really helps in comprehension.
I'm testing out a summarization/rephrase feature backed by LLMs that you can try in the demo. In HN fashion I'm trying to build this openly and gather feedback to see what works. I'd like to push this further in the active direction the article mentions with something like a Socratic dialogue mode where you're nudged to re-explain and examine ideas.
If anyone uses this thing/has feedback, let me know. Source is available too [2].
- And the source of course: https://github.com/dmotz/emdash
- 1 point
- Bit of a shameless plug but I've been thinking about this for a while and I recently built a free/open-source tool called Emdash [1] to tackle the problem. I’m a heavy ebook highlighter, but I found if I didn’t have a compelling way to review those highlights they fell out of my understanding.
My tool uses on-device semantic embedding which allows you to peruse your collection and see related passages from other books which I find really helps in comprehension when you view a related idea in the words of another author. You can also search for semantic concepts directly to see nearby ideas from various authors, which is nice for when you’re in a mood for exploring a particular space via raw concepts.
The demo mode also previews a passage rephrasing feature, which can give you a simplified or metaphorical explanation, which I’ve found really valuable in grokking dense excerpts. This part is powered by LLMs (off-device) but will be opt-in later. I’m trying to gauge interest for it, so there’s a form to sign up for a waitlist if you’d like.
Would love to hear if anyone else uses this tool and what they’d like to see in it. Source code is available too [2].
- WebTorrent is obviously well suited for p2p file distribution, but using a minimal subset of the protocol also provides a nice hack for easily bootstrapping peer connections between web app users. Piggybacking on public mediums already designed to do peer exchange can let you rapidly prototype a WebRTC project without the hassle of running your own server anywhere.
I built a library that explores this idea: https://github.com/dmotz/trystero
And here's how it talks to WebTorrent servers to bootstrap peer connections: https://github.com/dmotz/trystero/blob/main/src/torrent.js
It also allows encrypting your peers' session descriptions to hide them from the torrent server. All of this is of course experimental and I'm very open to feedback.
- I recently wrote a library to abstract away the tedious aspects of WebRTC called Trystero:
Repo: https://github.com/dmotz/trystero
Demo: https://oxism.com/trystero/
The goal is to allow adding P2P/multiplayer to your web app in a few lines and no server setup.
While there are a few good abstraction libraries out there (this one builds on simple-peer), I felt the need the set up a server for matchmaking peers was too much friction for experiments and too centralized in the context of P2P apps. Trystero abstracts away the matchmaking aspect using BitTorrent, IPFS, or Firebase behind the scenes.
- 2 points
- 3 points
- 2 points
- 13 points
- 3 points
- 7 points
- 11 points
- 4 points
Direct link to the underlying source code.