SlideShare ist ein Scribd-Unternehmen logo
1 von 38
NYT faбrik

TimesOpen – 12 September 2012
Who

 Architect
 Infrastructure Group
 Previous
   –   US Army
   –   Harvard
   –   Tech companies
   –   United Nations




                         2
What we’ll cover

 A story
 faбrik overview
 Code and demo




                    3
Takeaways

 Application Developer
   – Demand „events‟ (no polling, no thanks, been there, done that)
   – Demand infrastructure that scales and you don‟t have to worry about


 Infrastructure Engineer
   – Decouple, flatten, simplify
   – Outsource complexity




                                                                           4
The Story: Harvard U, 1986+

 Bad:
  –   No Internet (pre-web)
  –   data locked in mainframe
  –   large central clerical staff
  –   monolithic central systems
 Good:
  –   Vision of an Information Utility
  –   desire to innovate
  –   lots of desktop computers (30,000)
  –   email everywhere although over diverse networks and technologies




                                                                         5
The Story: Harvard U, 1986+

 Solution:
   –   Relational database (decouple data from application)
   –   Email backbone (decouple producers from consumers)
   –   Event-driven desktop applications (flatten)
   –   Identical code on mainframe (simplify)
 Result:
   –   Data warehouse unlocked (before the term was coined)
   –   Central clerical staff functions upgraded/dispersed
   –   Old central systems replaceable and, ultimately, replaced
   –   Happy users!




                                                                   6
faбrik – Why?




                ?


                    7
NYT Mission

Enhance society by creating, collecting and
distributing high quality news, information and
entertainment

- Distributing: publish / subscribe
- Collecting: gather / analyze
- High Quality: fast, reliable, accurate



                                                  8
faбrik

 Asynchronous Messaging Framework

 For client devices as well as our apps

 Enabled by:
   – Websockets
   – Robust message handling software
   – Amazon Web Services


 Focusing on simple, common services


                                           9
faбrik – solve the problem!




                  App




                              10
faбrik – basic


                                   App



                  Message Broker



                                         App

            App




                                               11
faбrik – basic
                              Amazon Web Services


                                   App



                  Message Broker


                          • EC2
                          • S3
                                           App
                          • Identity &
            App             Access Mgt
                          • DynamoDB
                          • Route 53
                          …


                                                    12
faбrik – basic++


                                            App                Service
                                            Buddy              Buddy

                           Message Broker
              “Retail”

                                              Message Broker

“Wholesale”
                 Service
                 Buddy
                                      Other
                                      App


                                                                         13
faбrik: Current Implementation

 Open source
  –   Erlang/OTP
  –   RabbitMQ
  –   Nodejs
  –   Sockjs (websockets +)
  –   Python (gevent, select/epoll, tornado, futures, …)
  –   ZeroMQ (new)
 Automated build/deployment


                                                           14
faбrik – active/active cluster
                       Region Wherever



            Zone „a‟                     Zone „b‟




          Service                    Service
          Buddy                      Buddy
            „a‟                        „b‟


                                                    15
faбrik – active/active cluster
                       Region Wherever



            Zone „a‟                     Zone „b‟




          Service                    Service
          Buddy                      Buddy
            „a‟                        „b‟


                                                    16
faбrik




         17
faбrik




         18
faбrik




         19
faбrik – Layers




                  20
faбrik – Layers




                  21
faбrik – Layers




                  22
faбrik – Layers




                  23
24
25
Pub / Sub




            26
Pub / Sub




            27
Pub / Sub




            28
Pub / Sub




            29
Pub / Sub




            30
Gather / Analyze




                   31
Gather / Analyze




                   32
Gather / Analyze




                   33
Gather / Analyze




                   34
Gather / Analyze




                   35
Gather / Analyze




                   36
Gather / Analyze




                   37
faбrik

 Demo

 Code




         App




               38

Weitere ähnliche Inhalte

Ähnlich wie Faбrik - TimesOpen: Sockets and Streams - Sept. 2012

Soa4 all technical achievements final
Soa4 all technical achievements finalSoa4 all technical achievements final
Soa4 all technical achievements final
John Domingue
 
Hierarchical Composable Optimization of Web Pages
Hierarchical Composable Optimization of Web PagesHierarchical Composable Optimization of Web Pages
Hierarchical Composable Optimization of Web Pages
Hayim Makabee
 
Prakash Narayan Building Social Web V1
Prakash  Narayan    Building  Social  Web V1Prakash  Narayan    Building  Social  Web V1
Prakash Narayan Building Social Web V1
SOA Symposium
 
Presentation Marketing Snowite
Presentation Marketing SnowitePresentation Marketing Snowite
Presentation Marketing Snowite
Snowite
 
ClassCloud: switch your PC Classroom into Cloud Testbed
ClassCloud: switch your PC Classroom into Cloud TestbedClassCloud: switch your PC Classroom into Cloud Testbed
ClassCloud: switch your PC Classroom into Cloud Testbed
Jazz Yao-Tsung Wang
 
Tech4Africa - Opportunities around Big Data
Tech4Africa - Opportunities around Big DataTech4Africa - Opportunities around Big Data
Tech4Africa - Opportunities around Big Data
Steve Watt
 

Ähnlich wie Faбrik - TimesOpen: Sockets and Streams - Sept. 2012 (20)

The Mashup Component Description Language
The Mashup Component Description LanguageThe Mashup Component Description Language
The Mashup Component Description Language
 
Log everything!
Log everything!Log everything!
Log everything!
 
Soa4 all technical achievements final
Soa4 all technical achievements finalSoa4 all technical achievements final
Soa4 all technical achievements final
 
Bug Labs Gov Web
Bug Labs Gov WebBug Labs Gov Web
Bug Labs Gov Web
 
Bug Labs Automotive Web
Bug Labs Automotive WebBug Labs Automotive Web
Bug Labs Automotive Web
 
Splunk All the Things: Our First 3 Months Monitoring Web Service APIs - Splun...
Splunk All the Things: Our First 3 Months Monitoring Web Service APIs - Splun...Splunk All the Things: Our First 3 Months Monitoring Web Service APIs - Splun...
Splunk All the Things: Our First 3 Months Monitoring Web Service APIs - Splun...
 
Hierarchical Composable Optimization of Web Pages
Hierarchical Composable Optimization of Web PagesHierarchical Composable Optimization of Web Pages
Hierarchical Composable Optimization of Web Pages
 
IBM s'associe au SmartHome Challenge
IBM s'associe au SmartHome ChallengeIBM s'associe au SmartHome Challenge
IBM s'associe au SmartHome Challenge
 
Prakash Narayan Building Social Web V1
Prakash  Narayan    Building  Social  Web V1Prakash  Narayan    Building  Social  Web V1
Prakash Narayan Building Social Web V1
 
OI in the Public Sector by Esteve Almirall
OI in the Public Sector by Esteve AlmirallOI in the Public Sector by Esteve Almirall
OI in the Public Sector by Esteve Almirall
 
Challenges EPs Face Going Mobile
Challenges EPs Face Going MobileChallenges EPs Face Going Mobile
Challenges EPs Face Going Mobile
 
Chapter 9 v6.0
Chapter 9 v6.0Chapter 9 v6.0
Chapter 9 v6.0
 
Presentation Marketing Snowite
Presentation Marketing SnowitePresentation Marketing Snowite
Presentation Marketing Snowite
 
ClassCloud: switch your PC Classroom into Cloud Testbed
ClassCloud: switch your PC Classroom into Cloud TestbedClassCloud: switch your PC Classroom into Cloud Testbed
ClassCloud: switch your PC Classroom into Cloud Testbed
 
Real-Time Communications between Microservices
Real-Time Communications between MicroservicesReal-Time Communications between Microservices
Real-Time Communications between Microservices
 
BIM: Data Everywhere
BIM: Data EverywhereBIM: Data Everywhere
BIM: Data Everywhere
 
Introduction to Android by Demian Neidetcher
Introduction to Android by Demian NeidetcherIntroduction to Android by Demian Neidetcher
Introduction to Android by Demian Neidetcher
 
Tech4Africa - Opportunities around Big Data
Tech4Africa - Opportunities around Big DataTech4Africa - Opportunities around Big Data
Tech4Africa - Opportunities around Big Data
 
From open data to API-driven business
From open data to API-driven businessFrom open data to API-driven business
From open data to API-driven business
 
Overview Mobile Applications Market
Overview  Mobile Applications MarketOverview  Mobile Applications Market
Overview Mobile Applications Market
 

Kürzlich hochgeladen

Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 

Kürzlich hochgeladen (20)

FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
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
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
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
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 

Faбrik - TimesOpen: Sockets and Streams - Sept. 2012

Hinweis der Redaktion

  1. ----- Meeting Notes (01.08.12 02:23) -----
  2. GE225 – also analog computersHarvard: Milly Koss – beginning in 1950 Hopper, Mawkley – computer pioneersTech: Managing hardware/software companies in Venezuela & AustraliaUN: slow to change
  3. Picture: Not really Harvard - Central message switch for London’s pneumatic tube system – 50 miles of tubes – ca 1930 – 1870’s thru the 30’s
  4. Learning points:. When you touch some data, take it all. Keep the lowest level of detail
  5. Events – like email but fasterBig deal – extended to client devices – takes some effort as I’ll describe in a few slidesMessaging Infrastructure used to be expensiveIn combination, we can:. Outsource a lot of complexity. Decouple and flatten by using messaging everywhereSo we can focus on doing the simple things well, e.g.:. Publish/Subscribe. Persisting data. Gathering data for analysis
  6. I’ve been in ‘infrastructure’ mode – switching back to a developer’s point of viewWe’ll look later at some code that does just thatMeanwhile we’ll dive back into the innards of the fabrik
  7. Message Broker: . Routes and load balances – simple and complex topologies. ResilientHorizontalDecouples:. Different technologies. Different rates – buffers, queues
  8. Outsource complexity to Amazon Web Services
  9. 2 levelsWholesale Message Broker extends throughout the fabrik – think of it as encircling the world – components are pretty stable – doesn’t fail, although components mightRetail Message Broker is a “spur” – supports an app buddy and a collection of service buddies – spurs are added/subtracted as needed and may fail
  10. We’ve got a little ruby in there tooA bit about nodejs and python: (since I am the “meat – or maybe the ham” in this evening’s lineup re node). a plus for node is that asynch programming is natural and consistent – and with coffeescript it’s actually fun – in python you have to “do” something – and your support modules may have chosen to “do” something else!. However for our purposes, some of the nodejs support modules are not as mature or robust – so we have had to “fix” them. In particular, for the most critical high-performance components, we’re likely to use python for now, though nodejs is strategic for us, because javascript is so important to our community of clients
  11. Zooming up – and leaving out some detail – here’s an illustration of one way we are tying to create “non-stop” servicesThe red dot indicates clustering between virtual machine instances, each running in a separate zone – think datacenter – in an AWS regionMy 2 service buddies each perform the same service, and the broker load balances work to them, so they are each active
  12. If one of the service buddies goes down, or a broker instance goes down, or a zone goes down, the other broker adjusts and requeues work to the survivorMeanwhile, we will automatically be adding more resources to compensate, and possibly shunting work away from this region until it is fully healthy againNow lets zoom up again and take a global view
  13. These are the Amazon regions, and the zonesExcept a 3rd zone has now been added both to Northern California and Tokyo, so there are 20 zones availableEach zone has independent power and independent communications infrastructure – so think of them as datacentersOne of our goal is to be able to balance across all the zones, optimizing service and cost
  14. Logically, the wholesale layer is unified in each region The retail layer is autoscaled based upon demand and “health” – remember the retail components are “spurs” off the cluster, sharing nothing
  15. The regions are federated in a complete networkLet’s take another perspective on pretty much the same information
  16. I’ve pulled the regional clusters together in this view
  17. So that is the wholesale layer
  18. The our own apps – publishers or analyzers or whatever – connect via load balancers
  19. The retail layer connects via load balancer tooEach instance in this layer has an app buddy, a local broker, and service buddies, hence the “blend” of red and blue
  20. Finally the external clients coming thru Route 53 and via another layer of load balancers into our retail layer
  21. Every layer is supported by AWSNow let’s take a look at how we can use the fabrikOur initial target is to support the “publish/subscribe” pattern
  22. Nothing too radical here – classic Pub/SubExcept:. One machine image. Small systems software complement. 10-20 small, testable, tunable apps in a different languages. Decoupled, simple, flat. Global, fast, resilient, autoscaled – complexity outsourcedDevelopers – the real payoff is for you which I’ll try to illustrate with code in a few minutes
  23. Wholesale layer does not scale to the degree necessary to directly handle all retail eventsKill a couple birds at once by using AWS DynamoDB. Persist data immediately. Use dynamo to assemble detail from many sources in near real time
  24. That’s enough of an overview of the fabrik – let’s see a demo and look at some code
  25. Specifically we’ll look at some html that runs the demoThe publishing app is written in coffeescript and pretty simple too – anyone who’s interested can see me after and we’ll take a lookFirst the demo