Hi Mosh!
Two examples are Nebra (github.com/the-astrosky-ecosystem/nebra) for streaming real-time scientific instrument data over ATProto, and Matadisco (matadisco.org) for pushing dataset records into the network as a universal index layer. (If you are the authors of this or similar projects, please chime in with your use case.)
Another project I have seen is SensorThing (https://sensorthings.dev/#info), which publishes environmental sensor data as records.
I think all these use-cases are interesting, and hope we can find ways to accommodate them to some degree or another.
For example, a seismometer could transmit ~100 samples per second. In a 10-device deployment, this would write ~60,000 records per minute or 31 billion records per year. Batching would reduce that, but the specās guidance is a bit open-ended: Section 2 says implementations āshould apply practical limits on batch sizesā without defining them, and Section 8.4.2 sets hard limits of 200 ops and 2MB per #commit message.
Another relevant metric is what the expected end-to-end latency is, and maybe the variance of that latency. The loose design goal has historically been āsub-secondā, and I think that the deployed network usually meets that goal (though I have not measured/confirmed in some time).
One thing that strikes me about the raw numbers is that they get close to audio waveforms (eg, 44 kHz). Would we expect to be able to stream radio or live audio over atproto? The experience and design patterns that https://stream.place/ has had with streaming video seems relevant. The worlds of network observability and time series metrics also feel relevant.
My guess is that most sensor data does not need to be low-latency. Nebra is an exception, but in that case might not need to be high throughput. Batching many data points in single records (eg, arrays of numbers) helps reduce storage even more than batching multiple record ops into a single commit. Domain-specific binary encoding and compression can have huge impacts on storage efficiency. Data could get rolled up in to larger file (HDF5 or Parquet?) and stored as atproto blobs that get referenced by small records. All these techniques would have trade-offs of course.
A few questions:
- Relay relationship: What is the mechanism for a high-throughput, domain-specific PDS to participate in ATPās network without overwhelming full-network relays? Is there (or should there be) a way for a PDS to signal to relays that it should be crawled selectively?
The short answer is that there is no such mechanism right now.
Even if we didnāt add such a mechanism, it would probably be good to have things degrade or fail gracefully. For example, ways for PDS instances to understand if they have exceeded downstream limits.
- Commit frequency: The spec defines limits on the number of operations per commit (Section 8.4.2), but is there any guidance on commit rate?
There is no such guidance in the text right now.
I think it might be helpful to throw out some operational numbers and limits as context. I am not proposing that limits like these be added to any of the current documents, they are just to ground the discussion.
When talking about the size of individual repositories, the historic design goal was to work well with at least single-digit millions of records, and a few hundred MByte of total size (as a CAR export). I think there are larger repositories in the network today. Sometimes large repositories have caused operational friction, though some of these have been addressed with implementation performance improvements.
The PDS implementation developed by Bluesky includes rate-limits on repository operations by individual accounts. These are intended to constrain resource consumption by untrusted accounts. They work out to roughly 1,600 records created per hour, and separately 12,000 records per 24 hr. These are counted per record operation, not per commit.
The relay reference implementation developed by Bluesky includes message rate-limits per PDS which are computed based on an PDS account limit, which can be configured per PDS. These are not enforced per-account (though it might be an improvement to do it that way), and result in back-pressure (delayed processing) instead of dropping messages. The default limits are 50 msg/sec, 2,600 msg/hour, 21,000 msg/hour. These are per-message, not per-record.
The current full-network firehose runs between 200 msg/sec to 500 msg/sec over the course of a 24 hour diurnal cycle. The current Bluesky relay implementation was designed and tested up to around 20,000 msg/sec as a baseline (with spikes above that). Scaling to higher rates is a good topic for this working group. One option would be sharding over multiple concurrent connections.
These questions may be out of scope for the 11-02 cutoff for IETF 127, but it seems worth raising now whether large, non-social use cases are in scope for this spec or better addressed in a separate profile or future document.
I think these are great questions to be discussing! I think the protocol should try to accommodate as many use-cases as is reasonable. There are probably some pragmatic limitations, and it would be good to give hints at what those are. Iām particularly interested to learn from the IETF community what the best practices are around conveying operational limits which might change or evolve over time.
Part of the current charter is to produce documents ādescribing operational considerations for deployment [ā¦]ā. My interpretation of that would be a Best Current Practices (BCP) document, separate from any standard documents, which could convey things like āreasonable default limits at the time of writingā.
ābryan