SlideShare uma empresa Scribd logo
1 de 140
@raffi
          Raffi Krikorian


Giving a talk at @StanfordACM.
Want to know about engineering for
real-time?
1 min ago via Twitter for iPhone   Favorite   Retweet   Reply
@JordnJnkieJuice
         ✔Finally✈MF✈Famous✔



EARTHQUAKE !!!!!
1 min ago via Echofon   Favorite   Retweet   Reply
@usgs
300 miles
   to
  NYC
@remedyoakland
         Remedy


Strawberry scones and rhubarb
turnovers in the house!
14 Apr via Facebook   Favorite   Retweet   Reply
What’s a Tweet?
48 characters
                                              +1 for the bird

What’s a Tweet?
It’s a short message that's sent through




                                   140 characters max
1 tweet
sizeof(1 tweet)
sizeof(1 tweet)= 140 characters
sizeof(1 tweet)= 140 characters
sizeof(1 tweet)= 140 characters
sizeof(1 tweet)= 140 characters
sizeof(1 tweet)≈ 200 bytes
sizeof(1 tweet)≈ 200 bytes
= 140 characters
sizeof(1 tweet)
                ≈ 200 bytes
= 140 characters
sizeof(1 tweet)
                ≈ 200 bytes
@Astro_Soichi
          Soichi Noguchi



http://twitpic.com/17dfqb -




8 Mar 10 via TwitPic       Favorite   Retweet   Reply
@Astro_Soichi
          Soichi Noguchi



http://twitpic.com/17dfqb -




8 Mar 10 via TwitPic       Favorite   Retweet   Reply
About


Tweets a day
About

230,000,000
  Tweets a day
2.3E6 tweets
    day
2.3E6 tweets 2600 tweets
            ≈
    day        second
2.3E6 tweets 2600 tweets
            ≈
    day        second
2.3E6 tweets 2600 tweets
            ≈
    day        second
2.3E6 tweets 2600 tweets
            ≈
    day        second
2.3E6 tweets 2600 tweets
            ≈
    day        second

                       steady state
7,196
TPS
Tokyo
6,600 TPS
8,800 TPS
status/update
status/update
status/update
status/update




    HTTP 200 OK


{
status/update




    HTTP 200 OK


{
status/update




 HTTP 200 OK
status/update




 HTTP 200 OK
st
s
Snowflake
https://github.com/twitter/snowflake




                                       s
s
s
s
s
s



Rockdove
s
s
t.co
{
{
Storage
          {
{
status/update




    HTTP 200 OK


{
status/update




    HTTP 200 OK


{
status/update




    HTTP 200 OK


{
HTTP 200 OK


{
    …
    "text":"Tweet!"
    …
}
HTTP 200 OK


{
    …
    "text":"Tweet!"
    …
}
HTTP 200 OK


{
    …
    "text":"Tweet!"
    …
}
status/update




    HTTP 200 OK


{
    …
    "text":"Tweet!"
    …
}
status/update




    HTTP 200 OK


{
    …
    "text":"Tweet!"
    …
}
status/update




    HTTP 200 OK


{
    …
    "text":"Tweet!"
    …
}
status/update


                      Fanout




    HTTP 200 OK


{
    …
    "text":"Tweet!"
    …
}
status/update


                      Fanout




    HTTP 200 OK


{
    …
    "text":"Tweet!"
    …
}
te


     Fanout




K
te


     Fanout




K
te


     Fanout




K
te

              Flock
     Fanout




K
te


     Fanout




K
te


     Fanout




K
status/update


                      Fanout




    HTTP 200 OK


{
    …
    "text":"Tweet!"
    …
}
status/update


                      Fanout




    HTTP 200 OK


{
    …
    "text":"Tweet!"
    …
}
followed by   following
@ladygaga
mother mons†er
13.2 million followers

@justinbieber
Justin Bieber
12.4 million followers

@BarackObama
44th President of the United States
9.9 million followers

@raffi
me!
0.01 million followers
@ladygaga
mother mons†er
13.2 million followers

@raffi
me!
0.01 million followers
@ladygaga
mother mons†er
13.2 million followers

@raffi
me!
0.01 million followers
@ladygaga
       mother mons†er
       13.2 million followers

       @raffi
       me!
       0.01 million followers




10000x more followers than me
@ladygaga
mother mons†er
13.2 million followers

@raffi
me!
0.01 million followers




  scaling for            107
Has...
⇢ huge number of concurrent connections
⇢ lots of I/O
⇢ few persistent objects
Gosai Kiji

Phasianus versicolor also
known as Japanese Pheasant
is a bird of the lowlands.
Closely related to the
Common Pheasant, the cock
is distinguished by dark
green plumage on breast and
mantle. The male has an
iridescent violet neck, red
bare facial skin and purplish
green tail. The female is
smaller than male, and has a
dull brown plumage with
dark spots.
Gosai Kiji

Phasianus versicolor also
known as Japanese Pheasant
is a bird of the lowlands.
Closely related to the
Common Pheasant, the cock
is distinguished by dark
green plumage on breast and
mantle. The male has an
iridescent violet neck, red
bare facial skin and purplish
green tail. The female is
smaller than male, and has a
dull brown plumage with
dark spots.
needS...
⇢ ability to handle server workloads
needS...
⇢ ability to handle server workloads
⇢ flexibility in language
needS...
⇢ ability to handle server workloads
⇢ flexibility in language
needS...
⇢ ability to handle server workloads
⇢ flexibility in language
needS...
⇢ ability to handle server workloads
⇢ flexibility in language
needS...
⇢ ability to handle server workloads
⇢ flexibility in language
needS...
⇢ ability to handle server workloads
⇢ flexibility in language
⇢ a real concurrency model
finagle |fəˈnāgəl|

          needS...
                                       verb [ trans. ] informal
                                       obtain (something) by devious or dishonest means : Ted
                                       attended all the football games he could finagle tickets for.
                                       • [ intrans. ] act in a devious or dishonest manner : they
                                       wrangled and finagled over the fine points.
⇢ ability to handle server workloads   DERIVATIVES
⇢ flexibility in language              finagler |fəˈnāg(ə)lər| noun


⇢ a real concurrency model             ORIGIN 1920s (originally U.S.): from dialect fainaigue
                                       [cheat] ; perhaps from Old French fornier ‘deny.’
finagle |fəˈnāgəl|

          needS...
                                       verb [ trans. ] informal
                                       obtain (something) by devious or dishonest means : Ted
                                       attended all the football games he could finagle tickets for.
                                       • [ intrans. ] act in a devious or dishonest manner : they
                                       wrangled and finagled over the fine points.
⇢ ability to handle server workloads   DERIVATIVES
⇢ flexibility in language              finagler |fəˈnāg(ə)lər| noun


⇢ a real concurrency model             ORIGIN 1920s (originally U.S.): from dialect fainaigue
                                       [cheat] ; perhaps from Old French fornier ‘deny.’
finagle |fəˈnāgəl|

          needS...
                                       verb [ trans. ] informal
                                       obtain (something) by devious or dishonest means : Ted
                                       attended all the football games he could finagle tickets for.
                                       • [ intrans. ] act in a devious or dishonest manner : they
                                       wrangled and finagled over the fine points.
⇢ ability to handle server workloads   DERIVATIVES
⇢ flexibility in language              finagler |fəˈnāg(ə)lər| noun


⇢ a real concurrency model             ORIGIN 1920s (originally U.S.): from dialect fainaigue
                                       [cheat] ; perhaps from Old French fornier ‘deny.’
finagle |fəˈnāgəl|
                                       verb [ trans. ] informal

          needS...                     obtain (something) by devious or dishonest means : Ted
                                       attended all the football games he could finagle tickets for.
                                       • [ intrans. ] act in a devious or dishonest manner : they
                                       wrangled and finagled over the fine points.
⇢ ability to handle server workloads   DERIVATIVES

⇢ flexibility in language              finagler |fəˈnāg(ə)lər| noun


⇢ a real concurrency model             ORIGIN 1920s (originally U.S.): from dialect fainaigue
                                       [cheat] ; perhaps from Old French fornier ‘deny.’
’S Infrastructure trades in...
⇢ RAM & CPU
⇢ bandwidth
⇢ machine density
Switching to      doesn’t imply
that     is a mistake
is a

Real-Time Event-driven
         &
         Problem
What happens in the

    World
    happens on
Follow me at
Questions?   twitter.com/raffi

Mais conteúdo relacionado

Mais de Raffi Krikorian

Twitter for CS10 @ Berkeley (Spring 2011)
Twitter for CS10 @ Berkeley (Spring 2011)Twitter for CS10 @ Berkeley (Spring 2011)
Twitter for CS10 @ Berkeley (Spring 2011)
Raffi Krikorian
 
Intro to developing for @twitterapi
Intro to developing for @twitterapiIntro to developing for @twitterapi
Intro to developing for @twitterapi
Raffi Krikorian
 
"What's Happening" to "What's Happening Here" @ Chirp
"What's Happening" to "What's Happening Here" @ Chirp"What's Happening" to "What's Happening Here" @ Chirp
"What's Happening" to "What's Happening Here" @ Chirp
Raffi Krikorian
 
WattzOn @ ETech 2009
WattzOn @ ETech 2009WattzOn @ ETech 2009
WattzOn @ ETech 2009
Raffi Krikorian
 

Mais de Raffi Krikorian (20)

Twitter for CS10 @ Berkeley (Spring 2011)
Twitter for CS10 @ Berkeley (Spring 2011)Twitter for CS10 @ Berkeley (Spring 2011)
Twitter for CS10 @ Berkeley (Spring 2011)
 
Twitter by the Numbers (Columbia University)
Twitter by the Numbers (Columbia University)Twitter by the Numbers (Columbia University)
Twitter by the Numbers (Columbia University)
 
Users and Geo
Users and GeoUsers and Geo
Users and Geo
 
Twitter and the Real-Time Web
Twitter and the Real-Time WebTwitter and the Real-Time Web
Twitter and the Real-Time Web
 
Twitter - Guest Lecture UC Berkeley CS10 Fall 2010
Twitter - Guest Lecture UC Berkeley CS10 Fall 2010Twitter - Guest Lecture UC Berkeley CS10 Fall 2010
Twitter - Guest Lecture UC Berkeley CS10 Fall 2010
 
Developing for @twitterapi #hack4health
Developing for @twitterapi #hack4healthDeveloping for @twitterapi #hack4health
Developing for @twitterapi #hack4health
 
Twitter by the Numbers
Twitter by the NumbersTwitter by the Numbers
Twitter by the Numbers
 
Intro to developing for @twitterapi (updated)
Intro to developing for @twitterapi (updated)Intro to developing for @twitterapi (updated)
Intro to developing for @twitterapi (updated)
 
How to use Geolocation in your webapp @ FOWA Dublin 2010
How to use Geolocation in your webapp @ FOWA Dublin 2010How to use Geolocation in your webapp @ FOWA Dublin 2010
How to use Geolocation in your webapp @ FOWA Dublin 2010
 
Intro to developing for @twitterapi
Intro to developing for @twitterapiIntro to developing for @twitterapi
Intro to developing for @twitterapi
 
Twitter API Annotations
Twitter API AnnotationsTwitter API Annotations
Twitter API Annotations
 
"What's Happening" to "What's Happening Here" @ Chirp
"What's Happening" to "What's Happening Here" @ Chirp"What's Happening" to "What's Happening Here" @ Chirp
"What's Happening" to "What's Happening Here" @ Chirp
 
Energy / Tweet
Energy / TweetEnergy / Tweet
Energy / Tweet
 
Handling Real-time Geostreams
Handling Real-time GeostreamsHandling Real-time Geostreams
Handling Real-time Geostreams
 
Adding the "Where" to the "When"
Adding the "Where" to the "When"Adding the "Where" to the "When"
Adding the "Where" to the "When"
 
What's happening here?
What's happening here?What's happening here?
What's happening here?
 
WattzOn @ ETech 2009
WattzOn @ ETech 2009WattzOn @ ETech 2009
WattzOn @ ETech 2009
 
Scala + WattzOn, sitting in a tree....
Scala + WattzOn, sitting in a tree....Scala + WattzOn, sitting in a tree....
Scala + WattzOn, sitting in a tree....
 
WattzOn Whole Earth Simulator
WattzOn Whole Earth SimulatorWattzOn Whole Earth Simulator
WattzOn Whole Earth Simulator
 
Broken Hearts: How Valentine's Day causes global warming
Broken Hearts: How Valentine's Day causes global warmingBroken Hearts: How Valentine's Day causes global warming
Broken Hearts: How Valentine's Day causes global warming
 

Último

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Último (20)

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 

Twitter: Engineering for Real-Time (Stanford ACM 2011)