Full Width [alt+shift+f] Shortcuts [alt+shift+k]
Sign Up [alt+shift+s] Log In [alt+shift+l]
35

Emoji Griddle

from Jaz's Blog [alt+shift+b] in programming

30th Oct 2024

Stay updated

Get a weekly newsletter with the top 5 articles worth reading every week.

More from Jaz's Blog

Reverse Twins
2nd Oct 2025 • 24 votes
Turning Billions of Strings into Integers Every Second Without Collisions

I’ve recently started building a POC of a Redis RESP3 Wire Compatible Key/Value Database built on FoundationDB with @calabro.io and though it’s rather early, it’s already spawned a fun distributed systems problem that I thought would be interesting to share. Previously I’ve written about how I implemented a Graph DB via Roaring Bitmaps, representing relations as a bidirectional pair of sets. To support such use-cases in this new database, we’d like to represent sets of keys such that you can perform boolean operations on them (intersection, union, difference) relatively quickly even for very large sets (with millions of members). Supporting Larger Keys In the original Graph DB, we were representing user DID strings as uint32 UIDs to allow us to store millions of edge lists in very little space (e.g. the set of users who follow bsky.app) while being able to perform boolean operations between lists quickly (using Roaring Bitmaps’ parallel boolean operators). Since we were graphing follows, blocks, and other such User-to-User relationships, there was a practical maximum for the total number of user IDs in the low billions. We’ve continued exploring objects and relationships we’d like to represent as a Graph, and have realized that if we wanted to store e.g. the URIs of all posts a user has liked so we can intersect it with other users’ likes, we’re going to need a bigger keyspace! There are well over 15 Billion records in the AT Proto Ecosystem, each with a unique AT URI! Now our desired keyspace is much larger than can be represented by uint32 values and so we need to expand to uint64. Easy enough, let’s use the uint64 flavor of Roaring Bitmaps and simply intern URIs and User DIDs as uint64s, problem solved, right? Not quite… Interning Many Things at Once The AT Proto Firehose has hit historic peak traffic of over 1,500 evt/sec. We want to design a system that will handle many times more scale than we’ve ever seen in reality. This means designing for 10x or 100x would require us to be able to intern 15k to 150k new URIs per second into uint64 integers. Sounds easy enough, what’s the holdup? Well, in FoundationDB we’re able to use Transactions to do things like atomically increment a sequence safely when many other threads may be trying to do the same thing. This is simple enough to do in Go, we can just toss together a little helper function to acquire a new UID for our string: func (s *server) allocateNewUID(span trace.Span, tx fdb.Transaction) (uint64, error) { var newUID uint64 val, err := tx.Get(fdb.Key("last_uid")).Get() if err != nil { return 0, return fmt.Errorf("failed to get last UID: %w", err) } if len(val) == 0 { newUID = 1 // start from 1 } else { lastUID, err := strconv.ParseUint(string(val), 10, 64) if err != nil { return 0, return fmt.Errorf("failed to parse last UID: %w", err) } newUID = lastUID + 1 } tx.Set(fdb.Key("last_uid"), []byte(strconv.FormatUint(newUID, 10))) return newUID, nil } This function gets called from a fdb.Transaction which gets assigned a Transaction ID, then stages its changes, then tries to commit them. In FoundationDB, if your transaction is reading or modifying data written to by a different Transaction that finishes while you’re in-progress, your Transaction is thrown out and must be retried. For our UID assignment use-case, this is pretty problematic. We want to assign hundreds of thousands of new UIDs per second but if they’re all modifying the same key, concurrent transactions will constantly run into contention on the same data and will be forced to retry over and over again. This problem gets worse the more concurrent transactions you have trying to read from or write to the same key. Even if we stick to sequential access, if it takes ~5-10ms to assign a UID, we can only assign ~100-200 UIDs per second, nowhere near the throughput we need to support. How can we get past this problem and allow us to give strings unique uint64 UIDs in a high throughput and highly concurrent manner? Attempt #1: xxHash My first attempt to solve this problem was to try something that required no coordination and hash the string keys into uint64s using xxHash. xxHash is a non-cryptographic hash algorithm that supports incredibly high throughput (dozens of GB/sec) and can produce 64 bit unsigned integer hashes of strings trivially. Implementing this would look something like: Hash the incoming string key Lookup the uint64 UID to see if we’ve already assigned it to a string Reject the transaction if there’s a collision and give up Store the key in the UID map and the UID in the key map Use the UID for anything else we need While the uint64 keyspace is plenty large for our needs assuming we distribute evenly among the whole space, using a hashing algorithm with no coordination means there’s room for collisions and thus we’d need some additional logic (potentially by bucketing the keys somehow). Consulting the Birthday Problem we can see that a keyspace with 64 bit hashes has a >50% chance of containing a single collision when we have only ~5 billion keys in the set! That’s barely more keys than we can cram into a uint32 and definitely won’t suffice for the number of keys we expect to be storing! So, xxHash, while nice and coordination-free is probably not going to be the solution we need. What else can we do? Attempt #2: Billions of Sequences Incrementing one sequence is clearly not an option because we can only increment a single sequence ~100-200 times per second, but what if we instead had more than one sequence? Roaring Bitmaps managed to make highly efficient bitmap representations by breaking up a uint32 keyspace into a uint16-wide set of uint16-wide keyspaces. Can we do something similar here? Here’s an idea, what if we had just over 4 billion difference sequences and just picked one at random when we needed to assign a UID? Since we’re constructing our UIDs as a uint64, we can split the full UID into a pair of uint32s where the most-significant-bits are used to identify the sequence ID and the least-significant-bits are used to identify the value assigned to the UID within the sequence. So in our implementation, we get ~4.3 Billion sequence IDs that each have ~4.3 Billion incrementing values. As an example, if we were to randomly select Sequence ID 37 and then we increment that sequence to the value 5, we’d assemble the ID as 37<<32 + 5 which looks like 158,913,789,952 + 5 -> 158,913,789,957. Looking at the next Seuqence ID, we’d see 38 which, when left shifted by 32 gives us 163,208,757,248. You can see there’s a gap of ~4.3 billion values between the first UID assigned by each Sequence ID. Assuming we can increment a single sequence ~100 times per second with contention, we’re able to mint 430 Billion new UIDs per second without locking up (assuming the cluster can keep up). Storing ~4.3 billion sequences may be a bit expensive, but thankfully this strategy can scale up and down by picking a larger or smaller prefix size. If we only wanted to store say, ~16k sequences, we can pick a 14 bit prefix instead of a 32 bit prefix and then use a 50 bit sequence number. That spreads the load across 2^14 sequence IDs and significantly reduces storage requirements for Sequences. What does this look like in code? Well, it’s honestly not very complex! const uidSequencePrefix = "uid_sequence/" func (s *server) allocateNewUID(tx fdb.Transaction) (uint64, error) { // sequenceNum is the random uint32 sequence we are using for this allocation var sequenceNum uint32 var sequenceKey string // assignedUID is the uint32 within the sequence we will assign var assignedUID uint32 // Try up to 5 times to find a sequence that is not exhausted for range 5 { // Pick a random uint32 as the sequence we will be using for this UID sequenceNum = rand.Uint32() sequenceKey = fmt.Sprintf("%s%d", uidSequencePrefix, sequenceNum) val, err := tx.Get(fdb.Key(sequenceKey)).Get() if err != nil { return 0, fmt.Errorf("failed to get last UID: %w", err) } if len(val) == 0 { assignedUID = 1 // Start each sequence at 1 } else { lastUID, err := strconv.ParseUint(string(val), 10, 32) if err != nil { return 0, fmt.Errorf("failed to parse last UID: %w", err) } // If we have exhausted this sequence, pick a new random sequence if lastUID >= 0xFFFFFFFF { continue } assignedUID = uint32(lastUID) + 1 } } // If we failed to find a sequence after 5 tries, return an error if assignedUID == 0 { return 0, fmt.Errorf("failed to allocate new UID after 5 attempts") } // Assemble the 64-bit UID from the sequence ID and assigned UID newUID := (uint64(sequenceNum) << 32) | uint64(assignedUID) // Store the assigned UID back to the sequence key for the next allocation tx.Set(fdb.Key(sequenceKey), []byte(strconv.FormatUint(uint64(assignedUID), 10))) // Return the full 64-bit UID return newUID, nil } And there we go! We can now intern billions of strings per second with little to no contention in a distributed system while completely avoiding collisions and making full use of our keyspace! Conclusion Often times when designing distributed systems, patterns and strategies you see in seemingly unrelated libraries can inspire an elegant solution to the problem at hand. In the case of distributed, high-throughput string interning, horizontal scaling can be achieved by breaking up one large keyspace that requires strict coordination into billions of smaller keyspaces that can be randomly load-balanced across. Both patterns used in this technique are present elsewhere: Breaking up a large keyspace into a bunch of smaller keyspaces is present in Roaring Bitmaps (among other systems) Letting randomness and large numbers spread out resource contention is present in many load balancing systems This is one of my favorite parts of growing as an engineer: the more systems and strategies you familiarize yourself with, the more material you have to draw from when designing something new. Personal News A bit of personal news for y’all if you made it this far. Today is my last day as a member of the Bluesky team! The past 2+ years building out Bluesky’s Infrastructure and Platform team and scaling Bluesky from 100,000 -> 40,000,000 users have been the most intense and rewarding years of my life. I don’t have the words to express how much I’ve valued my time on the team and how much I care for the people I’ve worked with in what feels like a decade of real time. I’ve got some new adventures ahead and am excited to be embarking on a new journey within the next month (still building large-scale infrastructure, don’t worry). I plan to continue being involved in the AT Proto Community and to contribute to some cool projects other folks on the Bluesky team are working on from the FOSS space (like KVDB). To the team, I wish you all the best and will dearly miss getting to work with you all every day, but nothing lasts forever and I will always cherish the time I got to spend building an incredible platform with incredible people. If you’re interested in joining a world-class team doing important work, check out Bluesky’s open job listings here. There should be a new role opening up for a seasoned Go Engineer on the Platform team soon!

26th Sep 2025 • 1 votes
When Imperfect Systems are Good, Actually: Bluesky's Lossy Timelines

Often when designing systems, we aim for perfection in things like consistency of data, availability, latency, and more. The hardest part of system design is that it’s difficult (if not impossible) to design systems that have perfect consistency, perfect availability, incredibly low latency, and incredibly high throughput, all at the same time. Instead, when we approach system design, it’s best to treat each of these properties as points on different axes that we balance to find the “right fit” for the application we’re supporting. I recently made some major tradeoffs in the design of Bluesky’s Following Feed/Timeline to improve the performance of writes at the cost of consistency in a way that doesn’t negatively affect users but reduced P99s by over 96%. Timeline Fanout When you make a post on Bluesky, your post is indexed by our systems and persisted to a database where we can fetch it to hydrate and serve in API responses. Additionally, a reference to your post is “fanned out” to your followers so they can see it in their Timelines. This process involves looking up all of your followers, then inserting a new row into each of their Timeline tables in reverse chronological order with a reference to your post. When a user loads their Timeline, we fetch a page of post references and then hydrate the posts/actors concurrently to quickly build an API response and let them see the latest content from people they follow. The Timelines table is sharded by user. This means each user gets their own Timeline partition, randomly distributed among shards of our horizontally scalable database (ScyllaDB), replicated across multiple shards for high availability. Timelines are regularly trimmed when written to, keeping them near a target length and dropping older post references to conserve space. Hot Shards in Your Area Bluesky currently has around 32 Million Users and our Timelines database is broken into hundreds of shards. To support millions of partitions on such a small number of shards, each user’s Timeline partition is colocated with tens of thousands of other users’ Timelines. Under normal circumstances with all users behaving well, this doesn’t present a problem as the work of an individual Timeline is small enough that a shard can handle the work of tens of thousands of them without being heavily taxed. Unfortunately, with a large number of users, some of them will do abnormal things like… well… following hundreds of thousands of other users. Generally, this can be dealt with via policy and moderation to prevent abusive users from causing outsized load on systems, but these processes take time and can be imperfect. When a user follows hundreds of thousands of others, their Timeline becomes hyperactive with writes and trimming occurring at massively elevated rates. This load slows down the individual operations to the user’s Timeline, which is fine for the bad behaving user, but causes problems to the tens of thousands of other users sharing a shard with them. We typically call this situation a “Hot Shard”: where some resident of a shard has “hot” data that is being written to or read from at much higher rates than others. Since the data on the shard is only replicated a few times, we can’t effectively leverage the horizontal scale of our database to process all this additional work. Instead, the “Hot Shard” ends up spending so much time doing work for a single partition that operations to the colocated partitions slow down as well. Stacking Latencies Returning to our Fanout process, let’s consider the case of Fanout for a user followed by 2,000,000 other users. Under normal circumstances, writing to a single Timeline takes an average of ~600 microseconds. If we sequentially write to the Timelines of our user’s followers, we’ll be sitting around for 20 minutes at best to Fanout this post. If instead we concurrently Fanout to 1,000 Timelines at once, we can complete this Fanout job in ~1.2 seconds. That sounds great, except it oversimplifies an important property of systems: tail latencies. The average latency of a write is ~600 microseconds, but some writes take much less time and some take much more. In fact, the P99 latency of writes to the Timelines cluster can be as high as 15 milliseconds! What does this mean for our Fanout? Well, if we concurrently write to 1,000 Timelines at once, statistically we’ll see 10 writes as slow as or slower than 15 milliseconds. In the case of timelines, each “page” of followers is 10,000 users large and each “page” must be fanned out before we fetch the next page. This means that our slowest writes will hold up the fetching and Fanout of the next page. How does this affect our expected Fanout time? Each “page” will have ~100 writes as slow as or slower than the P99 latency. If we get unlucky, they could all stack up on a single routine and end up slowing down a single page of Fanout to 1.5 seconds. In the worst case, for our 2,000,000 Follower celebrity, their post Fanout could end up taking as long as 5 minutes! That’s not even considering P99.9 and P99.99 latencies which could end up being >1 second, which could leave us waiting tens of minutes for our Fanout job. Now imagine how bad this would be for a user with 20,000,000+ Followers! So, how do we fix the problem? By embracing imperfection, of course! Lossy Timelines Imagine a user who follows hundreds of thousands of others. Their Timeline is being written to hundreds of times a second, moving so fast it would be humanly impossible to keep up with the entirety of their Timeline even if it was their full-time job. For a given user, there’s a threshold beyond which it is unreasonable for them to be able to keep up with their Timeline. Beyond this point, they likely consume content through various other feeds and do not primarily use their Following Feed. Additionally, beyond this point, it is reasonable for us to not necessarily have a perfect chronology of everything posted by the many thousands of users they follow, but provide enough content that the Timeline always has something new. Note in this case I’m using the term “reasonable” to loosely convey that as a social media service, there must be a limit to the amount of work we are expected to do for a single user. What if we introduce a mechanism to reduce the correctness of a Timeline such that there is a limit to the amount of work a single Timeline can place on a DB shard. We can assert a reasonable limit for the number of follows a user should have to have a healthy and active Timeline, then increase the “lossiness” of their Timeline the further past that limit they go. A loss_factor can be defined as min(reasonable_limit/num_follows, 1) and can be used to probabilistically drop writes to a Timeline to prevent hot shards. Just before writing a page in Fanout, we can generate a random float between 0 and 1, then compare it to the loss_factor of each user in the page. If the user’s loss_factor is smaller than the generated float, we filter the user out of the page and don’t write to their Timeline. Now, users all have the same number of “follows worth” of Fanout. For example with a reasonable_limit of 2,000, a user who follows 4,000 others will have a loss_factor of 0.5 meaning half the writes to their Timeline will get dropped. For a user following 8,000 others, their loss factor of 0.25 will drop 75% of writes to their Timeline. Thus, each user has a effective ceiling on the amount of Fanout work done for their Timeline. By specifying the limits of reasonable user behavior and embracing imperfection for users who go beyond it, we can continue to provide service that meets the expectations of users without sacrificing scalability of the system. Aside on Caching We write to Timelines at a rate of more than one million times a second during the busy parts of the day. Looking up the number of follows of a given user before fanning out to them would require more than one million additional reads per second to our primary database cluster. This additional load would not be well received by our database and the additional cost wouldn’t be worth the payoff for faster Timeline Fanout. Instead, we implemented an approach that caches high-follow accounts in a Redis sorted set, then each instance of our Fanout service loads an updated version of the set into memory every 30 seconds. This allows us to perform lookups of follow counts for high-follow accounts millions of times per second per Fanount service instance. By caching values which don’t need to be perfect to function correctly in this case, we can once again embrace imperfection in the system to improve performance and scalability without compromising the function of the service. Results We implemented Lossy Timelines a few weeks ago on our production systems and saw a dramatic reduction in hot shards on the Timelines database clusters. In fact, there now appear to be no hot shards in the cluster at all, and the P99 of a page of Fanout work has been reduced by over 90%. Additionally, with the reduction in write P99s, the P99 duration for a full post Fanout has been reduced by over 96%. Jobs that used to take 5-10 minutes for large accounts now take <10 seconds. Knowing where it’s okay to be imperfect lets you trade consistency for other desirable aspects of your systems and scale ever higher. There are plenty of other places for improvement in our Timelines architecture, but this step was a big one towards improving throughput and scalability of Bluesky’s Timelines. If you’re interested in these sorts of problems and would like to help us build the core data services that power Bluesky, check out this job listing. If you’re interested in other open positions at Bluesky, you can find them here.

19th Feb 2025 • 63 votes
Jetstream: Shrinking the AT Proto Firehose by >99%

Bluesky recently saw a massive spike in activity in response to Brazil’s ban of Twitter. As a result, the AT Proto event firehose provided by Bluesky’s Relay at bsky.network has increased in volume by a huge amount. The average event rate during this surge increased by ~1,300%. Before this new surge in activity, the firehose would produce around 24 GB/day of traffic. After the surge, this volume jumped to over 232 GB/day! Keeping up with the full, verified firehose quickly became less practical on cheap cloud infrastructure with metered bandwidth. To help reduce the burden of operating bots, feed generators, labelers, and other non-verifying AT Proto services, I built Jetstream as an alternative, lightweight, filterable JSON firehose for AT Proto. How the Firehose Works The AT Proto firehose is a mechanism used to keep verified, fully synced copies of the repos of all users. Since repos are represented as Merkle Search Trees, each firehose event contains an update to the user’s MST which includes all the changed blocks (nodes in the path from the root to the modified leaf). The root of this path is signed by the repo owner, and a consumer can keep their copy of the repo’s MST up-to-date by applying the diff in the event. For a more in-depth explanation of how Merkle Trees are constructed, check out this explainer. Practically, this means that for every small JSON record added to a repo, we also send along some number of MST blocks (which are content-addressed hashes and thus very information-dense) that are mostly useful for consumers attempting to keep a fully synced, verified copy of the repo. You can think of this as the difference between cloning a git repo v.s. just grabbing the latest version of the files without the .git folder. In this case, the firehose effectively streams the diffs for the repository with commits, signatures, and metadata, which is inherently heavier than a point-in-time checkout of the repo. Because firehose events with repo updates are signed by the repo owner, they allow a consumer to process events from any operator without having to trust the messenger. This is the “Authenticated” part of the Authenticated Transfer (AT) Protocol and is crucial to the correct functioning of the network. That being said, of the hundreds of consumers of Bluesky’s production Relay, >90% of them are building feeds, bots, and other tools that don’t keep full copies of the entire network and don’t verify MST operations at all. For these consumers, all they actually process is the JSON records created, updated, and deleted in each event. If consumers already trust the provider to do validation on their end, they could get by with a much more lightweight data stream. How Jetstream Works Jetstream is a streaming service that consumes an AT Proto com.atproto.sync.subscribeRepos stream and converts it into lightweight, friendly JSON. If you want to try it out yourself, you can connect to my public Jetstream instance and view all posts on Bluesky in realtime: $ websocat "wss://jetstream2.us-east.bsky.network/subscribe?wantedCollections=app.bsky.feed.post" Note: the above instance is operated by Bluesky PBC and is free to use, more instances are listed in the official repo Readme Jetstream converts the CBOR-encoded MST blocks produced by the AT Proto firehose and translates them into JSON objects that are easier to interface with using standard tooling available in programming languages. Since Repo MSTs only contain records in their leaf nodes, this means Jetstream can drop all of the blocks in an event except for those of the leaf nodes, typically leaving only one block per event. In reality, this means that Jetstream’s JSON firehose is nearly 1/10 the size of the full protocol firehose for the same events, but lacks the verifiability and signatures included in the protocol-level firehose. Jetstream events end up looking something like: { "did": "did:plc:eygmaihciaxprqvxpfvl6flk", "time_us": 1725911162329308, "type": "com", "commit": { "rev": "3l3qo2vutsw2b", "type": "c", "collection": "app.bsky.feed.like", "rkey": "3l3qo2vuowo2b", "record": { "$type": "app.bsky.feed.like", "createdAt": "2024-09-09T19:46:02.102Z", "subject": { "cid": "bafyreidc6sydkkbchcyg62v77wbhzvb2mvytlmsychqgwf2xojjtirmzj4", "uri": "at://did:plc:wa7b35aakoll7hugkrjtf3xf/app.bsky.feed.post/3l3pte3p2e325" } }, "cid": "bafyreidwaivazkwu67xztlmuobx35hs2lnfh3kolmgfmucldvhd3sgzcqi" } } Each event lets you know the DID of the repo it applies to, when it was seen by Jetstream (a time-based cursor), and up to one updated repo record as serialized JSON. Check out this 10 second CPU profile of Jetstream serving 200k evt/sec to a local consumer: By dropping the MST and verification overhead by consuming from relay we trust, we’ve reduced the size of a firehose of all events on the network from 232 GB/day to ~41GB/day, but we can do better. Jetstream and zstd I recently read a great engineering blog from Discord about their use of zstd to compress websocket traffic to/from their Gateway service and client applications. Since Jetstream emits marshalled JSON through the websocket for developer-friendliness, I figured it might be a neat idea to see if we could get further bandwidth reduction by employing zstd to compress events we send to consumers. zstd has two basic operating modes, “simple” mode and “streaming” mode. Streaming Compression At first glance, streaming mode seems like it’d be a great fit. We’ve got a websocket connection with a consumer and streaming mode allows the compression to get more efficient over the lifetime of the connection. I went and implemented a streaming compression version of Jetstream where a consumer can request compression when connecting and will get zstd compressed JSON sent as binary messages over the socket instead of plaintext. Unfortunately, this had a massive impact on Jetstream’s server-side CPU utilization. We were effectively compressing every message once per consumer as part of their streaming session. This was not a scalable approach to offering compression on Jetstream. Additionally, Jetstream stores a buffer of the past 24 hours (configurable) of events on disk in PebbleDB to allow consumers to replay events before getting transitioned into live-tailing mode. Jetstream stores serialized JSON in the DB, so playback is just shuffling the bytes into the websocket without having to round-trip the data into a Go struct. When we layer in streaming compression, playback becomes significantly more expensive because we have to compress outgoing events on-the-fly for a consumer that’s catching up. In real numbers, this increased CPU usage of Jetstream by 23% while lowering the throughput of playback from ~200k evt/sec to ~28k evt/sec for a single local consumer. When in streaming mode, we can’t leverage the bytes we compress for one consumer and reuse them for another consumer because zstd’s streaming context window may not be in sync between the two consumers. They haven’t received exactly the same data in the session so the clients on the other end don’t have their state machines in the same state. Since streaming mode’s primary advantage is giving us eventually better efficiency as the encoder learns about the data, what if we just taught the encoder about the data at the start and compress each message statelessly? Dictionary Mode zstd offers a mechanism for initializing an encoder/decoder with pre-optimized settings by providing a dictionary trained on a sample of the data you’ll be encoding/decoding. Using this dictionary, zstd essentially uses it’s smallest encoded representations for the most frequently seen patterns in the sample data. In our case, where we’re compressing serialized JSON with a common event shape and lots of common property names, training a dictionary on a large number of real events should allow us to represent the common elements among messages in the smallest number of bytes. For take two of Jetstream with zstd, let’s to use a single encoder for the whole service that utilizes a custom dictionary trained on 100,000 real events. We can use this encoder to compress every event as we see it, before persisting and emitting it to consumers. Now we end up with two copies of every event, one that’s just serialized JSON, and one that’s statelessly compressed to zstd using our dictionary. Any consumers that want compression can have a copy of the dictionary on their end to initialize a decoder, then when we broadcast the shared compressed event, all consumers can read it without any state or context issues. This requires the consumers and server to have a pre-shared dictionary, which is a major drawback of this implementation but good enough for our purposes. That leaves the problem of event playback for compression-enabled clients. An easy solution here is to just store the compressed events as well! Since we’re only sticking the JSON records into our PebbleDB, the actual size of the 24 hour playback window is <8GB with sstable compression. If we store a copy of the JSON serialized event and a copy of the zstd compressed event, this will, at most, double our storage requirements. Then during playback, if the consumer requests compression, we can just shuffle bytes out of the compressed version of the DB into their socket instead of having to move it through a zstd encoder. Savings Running with a custom dictionary, I was able to get the average Jetstream event down from 482 bytes to just 211 bytes (~0.44 compression ratio). Jetstream allows us to live tail all posts on Bluesky as they’re posted for as little as ~850 MB/day, and we could keep up with all events moving through the firehose during the Brazil Twitter Exodus weekend for 18GB/day (down from 232GB/day). With this scheme, Jetstream is required to compress each event only once before persisting it to disk and emitting it to connected consumers. The CPU impact of these changes is significant in proportion to Jetstream’s incredibly light load but it’s a flat cost we pay once no matter how many consumers we have. (CPU profile from a 30 second pprof sample with 12 consumers live-tailing Jetstream) Additionally, with Jetstream’s shared buffer broadcast architecture, we keep memory allocations incredibly low and the cost per consumer on CPU and RAM is trivial. In the allocation profile below, more than 80% of the allocations are used to consume the full protocol firehose. The total resident memory of Jetstream sits below 16MB, 25% of which is actually consumed by the new zstd dictionary. To bring it all home, here’s a screenshot from the dashboard of my public Jetstream instance serving 12 consumers all with various filters and compression settings, running on a $5/mo OVH VPS. At our new baseline firehose activity, a consumer of the protocol-level firehose would require downloading ~3.16TB/mo to keep up. A Jetstream consumer getting all created, updated, and deleted records without compression enabled would require downloading ~400GB/mo to keep up. A Jetstream consumer that only cares about posts and has zstd compression enabled can get by on as little as ~25.5GB/mo, <99% of the full weight firehose. Feel free to join the conversation about Jetstream and zstd on Bluesky.

24th Sep 2024 • 41 votes

More in programming

My Favourite Black Friday Deals

For many course creators, the Black Friday holiday period is when we offer the biggest discounts of the year, which means it’s a great time to pick up some of the web development courses you’ve had your eye on! This post is a quick round-up of my top 10 picks.

8 hours ago • 1 votes
A Better UTF-8 Automaton

Without wasting your time, here it is: Any edge not shown goes to an error state. If you can start in ACC, follow the edges for each byte in your input and end up back in ACC, your string is valid UTF-8. Some C code implementing the above DFA is as follows. It highlights some of the neat features that our new automaton supports, namely quick branchless transitions as a shift-DFA, trivial parallel evaluation, and instant error recovery. #include <stddef.h> #include <stdint.h> enum { DFA_ACCEPT = 2, DFA_SYNC = 16 }; static const uint32_t DFA[256] = { [0x00 ... 0x7f] = 0xcae2bb8a, [0x80 ... 0x8f] = 0xaef05f22, [0x90 ... 0x9f] = 0xbff05f22, [0xa0 ... 0xbf] = 0xbf905f22, [0xc0 ... 0xc1] = 0xc6318cbb, [0xc2 ... 0xdf] = 0xcb8dc637, [0xe0] = 0xc6565dd9, [0xe1 ... 0xec] = 0xc8c7771d, [0xed] = 0xc63318cc, [0xee ... 0xef] = 0xc8c7771d, [0xf0] = 0xcbbaeeeb, [0xf1 ... 0xf3] = 0xc8c97725, [0xf4] = 0xc6546551, [0xf5 ... 0xff] = 0xc6318cbb, }; uint32_t step(uint32_t s, uint8_t b) { return DFA[b] >> (s & 31); } int is_error(uint32_t s) { return !((0x4459a285 >> (s & 31)) & 1); } int partial(uint32_t s) { return (0x92283845 >> ((s + 12) & 31)) & 3; } size_t utf8_valid_up_to(const uint8_t *buf, size_t len) { uint32_t s = DFA_ACCEPT, t; size_t i = 0; for (; i + 32 <= len; i += 32) { uint32_t s1 = s, s2 = DFA_SYNC; for (int j = 0; j < 18; j++) { s1 = step(s1, buf[i + j]); s2 = step(s2, buf[i + j + 14]); } if (is_error(s1) | is_error(s2)) break; s = s2; } for (; i < len && !is_error(t = step(s, buf[i])); i++) s = t; return i - partial(s); } Note that a proper UTF-8 validation routine should at the very least have hot paths for ASCII, this is just an example. And while the above definitely doesn’t beat simdutf, it runs only ~2.5x slower on my Apple M5 laptop when validating Chinese, which isn’t bad for ~30 lines of scalar code. Compared to Björn Höhrmann’s minimal C UTF-8 validator, the above runs 9 times faster in the same benchmark. State machine Our state machine isn’t minimal, but that’s on purpose. It has three nice properties: Like Per Vognsen’s shift-DFA, this state machine can be encoded so each transition is a byte lookup into an array of magic constants followed by a bit shift. Their original implementation packed the constants as uint64_ts, this one fits them in uint32_ts through the use of a SAT solver and overlapping the constants, reducing the lookup table from 2 → 1 KiB. Because we do not merge states which have consumed a different number of bytes of a partial codepoint, error recovery is trivial. In case of an error we can directly read off from the state machine how many bytes we consumed, go back that much, and insert a replacement character if desired. An extra SYNC state is added to the state machine, which absorbs continuation bytes. This makes it super easy to do parallel validation, allowing the shift-DFA to run almost twice as fast as previous shift-DFA UTF-8 validators due to instruction-level parallelism. The trick is to overlap the end of one chunk of bytes with the start of the next chunk by 4 bytes (since no valid codepoint can be > 4 bytes). The first parallel run will validate the overlap, and the second can synchronize on it. If there was an error in these four bytes the second DFA’s state will be nonsense, but the first will catch the error safely. Shift-DFA I would highly recommend reading Per Vognsen’s original shift-DFA exposition, but in short, if you have a finite automaton with a limited number of states and symbols, you can store a transition table. It seems natural to store per state what transition to take for each symbol: $$(\mathrm{State} \times \mathrm{Symbol}) \to \mathrm{State},$$ but if you have a very small number of states it is actually more efficient to store for each symbol how each state transitions: $$\mathrm{Symbol} \to (\mathrm{State} \to \mathrm{State}).$$ This is for two reasons: The memory lookups can all be done in parallel, off the critical dependency chain, as each lookup only depends on its symbol, not the previous state. All the information needed for a $\mathrm{State} \to \mathrm{State}$ function can be stored in one register (naive encoding is $n \cdot \lceil \log_2 n \rceil$ bits for $n$ states). If you choose your state indices cleverly, doing a state transition can even be a single operation after the lookup, e.g. for at most 32 states: state = table[symbol] >> (state % 32) On most hardware shift counts automatically wrap around, making the mod free, as long as it’s 32 or 64. I’m not clever enough, so a SAT solver was used to pack the shift-DFA transition table into uint32_t magic constants. It is somewhat surprising this fit at all, since we have thirteen states, meaning we need 4 bits to encode a transition target, and ${13 \times 4 = 52}$ bits to store it naively. Worse still, since we want to target uint32_t magic constants, our natural modulo is 32, meaning five bits define a state. Luckily we can overlap the bits of neighboring states, if the start of one matches the end of another. To make it fit I still had to be a bit creative: there isn’t a single error state. Instead, we have 32 possible states, of which 12 are valid and 20 are invalid. The only requirement on the invalid states is that they remain invalid on every transition. Luckily checking if a state is valid can still be done with just one shift into a bit vector. What follows is the Z3 code to find our magic DFA constants, it runs in ~15 minutes on my machine. from z3 import * STATES = 'ACC SYNC 1/2 1/3 2/3 1/4 2/4 3/4 E0 ED F0 F4'.split() CONT = {'SYNC': 'SYNC', '1/2': 'ACC', '1/3': '2/3', '2/3': 'ACC', '1/4': '2/4', '2/4': '3/4', '3/4': 'ACC'} CLASSES = { '00-7f': {'ACC': 'ACC', 'SYNC': 'ACC'}, '80-8f': {**CONT, 'ED': '2/3', 'F4': '2/4'}, '90-9f': {**CONT, 'ED': '2/3', 'F0': '2/4'}, 'a0-bf': {**CONT, 'E0': '2/3', 'F0': '2/4'}, 'c0-c1 f5-ff': {}, 'c2-df': {'ACC': '1/2', 'SYNC': '1/2'}, 'e0': {'ACC': 'E0', 'SYNC': 'E0'}, 'e1-ec ee-ef': {'ACC': '1/3', 'SYNC': '1/3'}, 'ed': {'ACC': 'ED', 'SYNC': 'ED'}, 'f0': {'ACC': 'F0', 'SYNC': 'F0'}, 'f1-f3': {'ACC': '1/4', 'SYNC': '1/4'}, 'f4': {'ACC': 'F4', 'SYNC': 'F4'}, } # The offset of valid state s, and the word of class c. off = {s: BitVec(s, 32) for s in STATES} word = {c: BitVec(c, 32) for c in CLASSES} valid = lambda x: Or([x == o for o in off.values()]) # Each state has a unique offset below 32. solver = Solver() solver.add(*[ULT(o, 32) for o in off.values()]) solver.add(Distinct(*off.values())) for c, trans in CLASSES.items(): step = lambda o: LShR(word[c], o) & 31 # State s should go to its target state or error. for s in STATES: if s in trans: solver.add(step(off[s]) == off[trans[s]]) else: solver.add(Not(valid(step(off[s])))) # Error states only transition to error states. for e in range(32): e = BitVecVal(e, 32) solver.add(Or(valid(e), Not(valid(step(e))))) solver.check() model = solver.model() for s in STATES: print(s, model[off[s]]) for c in CLASSES: print(c, f'{model[word[c]].as_long():08x}') Acknowledgements I’d like to thank Thom Chiovoloni for their discussions and their earlier work on packing the lookup tables using Z3, and Max Hollmann for bringing shift-DFA UTF-8 validation to my attention at RustWeek 2026 and exchanging further thoughts.

20 hours ago • 1 votes
How an accessibility designer adds keyboard shortcuts to a web app

This is another window into the sometimes unglamorous-yet-vital tasks that being an accessibility designer demands. Keyboard shortcuts occupy a strange area for web design. Most websites don’t have them, and that’s totally fine. However, it makes more sense for web apps to utilize them. Web apps utilize keyboard shortcuts for speedier navigation and operation, for people who want or need to spend extended periods of time using the service. It’s the same as non-web apps. That said, there’s a lot of nuance when it comes to adding a keyboard shortcut. It feels a lot like something akin to the Swiss Cheese model, delicately threading a needle through multiple, complicated pieces of fabric. The support table placed later on in this post is the result of research I conducted at work as a result of acknowledging said nuance. The task itself was to figure out how to get better support for Home, End, Page Up, and Page Down behavior for a new feature. A considered experience The “designer” part of “accessibility designer” is ensuring that the keyboard shortcuts you help create feel natural and intuitive to operate for all involved. More importantly, the “accessibility” part is ensuring the widest possible range of people—with unknown devices, circumstances, and preferences—aren’t negatively affected by your choices. Consider people who: Use a keyboard intermittently, Who use it as much as possible by choice, and Use one all of the time by virtue of circumstance. Then know that there are multiple, overlapping layers of keyboard shortcuts present on every device, including ones for: The operating system, Apps installed on the operating system, The browser, Extensions installed on the browser, Assistive technology, and Plugins installed on the assistive technology. Also note that the keyboard shortcuts themselves can be adjusted by someone on all of these levels to suit their own needs, via official and unofficially-supported means. You need to navigate this tangled mess to find a combination of keys that: Are not claimed at all, or more realistically Won’t drastically affect someone’s experience in a negative way if overridden in a limited specific and context. You’ll also need to navigate the tangled mess that is politics. The organizations that produce web apps are made out of people, and people have opinions. This includes notions around: How things should operate, even at the expense of excluding some unknown number of people. Instituting features that have no direct connection to profitability. Remembering that doing accessibility work means advocating for concerns in an industry that has systematically deprioritized it as a practice can help out some in terms of approach to all of this. The world does not revolve around your web app You also need to internalize that your web app is not the center of the universe. It is part of a larger suite of interactions someone is doing on their device to get what they need. The best possible outcome for introducing a keyboard shortcut that overrides someone’s existing expectations is mild annoyance. A range of negative outcomes follows, probably the most notable being reputational damage. The worst—and unfortunately oftentimes quiet—outcome is that you break assistive technology functionality for someone. This is why WCAG Success Criterion 2.1.4: Character Key Shortcuts exists. It’s also why mature web apps like GitHub have this type of preference toggle: To the extent of my knowledge, Firefox is the only browser that lets you natively override a keyboard shortcut override, via some buried, legacy menus. This lends further ammo to my belief that browsers are a failure of imagination—the end result of misaligned business priorities. Some may also point out here that screen readers have passthrough key capability. It is a fallacy to assume everyone has perfect working knowledge of the full capabilities of their software and hardware. For people that do know about passthrough key support, it is annoying, tedious, and sometimes even painful to have to use them for frequently-used commands. To say it more plainly: Advocating for the creation of a keyboard preference support area on your web app will be a painful undertaking. This is due to a contemporary business culture that largely views user experience to be an inconvenient friction that gets in the way of metrics-obsessed rent-seeking. The map is not the territory In reviewing the support table, the lack of OS, browser, or screen reader keyboard shortcuts for an Alt/Command + End keypress might make it seem like a good candidate to use for my task. However, Alt/Command + Home opens the browser start page, moves current page back one history event for every major browser on Windows. People who use a modifier key with End will likely expect the same modifier key applied to Home to operate in a similar fashion. For example, if some combination of modifier keys plus Page Down scrolls down 75% of the height of the page, one would assume that the same combination plus Page Up scrolls upward 75% instead. As my research shows, this is true until it isn’t. Decisions and ramifications After figuring out what keypresses do what comes the responsibility of figuring out if this behavior is something you want to intentionally suppress. To me, opening the browser start page and moving the current page back one history event is a weird, awkward, and surprising behavior. However, given the scope and scale of the audience GitHub serves, it is statistically almost certain at least one person loves the feature and uses it every day. I need to weigh that consideration against the context of the task I am helping out with at work. The new feature involves data entry, so a navigation event introduces the chance of accidental data loss—not ideal! I say responsibility because there’s also an incredible amount of weight when you factor in how assistive technology operates. Suppressing the home page-summoning behavior might be annoying, but there are workarounds. Suppressing keys that people who use screen readers rely on to navigate and take action on things locks them out. For example, don’t use h to open a help dialog. Both NVDA and JAWS use the h key to navigate by heading, and this is the far most popular way that people use screen readers to navigate. Another way to contextualize it: Overwriting h keypresses would be the equivalent of preventing you from scrolling down via mouse, trackpad, or screen swipe. More learnings The table is a beast, but it reveals all sorts of interesting things. A few that stand out to me are: Screen readers don’t have parity in function across different versions, unless they do. Browsers have consistent behavior across different operating systems, until they don’t. All browsers can have the same behavior, save for one—I’m pointing my finger at you, Safari. Two browsers may share the same underlying rendering engine, yet have completely different behaviors. Another map-is-not-the-territory consideration is large areas of seeming cross-operating system support may not work as expected in the actual. Command is frequently used on macOS as a modifier key, so a lack of existing behavior for it and its Windows equivalent may seem tempting. However, Alt, otherwise known the Windows key, opens the Start Menu. Although this would have cross-operating system parity, it would not be a great experience for people who use Windows. Availability bias As people who predominately use macOS or Linux to build web experiences, we oftentimes tend to forget other operating systems exist. This can have even more subtle consequences, in that Mac laptops don’t have Home, End, Page Up, and Page Down keys. This fact can conspire to make people forget that these keys exist and are used, to say nothing of other biases such as non-English keyboard layouts. Source: MediaRange Keyboard USB Qwertz German Black, W128289008 (Black). And speaking of things we assume based on the devices we use, another learning well-worth pointing out is the divergence between VoiceOver and JAWS or NVDA. VoiceOver is exclusive to macOS, while JAWS and NVDA are exclusive to Windows. This is important to note in that JAWS and NVDA are far, far more popular than macOS VoiceOver. Broadly-speaking, VoiceOver has a different interaction paradigm when compared to other popular screen readers. Without proper education about the space, this may lead to false understandings of how things operate in the actual for a lot of people. The support table Skip support table. Results for Home. Results for End. Results for Page Up. Results for Page Down. Keyboard combo Operating system Browser Screen reader Existing behavior? Scope Function Home Shift + Home Windows Chrome None No N/A JAWS No N/A NVDA No N/A Edge None No N/A JAWS No N/A NVDA No N/A Firefox None Yes Browser Selects all text on line of text before last known cursor position JAWS No N/A NVDA No N/A macOS Chrome None No N/A VoiceOver No N/A Edge None No N/A VoiceOver No N/A Firefox None No N/A VoiceOver No N/A Safari None No N/A VoiceOver No N/A Control + Home Windows Chrome None Yes Browser Scrolls to top of page JAWS Yes Browser Scrolls to top of page NVDA Yes Browser Scrolls to top of page Edge None Yes Browser Scrolls to top of page JAWS Yes Browser Scrolls to top of page NVDA Yes Browser Scrolls to top of page Firefox None Yes Browser JAWS Yes Screen Reader Places focus on first focusable element on the page NVDA Yes Screen Reader Places focus on first focusable element on the page macOS Chrome None No N/A VoiceOver No N/A Edge None No N/A VoiceOver No N/A Firefox None Yes Browser Scrolls to top of page VoiceOver Yes Browser Scrolls to top of page Safari None No N/A VoiceOver No N/A Option + Home Windows Chrome None Yes Operating System Minimizes all open windows and apps that don’t currently have focus JAWS Yes Operating System Minimizes all open windows and apps that don’t currently have focus NVDA Yes Operating System Minimizes all open windows and apps that don’t currently have focus Edge None Yes Operating System Minimizes all open windows and apps that don’t currently have focus JAWS Yes Operating System Minimizes all open windows and apps that don’t currently have focus NVDA Yes Operating System Minimizes all open windows and apps that don’t currently have focus Firefox None Yes Operating System Minimizes all open windows and apps that don’t currently have focus JAWS Yes Operating System Minimizes all open windows and apps that don’t currently have focus NVDA Yes Operating System Minimizes all open windows and apps that don’t currently have focus macOS Chrome None No N/A VoiceOver No N/A Edge None No N/A VoiceOver Yes Screen Reader Focuses an arbitrary focusable element before the currently focused item in the DOM, relatively close proximity to the currently focused item Firefox None Yes Browser Opens the browser start page, moves current page back one history event VoiceOver Yes Screen Reader Moves focus to the first focusable element in the DOM, then opens the browser start page and moves current page back one history event Safari None No N/A VoiceOver No N/A Alt / Command + Home Windows Chrome None Yes Browser Opens the browser start page, moves current page back one history event JAWS Yes Browser Opens the browser start page, moves current page back one history event NVDA Yes Browser Opens the browser start page, moves current page back one history event Edge None Yes Browser Opens the browser start page, moves current page back one history event JAWS Yes Browser Opens the browser start page, moves current page back one history event NVDA Yes Browser Opens the browser start page, moves current page back one history event Firefox None Yes Browser Opens the browser start page, moves current page back one history event JAWS Yes Browser Opens the browser start page, moves current page back one history event NVDA Yes Browser Opens the browser start page, moves current page back one history event macOS Chrome None No N/A VoiceOver No N/A Edge None No N/A VoiceOver No N/A Firefox None No N/A VoiceOver No N/A Safari None Yes Browser Opens the browser start page, moves current page back one history event VoiceOver Yes Browser Opens the browser start page, moves current page back one history event End Shift + End Windows Chrome None No N/A JAWS Yes Screen Reader Re-reads content the virtual cursor is placed on NVDA Yes Screen Reader Selects next line Edge None No N/A JAWS Yes Screen Reader Re-reads content the virtual cursor is placed on NVDA Yes Screen Reader Selects next line Firefox None No N/A JAWS Yes Screen Reader Re-reads content the virtual cursor is placed on NVDA Yes Screen Reader Selects next line macOS Chrome None No N/A VoiceOver No N/A Edge None No N/A VoiceOver No N/A Firefox None No N/A VoiceOver No N/A Safari None No N/A VoiceOver No N/A Control + End Windows Chrome None Yes Browser Scrolls to bottom of page JAWS Yes Screen Reader Places virtual cursor on the last node in the DOM NVDA Yes Screen Reader Places virtual cursor on last landmark in the DOM Edge None No N/A JAWS Yes Screen Reader Places virtual cursor on the last node in the DOM NVDA Yes Screen Reader Places virtual cursor on last landmark Firefox None Yes Browser Scrolls to end of page JAWS Yes Screen Reader Places virtual cursor on the last node in the DOM NVDA Yes Screen Reader Re-reads currently focused DOM node macOS Chrome None No N/A VoiceOver No N/A Edge None No N/A VoiceOver Yes Screen Reader Moves focus to the end of the next content section in the DOM Firefox None No N/A VoiceOver Yes Screen Reader Moves focus to the end of the next content section in the DOM Safari None No N/A VoiceOver No N/A Option + End Windows Chrome None No N/A JAWS No N/A NVDA No N/A Edge None No N/A JAWS No N/A NVDA No N/A Firefox None No N/A JAWS No N/A NVDA No N/A macOS Chrome None No N/A VoiceOver No N/A Edge None No N/A VoiceOver Yes Screen Reader Moves focus to the end of the next content section in the DOM Firefox None No N/A VoiceOver Yes Screen Reader Moves focus to the end of the next content section in the DOM Safari None No N/A VoiceOver No N/A Alt / Command + End Windows Chrome None No N/A JAWS No N/A NVDA No N/A Edge None No N/A JAWS No N/A NVDA No N/A Firefox None No N/A JAWS No N/A NVDA No N/A macOS Chrome None No N/A VoiceOver No N/A Edge None No N/A VoiceOver No N/A Firefox None No N/A VoiceOver No N/A Safari None No N/A VoiceOver No N/A Page Up Shift + Page Up Windows Chrome None No N/A JAWS Yes Screen Reader Selects all text in a range above and below the current position of the virtual cursor NVDA Yes Screen Reader Reads the DOM past the current position of the virutal cursor Edge None No N/A JAWS Yes Screen Reader Selects a section of text below the current position of the virtual cursor NVDA Yes Screen Reader Reads the DOM past the current position of the virutal cursor Firefox None Yes Browser Scrolls down one page section and selects all text in range of the scroll distance JAWS Yes Screen Reader Reads a small portion of the DOM past the current position of the virtual cursor NVDA Yes Screen Reader Reads the DOM past the current position of the virutal cursor macOS Chrome None No N/A VoiceOver No N/A Edge None No N/A VoiceOver No N/A Firefox None No N/A VoiceOver No N/A Safari None No N/A VoiceOver No N/A Control + Page Up Windows Chrome None Yes Browser Opens previous browser tab JAWS Yes Browser Opens previous browser tab NVDA Yes Browser Opens previous browser tab Edge None Yes Browser Opens previous browser tab JAWS Yes Browser Opens previous browser tab NVDA Yes Browser Opens previous browser tab Firefox None Yes Browser Opens previous browser tab JAWS Yes Browser Opens previous browser tab NVDA Yes Browser Opens previous browser tab macOS Chrome None Yes Browser Opens previous browser tab VoiceOver Yes Browser Opens previous browser tab Edge None Yes Browser Opens previous browser tab VoiceOver Yes Browser Opens previous browser tab Firefox None Yes Browser Opens previous browser tab VoiceOver Yes Browser Opens previous browser tab Safari None No N/A VoiceOver No N/A Option + Page Up Windows Chrome None No N/A JAWS No N/A NVDA No N/A Edge None No N/A JAWS No N/A NVDA No N/A Firefox None No N/A JAWS No N/A NVDA No N/A macOS Chrome None No N/A VoiceOver No N/A Edge None No N/A VoiceOver No N/A Firefox None No N/A VoiceOver No N/A Safari None No N/A VoiceOver No N/A Alt / Command + Page Up Windows Chrome None No N/A JAWS No N/A NVDA No N/A Edge None No N/A JAWS No N/A NVDA No N/A Firefox None No N/A JAWS No N/A NVDA No N/A macOS Chrome None No N/A VoiceOver No N/A Edge None No N/A VoiceOver No N/A Firefox None No N/A VoiceOver No N/A Safari None No N/A VoiceOver No N/A Page Down Shift + Page Down Windows Chrome None No N/A JAWS Yes Screen Reader Selects all text in range above and below the current position of the virtual cursor NVDA Yes Screen Reader Reads the DOM past the current position of the virutal cursor Edge None No N/A JAWS Yes Screen Reader Selects a section of text below the current position of the virtual cursor NVDA Yes Screen Reader Reads the DOM past the current position of the virtual cursor Firefox None Yes Browser Scrolls down one page section and selects all text in range of the scroll distance JAWS Yes Screen Reader Reads a small portion of the DOM past the current position of the virtual cursor NVDA Yes Screen Reader Reads the DOM past the current position of the virutal cursor macOS Chrome None N/A VoiceOver No N/A Edge None No N/A VoiceOver No N/A Firefox None No N/A VoiceOver No N/A Safari None No N/A VoiceOver No N/A Control + Page Down Windows Chrome None Yes Browser Opens next browser tab JAWS Yes Browser Opens next browser tab NVDA Yes Browser Opens next browser tab Edge None Yes Browser Opens next browser tab JAWS Yes Browser Opens next browser tab NVDA Yes Browser Opens next browser tab Firefox None Yes Browser Opens next browser tab JAWS Yes Browser Opens next browser tab NVDA Yes Browser Opens next browser tab macOS Chrome None Yes Browser Opens next browser tab VoiceOver Yes Browser Opens next browser tab Edge None Yes Browser Opens next browser tab VoiceOver Yes Browser Opens next browser tab Firefox None Yes Browser Opens next browser tab VoiceOver Yes Browser Opens next browser tab Safari None No N/A VoiceOver No N/A Option + Page Down Windows Chrome None No N/A JAWS No N/A NVDA No N/A Edge None No N/A JAWS No N/A NVDA No N/A Firefox None No N/A JAWS No N/A NVDA No N/A macOS Chrome None N/A VoiceOver No N/A Edge None No N/A VoiceOver No N/A Firefox None No N/A VoiceOver No N/A Safari None No N/A VoiceOver No N/A Alt / Command + Page Down Windows Chrome None No N/A JAWS No N/A NVDA No N/A Edge None No N/A JAWS No N/A NVDA No N/A Firefox None No N/A JAWS No N/A NVDA No N/A macOS Chrome None No N/A VoiceOver No N/A Edge None No N/A VoiceOver No N/A Firefox None No N/A VoiceOver No N/A Safari None No N/A VoiceOver No N/A Testing notes Evaluation was conducted the week of January 19th, 2026. Following is what I used to in my research: Keyboards 2021 MacBook Pro. Logitech Slim Solar+ K980. Operating Systems and browsers Windows, version X. Chrome, version 144.0.7559.97. Edge, version 144.0.3719.92. Firefox, version 147.0.1. macOS, version 15.7.3 (fuck you, Liquid Glass). Chrome, version 144.0.7559.97. Edge, version 144.0.3719.92. Firefox, version 147.0.1. Safari, version 26.2 (20623.1.14.18.4). Assistive technology JAWS, version 2026.2512.50. NVDA, version 2025.3.2. VoiceOver, using macOS version 15.7.3. Also note I am not presenting the suggestions I recommended at my job because of how contextual this work is. These observations from a past effort. What wasn’t evaluated: I didn’t evaluate less-popular Chromium browsers. I didn’t evaluate popular browser extensions like Grammarly. I didn’t evaluate support on iOS or Android, but they do support keyboard input and people do use them. I also didn’t evaluate Linux or Orca. There are just too many possible permutations. Seriously. I am only one man with a full-time job and a dog with attachment issues, folks. Using an LLM: Using plaintext copies of screen reader manuals to use as LLM context still created hallucinations. It also doesn’t cover the app or operating system layers. The stakes are too high considering the human-facing impact, and it was likely net-less effort to manually test to get certainty with results. There might be a metaphor worth thinking through in that previous bullet point.

yesterday • 3 votes
A design audit of an AI-built GitHub clone

slug: design-audit-ai-built-github-clone

2 days ago • 1 votes
the incredible lightness of not being

Good evening! Long time no type. I am feeling a lightness, a floating, and wanted to share it with you. In a , I confessed that once, adrift, unmoored from God, I threw away my bible and reached instead for a slim pamphlet, the United Nations Declaration of Human Rights. One needs a anchor betimes. It was a funny instinct but not capital-W Wrong. I joined the university chapter of Amnesty International; I wasn’t much on writing to political prisoners, but much more about opposing Wrong, that which was Not Right. Any port in a storm, I suppose. We would table in the university quad, hold posters at prominent intersections in town, and vigil all night outside the state prison on execution nights. I admired the chapter president, and somehow, eventually, in a way I still don’t understand, I became president.previous missive I didn’t do a great job. I’m not great at motivating people; that requires a combination of organization and follow-through, and though I’m good at steady participation (I’ll show up), I will do anything rather than send an e-mail on time. I think I became president by virtue of participating and then proceeded to do it poorly, leading the organization to a period of gentle decline. The nice thing about trying things at university is that there is a natural term limit; graduation bounds the damage any one person can do. — I don’t know what pulls me to this kind of rights-based organization. Though human rights are a useful rhetorical device, I no longer have the grasping faith that they are axiomatic, beyond reason themselves. But they seem to correlate with what I feel in my bones, that a christian who works for the “least of us” is more my comrade than the atheist that can’t be arsed. — Time passed. I changed countries, once, twice; new ports, new storms. One stays plugged in to home, though, and you can’t really unplug from the US. When Trump was elected in 2016 I knew it was going to get bad for immigrants, and I knew also that I couldn’t do anything about it. Anything there, anyway. But it was Not Right. I decided to reach out to a couple local associations that worked for immigrant rights; after all, I am an immigrant here in France, I have been through the system and I knew how to work it pretty well. I ended up joining the local chapter, riding shotgun in the weekly office-hours sessions that sometimes lasted until eleven at night.Ligue des droits de l’Homme I admired the chapter president and somehow, eventually, in a way I don’t understand, I became president. Dint of participation, I expect. Groups like this are funny: there is no graduation, just incapacity, death, and attrition. Around 2018 or so, some lifers got in a spat, and almost tore the place apart. The chapter I inherited in late 2020 was a husk of what it was. I kept the lights on, and I’m still there at the weekly office hours, three weeks out of four. But happily, like university, statutory term limits mitigate the effect that any one person can have, and I am delighted, elated that as of tonight, I am free again, free from being responsible for sending emails to tell people what they already know, that the monthly meeting is the last Thursday in the month, that we need to figure out who will staff which office hours, free to be nagged by someone else instead of being the one to do the nagging. And so that’s the end of tonight’s short note: I’m free, wheee!!!

3 days ago • 3 votes
📚 BoredReading

You seem to be enjoying this.

Join free to unlock everything.

Create free account

Already have an account? Sign in