Twitter Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.Anti-spam check. Do not fill this in! ===Implementation=== Twitter relies on [[open-source software]].<ref name="zdnet vaughannichols 2012">{{cite news|last=Vaughan-Nichols|first=Steven|title=How Twitter tweets your tweets with open source|url=https://www.zdnet.com/how-twitter-tweets-your-tweets-with-open-source-7000003526/|access-date=September 10, 2012|newspaper=[[ZDNet]]|date=August 30, 2012}}</ref> The Twitter Web interface uses the [[Ruby on Rails]] framework,<ref>{{cite news|url=https://www.forbes.com/forbes/2009/0622/software-internet-innovation-digital-tools.html |title=The Pied Piper of Pay|work=[[Forbes]] |first=Lee |last=Gomes |date=June 22, 2009 |access-date=June 16, 2009}}</ref> deployed on a performance enhanced [[Ruby Enterprise Edition]] implementation of [[Ruby (programming language)|Ruby]].<ref>{{cite web|first=Ryan |last=King |date = September 25, 2009 |title = Twitter on Ruby |url = http://blog.evanweaver.com/articles/2009/09/24/ree/ |quote=We recently migrated Twitter from a custom Ruby 1.8.6 build to a Ruby Enterprise Edition release candidate, courtesy of Phusion. Our primary motivation was the integration of Brent's MBARI patches, which increase memory stability. |access-date=October 31, 2009}}</ref>{{Update inline|date=October 2022}} In the early days of Twitter, tweets were stored in [[MySQL]] databases that were temporally [[Shard (database architecture)|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.<ref name="Krikorian-2013">{{cite web|url=https://blog.twitter.com/engineering/en_us/a/2013/new-tweets-per-second-record-and-how|title=New Tweets per second record, and how!|first=Raffi|last=Krikorian|date=August 16, 2013|access-date=November 22, 2021|work=Twitter Blogs|archive-url=https://web.archive.org/web/20130822102815/https://blog.twitter.com/2013/new-tweets-per-second-record-and-how|archive-date=August 22, 2013|url-status=live}}</ref> From Spring 2007 to 2008, the messages were handled by a Ruby [[persistent data structure|persistent]] queue server called Starling.<ref>{{cite web|access-date=January 11, 2009 |url=http://dev.twitter.com/2008/01/announcing-starling.html |title=Announcing Starling |publisher=Twitter |date=January 16, 2008 |last=Payne |archive-url=https://web.archive.org/web/20080120141113/http://dev.twitter.com/2008/01/announcing-starling.html|archive-date=January 20, 2008}}</ref> Since 2009, implementation has been gradually replaced with software written in [[Scala (programming language)|Scala]].<ref>{{cite web|url=http://www.artima.com/scalazine/articles/twitter_on_scala.html |title=Twitter on Scala |date=April 3, 2009 |first=Bill |last=Venners |publisher=Artima Developer |access-date=June 17, 2009}}</ref> The switch from Ruby to Scala and the [[Java Virtual Machine|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 call]]s.<ref name="Krikorian-2013" /> As of April 6, 2011, Twitter engineers confirmed that they had switched away from their Ruby on Rails search stack to a [[Java (programming language)|Java]] server they call Blender.<ref name="Twitter coding">{{cite news|url=https://blog.twitter.com/2011/twitter-search-is-now-3x-faster |title=Twitter Search Is Now 3x Faster|date=April 6, 2011}}</ref> Individual tweets are registered under unique IDs called [[Snowflake ID|snowflakes]], and geolocation data is added using 'Rockdove'. The URL shortener ''[[t.co]]'' then checks for a [[Messaging spam|spam]] link and shortens the URL. Next, the tweets are stored in a MySQL database using [[Gizzard (Scala framework)|Gizzard]], and the user receives an acknowledgement that the tweets were sent. Tweets are then sent to search engines via the [[Firehose (software)|Firehose]] API. The process is managed by [[FlockDB]] and takes an average of {{nowrap|350 ms}}.<ref name="zdnet vaughannichols 2012" /> 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.<ref name="Krikorian-2013" /><ref>{{cite web|title=How Twitter scaled its infrastructure to handle record tweet-per-second days|url=http://gigaom.com/2013/08/16/how-twitter-scaled-it-infrastructure-to-handle-record-tweet-per-second-days/|work=GIGAOM|access-date=August 17, 2013|first=Om|last=Malik|date=August 17, 2013|archive-date=February 24, 2021|archive-url=https://web.archive.org/web/20210224134908/https://gigaom.com/2013/08/16/how-twitter-scaled-it-infrastructure-to-handle-record-tweet-per-second-days/|url-status=dead}}</ref> Summary: Please note that all contributions to Christianpedia may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here. You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Christianpedia:Copyrights for details). Do not submit copyrighted work without permission! Cancel Editing help (opens in new window) Discuss this page