GreenWare Tech was established and licensed to provide electronic security, safety, IT services and ancilllary technical support.

Gallery

Contacts

Lagos, Nigeria | San Francisco, USA

info@greenware-tech.com

+234 -706-550-7772

Technology
Twitter now X

Twitter now X – Programming Languages That Built It

Twitter now rebranded as X, has evolved over the years in terms of the programming languages and technologies it uses. Here’s an overview of the key languages that have been instrumental in building and running Twitter (X) over time:

1.) Early Days
– Ruby (Ruby on Rails):
– In its early stages, Twitter was built using Ruby on Rails, which allowed for rapid development and iteration.
– However, as Twitter grew, Ruby on Rails struggled with performance at scale, leading to issues like the infamous “Fail Whale” downtime messages.

2.) Scaling Up
– Scala:
– Twitter shifted its backend services to Scala (on the JVM) due to its ability to handle highly concurrent systems more efficiently than Ruby.
Finagle, an open-source RPC (Remote Procedure Call) system developed by Twitter, is written in Scala. It helped handle Twitter’s growing traffic and scale.

– Java:
– Many of Twitter’s core backend systems are now written in Java, which has proven to be more scalable and efficient for high-throughput services.
– Java is heavily used in services like Twitter’s tweet delivery system and search functionality.

3.) Front-End and User Interface
– JavaScript:
– Twitter uses JavaScript for its front-end development. The React.js framework is commonly used to build the web interface.
TypeScript: In more recent years, TypeScript, a statically typed superset of JavaScript, has been adopted to help manage the complexity of front-end code as the platform grows.
– HTML/CSS: These are standard for structuring and styling Twitter’s web interface.

You may also read: Facebook (now Meta) – Programming Languages That Built It

4.) Real-Time Features
– Scala and Java:
– Twitter’s real-time tweet streaming and notification system rely heavily on Scala and Java.
Kafka, an open-source stream-processing platform (written in Scala/Java), plays a central role in processing and distributing real-time data.

5.) Data and Analytics
Python:
Python is used extensively for data analytics, machine learning, and handling large-scale data processing tasks at Twitter.
– Twitter uses Python with frameworks like Scalding (a Scala API for Hadoop developed by Twitter) for data pipelines.
Hadoop and Spark (which supports Scala, Java, and Python) are critical to managing and processing Twitter’s large datasets for analytics and user behavior insights.

6.) Infrastructure and Backend
– C++:
– Some performance-critical components, such as low-latency services and parts of Twitter’s infrastructure, are written in C++ for efficiency.
– Go:
Go is used for certain microservices that require fast and efficient concurrency handling.
MySQL:
– Twitter uses MySQL as a primary database for storing tweets, user information, and other data.

7.) Microservices Architecture
– Thrift:
– Twitter uses Apache Thrift, a language-agnostic RPC framework, to enable communication between its various services, many of which are written in Scala, Java, and Go.

8.) Search and Indexing
– Lucene/Elasticsearch:
– Twitter’s search functionality relies on Lucene and Elasticsearch for indexing and querying tweets in real time.

9.) Machine Learning and AI
– TensorFlow/PyTorch:
– Machine learning models for recommendation systems (e.g., personalized timelines and content suggestions) are typically built using Python with frameworks like TensorFlow or PyTorch.


Key Takeaways:
Ruby on Rails powered Twitter’s early development, but as the platform scaled, it migrated to languages like Scala and Java for backend services.
Python plays a significant role in data processing and analytics.
JavaScript/TypeScript and React.js are used to build the front-end user interface.
Go and C++ are used in specific microservices and performance-critical areas.

Twitter (now X) has continuously evolved its tech stack to manage its massive user base and the platform’s complexity.

Author

Greenware Tech