Skip to content

Instantly share code, notes, and snippets.

@jimwwalker
Created December 1, 2017 10:06
Show Gist options
  • Save jimwwalker/b6cc5d2c1216e79ced16fe4207e1473c to your computer and use it in GitHub Desktop.
Save jimwwalker/b6cc5d2c1216e79ced16fe4207e1473c to your computer and use it in GitHub Desktop.

#DCP Object Ownership

                             ║                                                           │                          
                             ║                                                                                      
                             ║                                                           │                          
                             ║                                                                                      
                             ║                                                           │                          
                             ║                                                                                      
                             ║                                                           │                          
                             ▼                                                           ▼                          
                     ┌────────────────┐                                     ┌──────────────────────┐                
  ═════════════════▶ │Owning Reference│                 ─ ─ ─ ─ ─ ─ ─ ─ ─▶  │ Non-Owning Reference │                
                     └────────────────┘                                     └──────────────────────┘                
                                                                                                                    
  ┌─────────────────────────────┐      ┌─────────────────────────────┐       ┌───────────────────┐                  
  │    CookieToConnectionMap    ╠═══╗  │    pendingNotifications     │       │      vbConns      │                  
  │          (ConnMap obj)      │   ║  │          (ConnMap obj)      │       │   (ConnMap obj)   │                  
  └──────────────╦──────────────┘   ║  └──────────────╦──────────────┘       └─────────╦─────────┘                  
                 ║                  ║                 ║                                ║                            
                 ║            ╔═════╬═════════════════╩══════════════════╗             ║                            
  ┌──────────────▼────────────▼─┐   ║                                  ┌─▼─────────────▼─────────────┐              
  │         DCPConsumer         │   ╚══════════════════════════════════▶         DCPProducer         │              
  └───╦───▲──────╦─▲─────▲──╦───┘                                      └─────▲────▲────╦─────────────┘              
      ║          ║          ║                                                          ║                            
      ║   │      ║ │     │  ║                       ╔══════════╦═════════════╬════╬═╦══╩═════════════════╗          
      ║          ║          ║                       ║          ║    ─ ─ ─ ─ ─       ║                    ║          
┌─────▼───┴─┐    ║ │┌────┴──▼─────┐                 ║          ║   │              │ ║                    ║          
│ Processor │    ║  │PassiveStream│                 ║          ║                    ║                    ║          
└───────────┘    ║ │└─────────────┘                 ║   ┌──────▼───┴──┐     ┌─────┴─▼────────┐   ┌───────▼─────────┐
                 ║                                  ║   │ActiveStream ◀─ ─  │ NotifierStream │   │ BackfillManager │
           ┌─────▼─┴────┐                           ║   └───▲────▲──▲─┘   │ └────────────────┘   └───────╦─────────┘
           │RollbackTask│                           ║            │  │                                    ║          
           └────────────┘                           ║       │             │                              ║          
                                                    ║            │  │                                    ║          
                                         ┌──────────▼───────┴───┐    ┌────┴────────┐                     ║          
                                         │ActiveStreamCheckpoint││  ││  Backfill   ◀═════════════════════╝          
                                         │    ProcessorTask     │    └──────╦──────┘                                
                                         └──────────────────────┘│  │       ╚══════════════╗                        
                                                                                           ║                        
                                                    ┌────────────┴┐┌┴─────────────┐        ║                        
                                                    │CacheCallback││ DiskCallback │        ║                        
                                                    └──────▲──────┘└─────▲────────┘        ║                        
                                                           ║             ║                 ║                        
                                                           ║             ║                 ║                        
                                                        ┌──╩─────────────╩─┐               ║                        
                                                        │ KVStore ScanCtxt ◀═══════════════╝                        
                                                        └──────────────────┘                                                                                                      
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment