1 in a million random chance is a simpler assumption, if there was some sort of coordinated 'working in the canopy overhead' to mess with the mapping of small rural roads and farmers... that would require a very elaborate set of circumstances.
The MouthPad^ connects via standard Bluetooth pairing and is compatible with most common operating systems, functioning like a Bluetooth mouse under standard Bluetooth HID protocols. In the future, we will introduce an SDK to enable direct mappings for more tailored applications.
I evaluated using this in prod, but came to the conclusion that R2 was a bit shaky as a database. CF has since come out with D1 SQL, DO (beware vendor lock-in), queues, and my favorite, MQTT pub-sub, which would be better options. They've also been teasing some vastly improved options for STUN/TURN; I wouldn't be surprised if more turnkey signalling popped up.
I don’t know what the consistency requirements are but workers Kv or r2 + cache might be smarter choices in terms of improving resilience and also performance by a lot (same goes for suggestions of using DO - R2 is kind of a weird choice to manage stateful rendezvous). Queues and pubsub feel like incorrect choices unless I misunderstood what they’re using the storage for.
Author here. KV did not provide the consistency guarantees needed for this to work. If you were signaling across two edge nodes, you didn't see candidates until the data was replicated, which took a long time. R2 doesn't have this problem.
R2 was used because it was the only database-like service CF offered at the time.
IIRC the P2pcf client polls the worker for new peers. Pubsub would let you use an ongoing websockets connection, plus all the channel management logic is built-in. The game-changer is that they've said they'll charge per-message as opposed to per-connection-second, unlike everyone else!
That’s not true though. DO/D2 are database as well (DO precedes R2 and D2 overlapped). KV is an eventually consistent database.
DO/D2 will likely perform better than R2 unless you’re storing everything in the metadata. KV will perform better than all of them although if the storage is to keep a list of peers the API as exists today won’t work well for that - you’ll have to do 1 key per connection and retrieve via a paged list - otherwise you can lose clients since KV has no mechanism to do durable updates of values stored within keys*. You could also do DO with background refresh of cache to maintain good performance while maintaining better bounds on how long a value stays in the cache.
* actually it is possible if you mediate updates to KV through a DO (with storage as the ground truth or without it and risk occasional lost writes if the CF infrastructure decides to kill and reset/relocate your DO).
Fair enough, I didn't investigate them very far, as IMO only pubsub maps to the "webrtc signalling for misers" problem neatly enough to make it worth adopting (probably -- they haven't actually said how much it will cost).
At the time I wrote this library using websockets on Cloudflare would have been prohibitively expensive compared to this polling method. Has that changed?
From my understanding, yes. I asked about the billing model on the CF Discord 6-12? months ago. I don't know how much it costs per message, or if there is a catch wrt cheap wrtc signalling, however my understanding is that you won't be paying per user or per hour etc. To be clear this is through their MQTT 5.0 service only.
Yes, in the last year Durable Objects introduced "hibernation", in which the server object can shut down with WebSocket connections still active, to be started back up when a new message arrives. This largely solves cost issues with WebSockets on Workers / DO.
D1 looks like it could replace R2. Most of the tricky business in p2pcf is dealing with all the ICE details - porting the persistence from R2 to D1 might not be too bad.
The relevant test in this report simulated a single-vehicle impact. The best insurance policy against kangaroos/deer is a modern, safe vehicle with crumple zones (and, y'know, an actual insurance policy that you'll live to collect).
A problem with hitting a deer, especially in a car, is that the bulk of body mass is sitting just above hood level and will therefore impact directly on and then through the windshield at the driver. Crumple zones won't matter.
The issue was that a specific library would be pinned at a specific version for the rest of the history of the web. As good as SQLite is, I hope to hell we're not still stuck using it to handle mining operations in the oort cloud in 200 years.
I have been writing a video game using automerge-repo for networking & save files. I researched Yjs and Automerge and felt that Yjs is better suited to an ongoing session like a conference call, whereas automerge is better suited for network partitions etc. This fit my use-case best.
My opinion might be out-of-date as this area is moving quickly, and there are quite a few options out there now.