Thialfi: A Client Notification Service for Internet-Scale Applications

Slides:



Advertisements
Similar presentations
You have been given a mission and a code. Use the code to complete the mission and you will save the world from obliteration…
Advertisements

Writing Good Use Cases - Instructor Notes
1 © 2001, Cisco Systems, Inc. Updated_ Mobile IP Lessons Learned The early years.
MCT620 – Distributed Systems
Advanced Piloting Cruise Plot.
Distributed Systems Architectures
Copyright © 2011, Elsevier Inc. All rights reserved. Chapter 5 Author: Julia Richards and R. Scott Hawley.
1 Copyright © 2010, Elsevier Inc. All rights Reserved Fig 2.1 Chapter 2.
By D. Fisher Geometric Transformations. Reflection, Rotation, or Translation 1.
Using Network Virtualization Techniques for Scalable Routing Nick Feamster, Georgia Tech Lixin Gao, UMass Amherst Jennifer Rexford, Princeton University.
Page 1 CSISS LCenter for Spatial Information Science and Systems 03/19/2008 GeoBrain BPELPower Workflow Engine Liping Di, Genong Yu Center.
Challenges in Making Tomography Practical
Document #07-12G 1 RXQ Customer Enrollment Using a Registration Agent Process Flow Diagram (Switch) Customer Supplier Customer authorizes Enrollment.
Document #07-12G 1 RXQ Customer Enrollment Using a Registration Agent Process Flow Diagram (Switch) Customer Supplier Customer authorizes Enrollment.
Document #07-2I RXQ Customer Enrollment Using a Registration Agent (RA) Process Flow Diagram (Move-In) (mod 7/25 & clean-up 8/20) Customer Supplier.
Business Transaction Management Software for Application Coordination 1 Business Processes and Coordination.
©2003 aQute, All Rights Reserved Tokyo, August 2003 : 1 OSGi Service Platform Tokyo August 28, 2003 Peter Kriens CEO aQute, OSGi Fellow
18 Copyright © 2005, Oracle. All rights reserved. Distributing Modular Applications: Introduction to Web Services.
17 Copyright © 2005, Oracle. All rights reserved. Deploying Applications by Using Java Web Start.
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
Title Subtitle.
My Alphabet Book abcdefghijklm nopqrstuvwxyz.
Multiplying binomials You will have 20 seconds to answer each of the following multiplication problems. If you get hung up, go to the next problem when.
0 - 0.
DIVIDING INTEGERS 1. IF THE SIGNS ARE THE SAME THE ANSWER IS POSITIVE 2. IF THE SIGNS ARE DIFFERENT THE ANSWER IS NEGATIVE.
SUBTRACTING INTEGERS 1. CHANGE THE SUBTRACTION SIGN TO ADDITION
MULT. INTEGERS 1. IF THE SIGNS ARE THE SAME THE ANSWER IS POSITIVE 2. IF THE SIGNS ARE DIFFERENT THE ANSWER IS NEGATIVE.
Addition Facts
Year 6 mental test 5 second questions
INFSO-RI Enabling Grids for E-sciencE Building a robust distributed system: some lessons from R-GMA CHEP-07, Victoria,
Data recovery 1. 2 Recovery - introduction recovery restoring a system, after an error or failure, to a state that was previously known as correct have.
1 Data Link Protocols By Erik Reeber. 2 Goals Use SPIN to model-check successively more complex protocols Using the protocols in Tannenbaums 3 rd Edition.
ZMQS ZMQS
Toward Practical Public Key Anti- Counterfeiting for Low-Cost EPC Tags Alex Arbit, Avishai Wool, Yossi Oren, IEEE RFID April
1 Data-Oriented Network Architecture (DONA) Scott Shenker (M. Chowla, T. Koponen, K. Lakshminarayanan, A. Ramachandran, A. Tavakoli, I. Stoica)
BT Wholesale October Creating your own telephone network WHOLESALE CALLS LINE ASSOCIATED.
1 Dr. Ashraf El-Farghly SECC. 2 Level 3 focus on the organization - Best practices are gathered across the organization. - Processes are tailored depending.
Tom Hamilton – America’s Channel Database CSE
Fast Crash Recovery in RAMCloud
13 Copyright © 2005, Oracle. All rights reserved. Monitoring and Improving Performance.
Staying in Sync with Cloud 2 Device Messaging. About Me Chris Risner Twitter: chrisrisner.
Copyright © 2012 AirWatch, LLC. All rights reserved. Proprietary & Confidential. Mobile Content Strategies and Deployment Best Practices.
1 Jini Tutorial, Part 3 Jini Programming. 2 Tutorial outline Part 1 Introduction Distributed systems Java basics Remote Method Invocation (RMI) Part 2.
Centrifuge: Integrated Lease Management and Partitioning for Cloud Services Atul Adya,John Dunagan*,Alec Wolman* Google, *Microsoft Research 1 7th USENIX.
ABC Technology Project
Megastore: Providing Scalable, Highly Available Storage for Interactive Services. Presented by: Hanan Hamdan Supervised by: Dr. Amer Badarneh 1.
Squares and Square Root WALK. Solve each problem REVIEW:
© 2012 National Heart Foundation of Australia. Slide 2.
Executional Architecture
Chapter 5 Test Review Sections 5-1 through 5-4.
GG Consulting, LLC I-SUITE. Source: TEA SHARS Frequently asked questions 2.
© 2006 Cisco Systems, Inc. All rights reserved.Cisco ConfidentialBCMSN BCMSN Module 1 Lesson 1 Network Requirements.
Addition 1’s to 20.
25 seconds left…...
Week 1.
We will resume in: 25 Minutes.
Chapter 12: Project Management and Strategic Planning Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chapter
SE-292 High Performance Computing Memory Hierarchy R. Govindarajan
A SMALL TRUTH TO MAKE LIFE 100%
1 Unit 1 Kinematics Chapter 1 Day
VPN AND REMOTE ACCESS Mohammad S. Hasan 1 VPN and Remote Access.
1 PART 1 ILLUSTRATION OF DOCUMENTS  Brief introduction to the documents contained in the envelope  Detailed clarification of the documents content.
How Cells Obtain Energy from Food
INF5040 (Open Distributed Systems)
DStore: Recovery-friendly, self-managing clustered hash table Andy Huang and Armando Fox Stanford University.
Fast Crash Recovery in RAMCloud. Motivation The role of DRAM has been increasing – Facebook used 150TB of DRAM For 200TB of disk storage However, there.
FCM Workflow using GCM.
INFSO-RI Enabling Grids for E-sciencE Building a robust distributed system: some lessons from R-GMA WLCG Service Reliability.
Slicer: Auto-Sharding for Datacenter Applications
Presentation transcript:

Thialfi: A Client Notification Service for Internet-Scale Applications Atul Adya, Gregory Cooper, Daniel Myers, Michael Piatek Google Seattle

A Case for Notifications Problem: Ensuring cached data is fresh across users and devices

Common Application Patterns Clients poll to detect changes Simple and reliable, but slow and inefficient Push updates to the client Fast but complex Add backup polling to get reliability Tail latencies can be high: masks bugs Application-specific protocol  sacrifice reliability

Our Solution: Thialfi Scalable: tracks millions of clients and objects Fast: notifies clients in less than a second Reliable: even when entire data centers fail Easy to use: deployed in Chrome Sync, Contacts, Google Plus

Talk Outline Thialfi’s abstraction: reliable signaling Delivering notifications in the common case Detecting and recovering from failures Evaluation and experience

Thialfi client library Thialfi Overview Client C2 Client C1 Register X Notify X Thialfi client library Register Update X Register Client Data center Notify X Thialfi Service Application backend Notify X Update X X: C1, C2

Thialfi Abstraction Objects have unique IDs and version numbers, monotonically increasing on every update Delivery guarantee Registered clients learn latest version number Reliable signal only: cached object ID X at version Y

Why Signal, Not Data? Developers want reliable, in-order data delivery Adds complexity to Thialfi and application, e.g., Hard state, arbitrary buffering Offline applications flooded with data on wakeup For most applications, reliable signal is enough Invoke polling path on signal: simplifies integration

API Without Failure Recovery Client Library Register(objectId) Unregister(objectId) Notify(objectId, version) Thialfi Service Publish(objectId, version)

Talk Outline Thialfi’s abstraction: reliable signaling Delivering notifications in the common case Detecting and recovering from failures Evaluation and experience

Architecture Matcher: Object ID  registered clients, version Client library Registrations, notifications, acknowledgments Client Data center Client Bigtable Registrar Notifications Application Backend Object Bigtable Matcher Matcher: Object ID  registered clients, version Registrar: Client ID  registered objects, notifications

Life of a Notification Client C2 Data center Registrar Matcher Ack: x, v7 x C1: x, v7 Data center Client Bigtable Registrar Notify: x, v7 C2: x, v7 C1: x, v7 C2: x, v7 C1: x, v5 C2: x, x, v7 Publish(x, v7) Object Bigtable Matcher x: v5; C1, C2 x: v7; C1, C2 x: v7; C1, C2

Talk Outline Thialfi’s abstraction: reliable signaling Delivering notifications in the common case Detecting and recovering from failures Evaluation and experience

Possible Failures Server state loss/ schema migration Network failures Client Library Client Store Server state loss/ schema migration Network failures Data center loss Partial storage unavailability Client state loss Client restart Client Bigtable Registrar Matcher Object Client Bigtable Registrar Matcher Object . . . Data center n Data center 1 Thialfi Service Publish Feed

Failures Addressed by Thialfi Client restart Client state loss Network failures Partial storage unavailability Server state loss / schema migration Publish feed loss Data center outage

Main Principle: No Hard State Thialfi remains correct even if all state is lost All registrations All object versions Detect and reconstruct after failures using: ReissueRegistrations() client event Registration Sync Protocol NotifyUnknown() client event

Recovering Client Registrations Registrar Matcher Object Bigtable ReissueRegistrations() x x y y Register(x); Register(y) ReissueRegistrations: Not a burden for applications Application stores objects in its cache, or Object list is implicit, e.g., bookmarks for user X

Syncing Client Registrations Register: x, y Registrar Matcher Object Bigtable Hash(x, y) x y x Hash(x, y) Reg sync y Goal: Keep client-registrar registration state in sync Every message contains hash of registered objects Registrar initiates protocol when detects out-of-sync Allows simpler reasoning of registration state

Recovering From Lost Versions Versions may be lost, e.g. schema migration Refreshing from backend requires tight coupling Inform client with NotifyUnknown(objectId) Client must refresh, regardless of its current state

Talk Outline Thialfi’s abstraction: reliable signaling Delivering notifications in the common case Detecting and recovering from failures Evaluation and experience

Notification Latency Breakdown Batching accounts for significant fraction of latency

Thialfi Usage by Applications Language Network Channel Client Lines of Code (Semi-colons) Chrome Sync C++ XMPP 535 Contacts JavaScript Hanging GET 40 Google+ 80 Android Application Java C2DM + Standard GET 300 Google BlackBerry RPC 340

Some Lessons Learned Add complexity at the server, not the client Deploy at server: minutes. Upgrade clients: years+ Asynchronous events, not callbacks Spontaneous events occur: need to handle them Initial applications have few objects per client Earlier use of polling forces such a model

Thialfi Summary Fast, scalable notification service Reliable even when data centers fail Two key ideas simplify failure handling Deliver a reliable signal, not data No hard state: reconstruct after failure Deployed in Chrome Sync, Contacts, Google+