You are on page 1of 2

Technology

Implementation
Twitter places great reliance on open-source software.[277] The Twitter Web interface uses the
Ruby on Rails framework,[278] deployed on a performance enhanced Ruby Enterprise Edition
implementation of Ruby.[279]

In the early days of Twitter, tweets were stored in MySQL databases that were temporally sharded
(large databases were split based on time of posting). After the huge volume of tweets coming in
caused problems reading from and writing to these databases, the company decided that the system
needed re-engineering.[51]

From Spring 2007 to 2008, the messages were handled by a Ruby persistent queue server called
Starling.[280] Since 2009, implementation has been gradually replaced with software written in
Scala.[281] The switch from Ruby to Scala and the JVM has given Twitter a performance boost
from 200 to 300 requests per second per host to around 10,000–20,000 requests per second per host.
This boost was greater than the 10x improvement that Twitter's engineers envisioned when starting
the switch. The continued development of Twitter has also involved a switch from monolithic
development of a single app to an architecture where different services are built independently and
joined through remote procedure calls.[51]

As of April 6, 2011, Twitter engineers confirmed that they had switched away from their Ruby on
Rails search stack to a Java server they call Blender.[5]

Individual tweets are registered under unique IDs called snowflakes, and geolocation data is added
using 'Rockdove'. The URL shortener t.co then checks for a spam link and shortens the URL. Next,
the tweets are stored in a MySQL database using Gizzard, and the user receives an
acknowledgement that the tweets were sent. Tweets are then sent to search engines via the Firehose
API. The process is managed by FlockDB and takes an average of 350 ms.[277]

On August 16, 2013, Raffi Krikorian, Twitter's vice president of platform engineering, shared in a
blog post that the company's infrastructure handled almost 143,000 tweets per second during that
week, setting a new record. Krikorian explained that Twitter achieved this record by blending its
homegrown and open source technologies.[51][282]

API and developer platform


Twitter is recognized for having one of the most open and powerful developer APIs of any major
technology company.[283] The service's API allows other web services and applications to integrate
with Twitter.[284] Developer interest in Twitter began immediately following its launch, prompting
the company to release the first version of its public API in September 2006.[285] The API quickly
became iconic as a reference implementation for public REST APIs and is widely cited in
programming tutorials.[286]

From 2006 until 2010, Twitter's developer platform experienced strong growth and a highly
favorable reputation. Developers built upon the public API to create the first Twitter mobile phone
clients as well as the first URL shortener. Between 2010 and 2012, however, Twitter made a number
of decisions that were received unfavorably by the developer community.[287] In 2010, Twitter
mandated that all developers adopt OAuth authentication with just 9 weeks of notice.[288] Later
that year, Twitter launched its own URL shortener, in direct competition with some of its most well-
known third-party developers.[289] And in 2012, Twitter introduced stricter usage limits for its API,
"completely crippling" some developers.[290][291] While these moves successfully increased the
stability and security of the service, they were broadly perceived as hostile to developers, causing
them to lose trust in the platform.[292]
In July 2020, Twitter released version 2.0 of the public API[293] and began showcasing Twitter
apps made by third-party developers on its Twitter Toolbox section in April 2022.[294]

Innovators patent agreement


On April 17, 2012, Twitter announced it would implement an "Innovators Patent Agreement" which
would obligate Twitter to only use its patents for defensive purposes[clarify].[295]

Open source
Twitter has a history of both using and releasing open-source software while overcoming technical
challenges of their service.[296] A page in their developer documentation thanks dozens of open-
source projects which they have used, from revision control software like Git to programming
languages such as Ruby and Scala.[297] Software released as open source by the company includes
the Gizzard Scala framework for creating distributed datastores, the distributed graph database
FlockDB, the Finagle library for building asynchronous RPC servers and clients, the TwUI user
interface framework for iOS, and the Bower client-side package manager.[298] The popular
Bootstrap frontend framework was also started at Twitter and is 10th most popular repository on
GitHub.[299]

Interface
Twitter introduced the first major redesign of its user interface in September 2010, adopting a dual-
pane layout with a navigation bar along the top of the screen, and an increased focus on the inline
embedding of multimedia content. Critics considered the redesign an attempt to emulate features
and experiences found in mobile apps and third-party Twitter clients.[300][301][302][303]

The new layout was revised in 2011 with a focus on continuity with the web and mobile versions,
introducing "Connect" (interactions with other users such as replies) and "Discover" (further
information regarding trending topics and news headlines) tabs, an updated profile design, and
moving all content to the right pane (leaving the left pane dedicated to functions and the trending
topics list).[304] In March 2012, Twitter became available in Arabic, Farsi, Hebrew and Urdu, the
first right-to-left language versions of the site.[305] As of August 2012, the site available in 33
different languages.[306]

In September 2012, a new layout for profiles was introduced, with larger "covers" that could be
customized with a custom header image, and a display of the user's recent photos posted.[307] The
"Discover" tab was discontinued in April 2015,[308] and was succeeded on the mobile app by an
"Explore" tab—which features trending topics and moments.[309]

In September 2018, Twitter began to migrate selected web users to its progressive web app (based
on its Twitter Lite experience for mobile web), reducing the interface to two columns. Migrations to
this iteration of Twitter increased in April 2019, with some users receiving it with a modified layout.
[310][311]

In July 2019, Twitter officially released this redesign, with no further option to opt-out while logged
in. It is designed to further-unify Twitter's user experience between the web and mobile application
versions, adopting a three-column layout with a sidebar containing links to common areas
(including "Explore" that has been merged with the search page) which previously appeared in a
horizontal top bar, profile elements such as picture and header images and biography texts merged
into the same column as the timeline, and features from the mobile version (such as multi-account
support, and an opt-out for the "top tweets" mode on the timeline).[312][313]

You might also like