👋 Hi, this is Gergely with a subscriber-only issue of the Pragmatic Engineer Newsletter. In every issue, I cover challenges at Big Tech and startups through the lens of engineering managers and senior engineers. If you’ve been forwarded this email, you can subscribe here. Inside Bluesky’s Engineering CultureA deep dive into how a fully remote, open source-first, tech company is building a challenger social media platform. What can small teams learn from Bluesky about punching above your weight?Programming note: this week, there will be no The Pulse on Thursday. I’m attending Craft Conference in Budapest, Hungary and delivering my annual conference talk the same day. My keynote is titled “What’s Old is New Again.” I’ll share the recording in the newsletter, once it will become available. I hope you enjoy this detailed deepdive on a lean and nimble startup (Bluesky) for the week! Bluesky is a promising decentralized Twitter-alternative. Founded two years ago, the company received $13M in funding from Twitter in 2021. Today, it employs 12 software engineers, with more than 5 million users a year on from its invite-only beta launch. Previously, we looked into the social media platform’s architecture and engineering decisions in Building Bluesky: a distributed social network (real-world engineering challenges). In this article, we learn about the team and the engineering culture, covering:
By the end of this article, you’ll hopefully understand how a dozen engineers build and operate a product with such outsized impact in its millions of users and fast growth. Small but very efficient engineering teams are increasingly popular – especially with the end of 0% interest rates – as “efficient” software engineering teams become the norm, industry-wide. The bottom of this article could be cut off in some email clients. Read the full article uninterrupted, online. 1. Unusual originsBluesky kicked off in 2019 with a now-iconic TWEET from then-Twitter CEO, Jack Dorsey. Potential candidates sent DMs (direct messages) to Jack, of whom around a dozen were invited to join a Matrix chatroom, where he provided a prompt for discussing ideas, which read:
CEO of Bluesky, Jay Graber, was one of this small group, which also included:
The group was made up of heavy hitters in decentralized messaging protocols, and entrepreneurs aiming to advance and evolve the web. In mid-2020, Jay proposed writing an ecosystem review of existing decentralized social networks and technologies. As this review was developed, the chatroom grew to ~60 people. By the end of 2020, Twitter put out a request for proposals in the group. Several people responded, including Jay Graber. Twitter ran an interview process in 2021 to select the Bluesky project’s lead, and Jay was announced as the choice that August: A unique setupUnusually, Bluesky spun up as an independent organization, not as part of Twitter. Mostly, when a company announces funding for a new initiative, it becomes an internal division of the company. But in this case, the opposite happened: Bluesky was external to and independent of Twitter from day one. Jay used her own money to hire Daniel Holmgren and start prototyping while the details were being finalized. Together, they fleshed out a protocol Jay had coauthored with technical advisor whyrusleeping back in 2018 – a core design that persists in Bluesky to this day. The project got the green light on 31 December 2021, when Twitter paid the newly formed entity a substantial sum of $13M to build the AT Protocol, and also the sign off for Bluesky to work fully independently. Actually, there was one condition from Twitter:
It’s common for companies raising funding from investors to pursue a bold vision, but it’s extremely rare for a publicly traded company like Twitter to fund a startup and hand it a pretty much free rein. This was likely due to Jack's personal interest in the project, but also stems from Jay's conviction about what the project needed. In her own words:
Jay told us that she negotiated for six months for independence because she wouldn't accept that being a subsidiary of Twitter would be a viable option. Jay felt that Twitter moved too slowly and felt there was too much risk that Bluesky could be killed as a project if Twitter’s leadership would have changed. And how true this assumption was – given how in November 2022, Elon Musk acquired Twitter and made drastic changes from the start. Business modelMost VC-funded businesses in the US are limited liability companies (LLCs,) and for-profit. Not Bluesky. It’s a Public Benefit C-Corporation (PBC,) meaning its primary mission is the “public good,” not necessarily profit. This difference could give Bluesky a slight advantage over regular for-profit companies: they don’t need to focus solely on generating returns for shareholders like publicly traded companies must, or being commercially viable straight away with a product-market fit. Instead, Bluesky could focus on the mission to “develop and drive large-scale adoption of technologies for open and decentralized public conversation.” But this also comes with risk because it dodges the need to define a business strategy in the short term, even though it’s known that strategy is a big ingredient in long-term success. We asked Bluesky about this risk. After all, why would users trust a service that could run out of cash, due to being focused on its mission, instead of making money? Here’s what the team says:
The existing monetization strategies that traditional social media companies use, like selling user data for ads, would not be as effective for Bluesky. So, they’ll need to find new ways to monetize. An interesting observation by Bluesky’s developer relationships engineer, Emily Liu:
There are examples of companies that became PBCs and enjoyed success, or even went public. Insurance technology startup Lemonada went public in 2020 with this setup. Education startup Coursera is also a PBC, as is the eyewear company, Warby Parker. 2. TeamToday, Bluesky has around 40 full-time staff:
Fun fact: none of the early hires ever worked at Twitter! (The first person hired with past experience at Twitter was brought onboard in 2024.) I find this interesting, as since Bluesky was founded, Twitter has laid off 75% of its workforce – some of whom may have considered joining the new social media startup. Team structureIn the core engineering team, everyone is on Bluesky, and we’re linking their profiles.
You don’t need to work at Bluesky to map the engineering structure. In most company deep dives, we ask current or past employees to get the team structure. But for Bluesky, you can simply inspect the projects within the Bluesky repository, and map Github contributors to their Bluesky handles! All code that Bluesky engineers write is in public, and I’m somewhat surprised just how transparent this all is, in a good way. Unusually high ratio of former foundersClose to 4/5 of the “core” team have been founders before, which is extremely unusual at a startup. Of course, startups attract people who prefer working in small teams, some of whom have also been founders. But what attracted so many to Bluesky? From talking with the team, it comes down to:
Bluesky is building a social network, to scale. If anyone knows how to rapidly scale up, it’s people at Big Tech companies with personal experience of it; think engineers at Google in the early 2000s, those at Facebook in the mid-2000s and early 2010s, those at Netflix in the 2010s, etc. But Bluesky had no such people among its first few engineering hires. Founding engineer Paul Frazee shares:
3. Tech stackTypescript (almost) all the wayThe backend is mostly in Typescript, as is the frontend and mobile apps. This allows software engineers to work across the stack without switching languages. This choice is similar to Linear’s to use Typescript between the back and front ends. Why pick this language? Daniel Holmgren gives several reasons:
Node.jsThe Typescript code on the backend uses the Node.js runtime. One worry the team had was how it would scale, as Node.js app runs in a single thread, without creating a new thread for every request. This means a server running Node.js can handle fewer parallel requests than frameworks that support multi-threading more efficiently. However, the team found it's very easy to scale the service horizontally (adding more machines,) but only by building the application to be stateless. They did this, and Daniel recalls they proved a point:
Go for performanceThe backend started out as Typescript, but over time, Go was introduced. But why bring in another language when Typescript works well enough? Performance, says Daniel:
The team has rewritten services from Typescript to Go when performance improvements warrant it. Services in Go, today:
Data layer: Postgres, ScyllaDB, SQLiteBluesky started out with PostgreSQL as the data store, but as the load grew the team expected the time would come to move off this flexible but potentially less scalable solution, to a less flexible, more scalable one. Migration happened in mid-2023:
We cover more on the data layer migration in Part 1: Scaling the database layer. Backend-to-frontend communicationThe Lexicon schema is used to describe HTTP endpoints and all of the record types in the network. This approach ensures strongly-typed contracts and agreements between backend and client. Such strong contracts are especially important for a decentralized network. Bluesky is also an open microservices network, so being stricter at the protocol level makes sense. Paul Frazee puts it like this:
Build toolingThe team uses GitHub Actions for the CI/CD stack. The project is running in the open, so you can inspect these runs yourself: The builds themselves use common tools and techniques for catching quality issues early: Linting: run static code checks to catch coding issues, and ensure the coding style is consistent across the codebase. Here’s an example of the types of issues Bluesky’s linter has captured: Automated tests: run unit, integration and snapshot tests. Example of a snapshot test: Mobile and web stackOne fascinating thing about Bluesky is that the website, iOS app, and Android mobile app, were all built by a single developer. From summer 2022 until early 2023, it was engineer Paul Frazee who worked on this, alone. Early in 2023, the app had some external contributors, and the second full time hire joined in April. The tech stack that enabled all of this was React Native and Expo: On choosing React Native, Paul Frazee explains:
But React Native is not a “magic bullet” solution, says Paul:
Expo is a platform to develop, review and deploy universal native apps that run on the web, iOS and Android. Bluesky introduced it in March 2023, and while the team was careful in limiting the introduction of new dependencies, the purpose was to manage builds and access Expo’s module ecosystem. React Native for web was a choice that surprised even the development team. Initially, Paul intended to use React Native only for mobile apps, but then they found React Native is pretty manageable for the web. Paul explains:
“One-person” mobile appAs mentioned above, The Bluesky mobile app and website were built by a single developer in around a year, Paul Frazee. Today, six engineers work on the app and website, and roughly the same number on the protocol and backend side. Still, it’s remarkably efficient to build a launch-ready app with a single, experienced engineer. So how did Paul pull it off? He started off by building the protocol, not the app. For the first 6 months, Paul worked with Daniel and Jay, in consultation with Twitter, to figure out how the protocol would work. Bluesky’s idea was that the protocol would be the more important part, and there was an expectation they’d eventually build an app. But this realization didn’t occur until mid-2022. From Paul:
The relationship between the backend team of Daniel and Devin, and Paul on the frontend/app team was like a traditional frontend/backend one. They spec’d out features together and discussed what each needed to do. They then worked on their own areas and coordinated on final outcomes. Building the app helped evolve the protocol, and made the work more fun, Daniel recalls:
4. Company culture...Subscribe to The Pragmatic Engineer to read the rest.Become a paying subscriber of The Pragmatic Engineer to get access to this post and other subscriber-only content. A subscription gets you:
|
Search thousands of free JavaScript snippets that you can quickly copy and paste into your web pages. Get free JavaScript tutorials, references, code, menus, calendars, popup windows, games, and much more.
Inside Bluesky’s Engineering Culture
Subscribe to:
Post Comments (Atom)
The Win Machine
The Road to Hell is Paved with Intervention ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ...
-
code.gs // 1. Enter sheet name where data is to be written below var SHEET_NAME = "Sheet1" ; // 2. Run > setup // // 3....
No comments:
Post a Comment