Any reason _not_ to use repo v3 rev as subscribeRepos sequence number? #1607
Replies: 2 comments 8 replies
-
So I'm currently using a microsecond-resolution timestamp counter as my sequence number, in picopds. It works quite nicely and it's convenient to implement, but I can think of a couple of things that might go wrong:
|
Beta Was this translation helpful? Give feedback.
-
Another reason more specific to using the repo |
Beta Was this translation helpful? Give feedback.
-
Hi all! So in repo v3,
rev
is a TID, ie a base32-encoded integer, and it has broadly the same semantics and requirements as thesubscribeRepos
sequence number. I like the separation between the two in the specs, esp since there are other subscription methods, egsubscribeLabels
. As an implementation detail though, can you think of any reason not to reuse a commit'srev
as its sequence number?(As a hint, https://atproto.com/specs/event-stream#sequence-numbers says "For example, they might be timestamps," so I expect the answer is no. 😁)
Beta Was this translation helpful? Give feedback.
All reactions