SlideShare a Scribd company logo
NetflixOSS Open House
      Lightning talks
Jordan Zimmerman
                 @randgalt
   jzimmerman@netflix.com

NetflixOSS projects I work on




         Jordan Zimmerman
         Netflix Platform Team
     jzimmerman@netflix.com
                      @randgalt
Correct ZooKeeper use is hard!
●   Curator is a set of Java libraries that make using ZooKeeper much easier
    and enforce best practices.
●   Curator is focused on the recipes: locks, leaders, etc. Most people
    interested in ZooKeeper don't need to be concerned with the details of
    connection management, etc. What they want is a simple way to use the
    recipes.
●   Connection management, retries, recipes, best practices.
●   Recipes!
    Leader Latch, Leader Election, Shared Reentrant Lock, Shared Lock, Shared Reentrant Read
    Write Lock, Shared Semaphore, Multi Shared Lock, Distributed Queue, Distributed Id Queue,
    Distributed Priority Queue, Distributed Delay Queue, Simple Distributed Queue, Barrier, Double
    Barrier, Shared counter, Distributed Atomic Long, Path Cache, Node Cache
ZooKeeper Ops is very hard!
●   Instance Monitoring
●   Log Cleanup
●   Backup/Restore
●   Cluster-wide Configuration
●   Rolling Ensemble Changes
●   Automatic Instance Management
●   Visualizer
●   ZooKeeper Data Mutation
●   Curator Integration
●   Rich REST API
A library of extensions and utilities that enhance Google Guice to provide:

●   Classpath scanning and automatic binding
●   Lifecycle management
●   Configuration to field mapping
●   Field validation
●   Parallelized object warmup
●   Lazy singleton
●   Fine grained, more concurrent singleton
●   Generic binding annotations
BLITZ4j
●   At Netflix
       ●   Billions of log lines per day
       ●   BI reporting, Monitoring, Debugging
       ●   Log4j for several years

●   What we faced?
     ●    Traffic increased – per instance logging increased
     ●    Contentions in logging
     ●    Impact in application response time
     ●    Deadlocks during reconfiguration

●   What is wrong with Log4j?
     ●     Strict locking model
     ●     Synchronization semantics everywhere
     ●     Impacting application response for logging a few lines?

●   What is Blitz4j?
     ●     Seamlessly replace all contention points
     ●     Decouple logging and application
     ●     Asynchronous appender – optimized, configurable
     ●     Dynamic configurability

●   How can your application benefit?
      ●   Does your application use log4j and logs heavily?
      ●   Immediate performance boost
      ●   Include blitz4j in classpath and couple of lines of configuration
EUREKA
●   REST service
       ● Primarily useful in the AWS cloud
       ●  Find other middle-tier services in the cloud
       ● Service -farm of instances providing functionality
       ●  identified by well known name


●   Why discover other services?
       ● Services find other services to interact - midde tier
       ● In AWS cloud, this communication can be tricky
       ● Instances come and go, ASG scales up/down
       ● Interacting services should be aware of this
       ● ELB can track this – but exposes internet traffic
       ● DNS can discover services – but cannot maintain automatically
       ● Eureka tracks this information and relays to all communicating services


●   What does Eureka provide?
       ●  Finding instances for middle-tier communication and loadbalancing
       ●  Other management activities - take instances in/out of live traffic
       ●  Share application-specific metadata between services
       ●  Built-in Resilience to network partitions, zone failures,eureka peer outages


    VMore about Eureka and Blitz4j - Visit us at the booth
Ribbon

Inter-process communication library with software load balancers and
client
 ● Cornerstone of Netflix Internal Web Services (NIWS), a Service Oriented
     Architecture
 ● Multiple built-in load balancing schemes
      ○ round robin, response time weighted, circuit breaker enabled
 ● Cloud ready
      ○ Integration with Eureka to provide dynamic server pools in AWS
      ○ AWS specific features - zone affinity, zone avoidance, connection
         priming
 ● Highly configurable JSR 311 based REST Client
 ● Coming soon
      ○ Annotation based provider for easy serialization/deserialization and
         cache support
      ○ SLA measurement for clients
      ○ Response cache for REST client
      ○ Asynchronous/batch operation for REST client
Archaius
Archaius is a dynamic configuration library

● Enable configuration change at runtime without restarting
● Framework to poll configuration source or listen to external property
  related events
● Supports configuration sources from generic URLs, JDBC, Amazon
  DynamoDB, ZooKeeper and jCloud
● Central place to organize properties into "buckets" by their nature
  and priorities
● Coming soon
   ○ Service that manage properties with multiple dimensions
   ○ Property Management UI
   ○ Property validation and change notification
Astyanax                         /əˈstaɪ.ənæks/
●   Cassandra Java Client Library - Higher level fluent API
●   Connection Pool
     ○   Bag, Round Robin, Token Aware, Rack aware
     ○   Connection Priming
     ○   Failover + Retry
     ○   Latency optimization
●   Optimized for running in the cloud
     ○   Node discovery
     ○   Monitoring
     ○   Metrics
●   Recipes - Common Cassandra Data Models
     ○   Entity Mapping
     ○   Message Queue (w/ Quartz like scheduling)
     ○   All rows reader with checkpoints
     ○   Distributed lock
     ○   Large object store
Priam - Jason Brown (@jasobrown)




 - Coprocess for running cassandra in ec2
    - backup & recovery
    - configuration
    - token management (*)
Cassandra virtual nodes
- new feature in c* 1.2
    - multiple, non-contiguous shards per instance

- simplifies operations for growing / shrinking
     c * cluster
CassJMeter
- plugin for Apache JMeter
- load testing cassandra
- swappable clients
    - astyanax
    - hector
    - fat client
Edda
● REST Webservice
● Crawls Amazon's AWS APIs
  ○ Stores results as versioned JSON docs
● Dynamic Querying

$ curl "http://edda/api/v2/view/instances;publicIpAddress=1.2.3.4"
["i-012345678b"]


● View History (resources that no longer exist)

$ curl "http://edda/api/v2/view/instances;publicIpAddress=1.2.3.4;_since=0"
["i-0123456789","i-012345678a","i-012345678b"]


● View Changes (diff over time of a resource)
Founder of the Netflix Simian Army
The Netflix Simian Army
• Chaos Monkey        • Circus Monkey
• Chaos Gorilla       • Doctor Monkey
• Latency Monkey      • Howler Monkey
• Janitor Monkey      • Security Monkey
• Conformity Monkey   • Chaos Kong
                      • Efficiency Monkey
30
99.99%        = 99.7% uptime
Turbine
Metrics Stream Aggregator




        Puneet Oberai
         API Platform
●   Low latency streaming infrastructure

●   Pluggable Cloud Instance Discovery
    ●   Config based (Use Archaius)
    ●   File system
    ●   Eureka Plugin


●   Data agnostic
Rx Java
Functional Reactive Programming
What do these ops have in common?
● Query for all videos that a Netflix member
  has rated >= 4
● Drag and Drop event
They're both queries.
Two Design Patterns

   Iterator             Observer

● next()              ● update(item)
● hasNext()           ● ???
● throw ex            ● ???
Two Design Patterns

   Iterator             Observer

● next()              ● onNext(item)
● hasNext()           ● onCompleted()
● throw ex            ● onError(ex)
Example: Videos with Rating >= 4.0


Iterable<Video> videosWithHighRating =
    netflixMember.getVideoLists().
         map({
             Iterable<Video> videoList ->
                  return videoList.
                      filter({ Video video -> video.getRating() >= 4.0 });
         }).
         merge();
Example: Drag Event
Observable<MouseEvent> mouseDowns = // convert a legacy Observable
Observable<MouseEvent> mouseMoves = // ...
Observable<MouseEvent> mouseUps = // ...

Observable<MouseEvent> mouseDrags =
    mouseDowns.
         map({
             MouseEvent mouseDownEvent ->
                  return mouseMoves.
                      takeUntil(mouseUps);
         }).
         merge();
Spin Locks



               Dead Locks
    Threads
       Observable
              1.   map
Semaphores
              2.   filter
              3.   merge
              4.   reduce
Race Conditions
              5.   zip
@AsgardOSS

More Related Content

What's hot

Optimizing {Java} Application Performance on Kubernetes
Optimizing {Java} Application Performance on KubernetesOptimizing {Java} Application Performance on Kubernetes
Optimizing {Java} Application Performance on Kubernetes
Dinakar Guniguntala
 
Erlang on OSv
Erlang on OSvErlang on OSv
Erlang on OSv
Zvi Avraham
 
(PFC306) Performance Tuning Amazon EC2 Instances | AWS re:Invent 2014
(PFC306) Performance Tuning Amazon EC2 Instances | AWS re:Invent 2014(PFC306) Performance Tuning Amazon EC2 Instances | AWS re:Invent 2014
(PFC306) Performance Tuning Amazon EC2 Instances | AWS re:Invent 2014
Amazon Web Services
 
Apache Gobblin: Bridging Batch and Streaming Data Integration. Big Data Meetu...
Apache Gobblin: Bridging Batch and Streaming Data Integration. Big Data Meetu...Apache Gobblin: Bridging Batch and Streaming Data Integration. Big Data Meetu...
Apache Gobblin: Bridging Batch and Streaming Data Integration. Big Data Meetu...
Shirshanka Das
 
OpenStack HA
OpenStack HAOpenStack HA
OpenStack HA
Kenneth Hui
 
Why you’re going to fail running java on docker!
Why you’re going to fail running java on docker!Why you’re going to fail running java on docker!
Why you’re going to fail running java on docker!
Red Hat Developers
 
(WEB401) Optimizing Your Web Server on AWS | AWS re:Invent 2014
(WEB401) Optimizing Your Web Server on AWS | AWS re:Invent 2014(WEB401) Optimizing Your Web Server on AWS | AWS re:Invent 2014
(WEB401) Optimizing Your Web Server on AWS | AWS re:Invent 2014
Amazon Web Services
 
CPN302 your-linux-ami-optimization-and-performance
CPN302 your-linux-ami-optimization-and-performanceCPN302 your-linux-ami-optimization-and-performance
CPN302 your-linux-ami-optimization-and-performance
Coburn Watson
 
Integrating Puppet with Cloud Infrastructures-Remco Overdijk
Integrating Puppet with Cloud Infrastructures-Remco OverdijkIntegrating Puppet with Cloud Infrastructures-Remco Overdijk
Integrating Puppet with Cloud Infrastructures-Remco Overdijk
MaxServ
 
Openstack study-nova-02
Openstack study-nova-02Openstack study-nova-02
Openstack study-nova-02
Jinho Shin
 
Lessons from managing a Pulsar cluster (Nutanix)
Lessons from managing a Pulsar cluster (Nutanix)Lessons from managing a Pulsar cluster (Nutanix)
Lessons from managing a Pulsar cluster (Nutanix)
StreamNative
 
Tuning kafka pipelines
Tuning kafka pipelinesTuning kafka pipelines
Tuning kafka pipelines
Sumant Tambe
 
Docker.io
Docker.ioDocker.io
DevEx | there’s no place like k3s
DevEx | there’s no place like k3sDevEx | there’s no place like k3s
DevEx | there’s no place like k3s
Haggai Philip Zagury
 
Introduction to ZooKeeper - TriHUG May 22, 2012
Introduction to ZooKeeper - TriHUG May 22, 2012Introduction to ZooKeeper - TriHUG May 22, 2012
Introduction to ZooKeeper - TriHUG May 22, 2012
mumrah
 
EVCache at Netflix
EVCache at NetflixEVCache at Netflix
EVCache at Netflix
Shashi Shekar Madappa
 
Distributed Systems explained (with NodeJS) - Bruno Bossola, JUG Torino
Distributed Systems explained (with NodeJS) - Bruno Bossola, JUG TorinoDistributed Systems explained (with NodeJS) - Bruno Bossola, JUG Torino
Distributed Systems explained (with NodeJS) - Bruno Bossola, JUG Torino
Codemotion Tel Aviv
 
A fun cup of joe with open liberty
A fun cup of joe with open libertyA fun cup of joe with open liberty
A fun cup of joe with open liberty
Andy Mauer
 
Introduction openstack-meetup-nov-28
Introduction openstack-meetup-nov-28Introduction openstack-meetup-nov-28
Introduction openstack-meetup-nov-28
Sadique Puthen
 
[오픈소스컨설팅] EFK Stack 소개와 설치 방법
[오픈소스컨설팅] EFK Stack 소개와 설치 방법[오픈소스컨설팅] EFK Stack 소개와 설치 방법
[오픈소스컨설팅] EFK Stack 소개와 설치 방법
Open Source Consulting
 

What's hot (20)

Optimizing {Java} Application Performance on Kubernetes
Optimizing {Java} Application Performance on KubernetesOptimizing {Java} Application Performance on Kubernetes
Optimizing {Java} Application Performance on Kubernetes
 
Erlang on OSv
Erlang on OSvErlang on OSv
Erlang on OSv
 
(PFC306) Performance Tuning Amazon EC2 Instances | AWS re:Invent 2014
(PFC306) Performance Tuning Amazon EC2 Instances | AWS re:Invent 2014(PFC306) Performance Tuning Amazon EC2 Instances | AWS re:Invent 2014
(PFC306) Performance Tuning Amazon EC2 Instances | AWS re:Invent 2014
 
Apache Gobblin: Bridging Batch and Streaming Data Integration. Big Data Meetu...
Apache Gobblin: Bridging Batch and Streaming Data Integration. Big Data Meetu...Apache Gobblin: Bridging Batch and Streaming Data Integration. Big Data Meetu...
Apache Gobblin: Bridging Batch and Streaming Data Integration. Big Data Meetu...
 
OpenStack HA
OpenStack HAOpenStack HA
OpenStack HA
 
Why you’re going to fail running java on docker!
Why you’re going to fail running java on docker!Why you’re going to fail running java on docker!
Why you’re going to fail running java on docker!
 
(WEB401) Optimizing Your Web Server on AWS | AWS re:Invent 2014
(WEB401) Optimizing Your Web Server on AWS | AWS re:Invent 2014(WEB401) Optimizing Your Web Server on AWS | AWS re:Invent 2014
(WEB401) Optimizing Your Web Server on AWS | AWS re:Invent 2014
 
CPN302 your-linux-ami-optimization-and-performance
CPN302 your-linux-ami-optimization-and-performanceCPN302 your-linux-ami-optimization-and-performance
CPN302 your-linux-ami-optimization-and-performance
 
Integrating Puppet with Cloud Infrastructures-Remco Overdijk
Integrating Puppet with Cloud Infrastructures-Remco OverdijkIntegrating Puppet with Cloud Infrastructures-Remco Overdijk
Integrating Puppet with Cloud Infrastructures-Remco Overdijk
 
Openstack study-nova-02
Openstack study-nova-02Openstack study-nova-02
Openstack study-nova-02
 
Lessons from managing a Pulsar cluster (Nutanix)
Lessons from managing a Pulsar cluster (Nutanix)Lessons from managing a Pulsar cluster (Nutanix)
Lessons from managing a Pulsar cluster (Nutanix)
 
Tuning kafka pipelines
Tuning kafka pipelinesTuning kafka pipelines
Tuning kafka pipelines
 
Docker.io
Docker.ioDocker.io
Docker.io
 
DevEx | there’s no place like k3s
DevEx | there’s no place like k3sDevEx | there’s no place like k3s
DevEx | there’s no place like k3s
 
Introduction to ZooKeeper - TriHUG May 22, 2012
Introduction to ZooKeeper - TriHUG May 22, 2012Introduction to ZooKeeper - TriHUG May 22, 2012
Introduction to ZooKeeper - TriHUG May 22, 2012
 
EVCache at Netflix
EVCache at NetflixEVCache at Netflix
EVCache at Netflix
 
Distributed Systems explained (with NodeJS) - Bruno Bossola, JUG Torino
Distributed Systems explained (with NodeJS) - Bruno Bossola, JUG TorinoDistributed Systems explained (with NodeJS) - Bruno Bossola, JUG Torino
Distributed Systems explained (with NodeJS) - Bruno Bossola, JUG Torino
 
A fun cup of joe with open liberty
A fun cup of joe with open libertyA fun cup of joe with open liberty
A fun cup of joe with open liberty
 
Introduction openstack-meetup-nov-28
Introduction openstack-meetup-nov-28Introduction openstack-meetup-nov-28
Introduction openstack-meetup-nov-28
 
[오픈소스컨설팅] EFK Stack 소개와 설치 방법
[오픈소스컨설팅] EFK Stack 소개와 설치 방법[오픈소스컨설팅] EFK Stack 소개와 설치 방법
[오픈소스컨설팅] EFK Stack 소개와 설치 방법
 

Similar to NetflixOSS Open House Lightning talks

Comparison between zookeeper, etcd 3 and other distributed coordination systems
Comparison between zookeeper, etcd 3 and other distributed coordination systemsComparison between zookeeper, etcd 3 and other distributed coordination systems
Comparison between zookeeper, etcd 3 and other distributed coordination systems
Imesha Sudasingha
 
Microservices and modularity with java
Microservices and modularity with javaMicroservices and modularity with java
Microservices and modularity with java
DPC Consulting Ltd
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetes
Rishabh Indoria
 
Developing Microservices using Spring - Beginner's Guide
Developing Microservices using Spring - Beginner's GuideDeveloping Microservices using Spring - Beginner's Guide
Developing Microservices using Spring - Beginner's Guide
Mohanraj Thirumoorthy
 
Infrastructure at Scale: Apache Kafka, Twitter Storm & Elastic Search (ARC303...
Infrastructure at Scale: Apache Kafka, Twitter Storm & Elastic Search (ARC303...Infrastructure at Scale: Apache Kafka, Twitter Storm & Elastic Search (ARC303...
Infrastructure at Scale: Apache Kafka, Twitter Storm & Elastic Search (ARC303...
Amazon Web Services
 
AWS re:Invent presentation: Unmeltable Infrastructure at Scale by Loggly
AWS re:Invent presentation: Unmeltable Infrastructure at Scale by Loggly AWS re:Invent presentation: Unmeltable Infrastructure at Scale by Loggly
AWS re:Invent presentation: Unmeltable Infrastructure at Scale by Loggly
SolarWinds Loggly
 
2016_04_04_CNI_Spring_Meeting_Microservices
2016_04_04_CNI_Spring_Meeting_Microservices2016_04_04_CNI_Spring_Meeting_Microservices
2016_04_04_CNI_Spring_Meeting_MicroservicesJason Varghese
 
Scala, ECS, Docker: Delayed Execution @Coursera
Scala, ECS, Docker: Delayed Execution @CourseraScala, ECS, Docker: Delayed Execution @Coursera
Scala, ECS, Docker: Delayed Execution @Coursera
C4Media
 
Como creamos QuestDB Cloud, un SaaS basado en Kubernetes alrededor de QuestDB...
Como creamos QuestDB Cloud, un SaaS basado en Kubernetes alrededor de QuestDB...Como creamos QuestDB Cloud, un SaaS basado en Kubernetes alrededor de QuestDB...
Como creamos QuestDB Cloud, un SaaS basado en Kubernetes alrededor de QuestDB...
javier ramirez
 
Introduction to apache kafka
Introduction to apache kafkaIntroduction to apache kafka
Introduction to apache kafka
Samuel Kerrien
 
QConSF18 - Disenchantment: Netflix Titus, its Feisty Team, and Daemons
QConSF18 - Disenchantment: Netflix Titus, its Feisty Team, and DaemonsQConSF18 - Disenchantment: Netflix Titus, its Feisty Team, and Daemons
QConSF18 - Disenchantment: Netflix Titus, its Feisty Team, and Daemons
aspyker
 
Architectures, Frameworks and Infrastructure
Architectures, Frameworks and InfrastructureArchitectures, Frameworks and Infrastructure
Architectures, Frameworks and Infrastructureharendra_pathak
 
Ippevent : openshift Introduction
Ippevent : openshift IntroductionIppevent : openshift Introduction
Ippevent : openshift Introduction
kanedafromparis
 
What’s new in WSO2 Enterprise Integrator 6.6
What’s new in WSO2 Enterprise Integrator 6.6What’s new in WSO2 Enterprise Integrator 6.6
What’s new in WSO2 Enterprise Integrator 6.6
WSO2
 
Triangle Devops Meetup 10/2015
Triangle Devops Meetup 10/2015Triangle Devops Meetup 10/2015
Triangle Devops Meetup 10/2015
aspyker
 
Docker & ECS: Secure Nearline Execution
Docker & ECS: Secure Nearline ExecutionDocker & ECS: Secure Nearline Execution
Docker & ECS: Secure Nearline Execution
Brennan Saeta
 
Architecting for Microservices Part 2
Architecting for Microservices Part 2Architecting for Microservices Part 2
Architecting for Microservices Part 2
Elana Krasner
 
NetflixOSS Meetup season 3 episode 1
NetflixOSS Meetup season 3 episode 1NetflixOSS Meetup season 3 episode 1
NetflixOSS Meetup season 3 episode 1
Ruslan Meshenberg
 
Kafka Summit NYC 2017 - Scalable Real-Time Complex Event Processing @ Uber
Kafka Summit NYC 2017 - Scalable Real-Time Complex Event Processing @ UberKafka Summit NYC 2017 - Scalable Real-Time Complex Event Processing @ Uber
Kafka Summit NYC 2017 - Scalable Real-Time Complex Event Processing @ Uber
confluent
 

Similar to NetflixOSS Open House Lightning talks (20)

Comparison between zookeeper, etcd 3 and other distributed coordination systems
Comparison between zookeeper, etcd 3 and other distributed coordination systemsComparison between zookeeper, etcd 3 and other distributed coordination systems
Comparison between zookeeper, etcd 3 and other distributed coordination systems
 
Microservices and modularity with java
Microservices and modularity with javaMicroservices and modularity with java
Microservices and modularity with java
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetes
 
Developing Microservices using Spring - Beginner's Guide
Developing Microservices using Spring - Beginner's GuideDeveloping Microservices using Spring - Beginner's Guide
Developing Microservices using Spring - Beginner's Guide
 
Infrastructure at Scale: Apache Kafka, Twitter Storm & Elastic Search (ARC303...
Infrastructure at Scale: Apache Kafka, Twitter Storm & Elastic Search (ARC303...Infrastructure at Scale: Apache Kafka, Twitter Storm & Elastic Search (ARC303...
Infrastructure at Scale: Apache Kafka, Twitter Storm & Elastic Search (ARC303...
 
AWS re:Invent presentation: Unmeltable Infrastructure at Scale by Loggly
AWS re:Invent presentation: Unmeltable Infrastructure at Scale by Loggly AWS re:Invent presentation: Unmeltable Infrastructure at Scale by Loggly
AWS re:Invent presentation: Unmeltable Infrastructure at Scale by Loggly
 
2016_04_04_CNI_Spring_Meeting_Microservices
2016_04_04_CNI_Spring_Meeting_Microservices2016_04_04_CNI_Spring_Meeting_Microservices
2016_04_04_CNI_Spring_Meeting_Microservices
 
Scala, ECS, Docker: Delayed Execution @Coursera
Scala, ECS, Docker: Delayed Execution @CourseraScala, ECS, Docker: Delayed Execution @Coursera
Scala, ECS, Docker: Delayed Execution @Coursera
 
Como creamos QuestDB Cloud, un SaaS basado en Kubernetes alrededor de QuestDB...
Como creamos QuestDB Cloud, un SaaS basado en Kubernetes alrededor de QuestDB...Como creamos QuestDB Cloud, un SaaS basado en Kubernetes alrededor de QuestDB...
Como creamos QuestDB Cloud, un SaaS basado en Kubernetes alrededor de QuestDB...
 
Introduction to apache kafka
Introduction to apache kafkaIntroduction to apache kafka
Introduction to apache kafka
 
QConSF18 - Disenchantment: Netflix Titus, its Feisty Team, and Daemons
QConSF18 - Disenchantment: Netflix Titus, its Feisty Team, and DaemonsQConSF18 - Disenchantment: Netflix Titus, its Feisty Team, and Daemons
QConSF18 - Disenchantment: Netflix Titus, its Feisty Team, and Daemons
 
Architectures, Frameworks and Infrastructure
Architectures, Frameworks and InfrastructureArchitectures, Frameworks and Infrastructure
Architectures, Frameworks and Infrastructure
 
Ippevent : openshift Introduction
Ippevent : openshift IntroductionIppevent : openshift Introduction
Ippevent : openshift Introduction
 
What’s new in WSO2 Enterprise Integrator 6.6
What’s new in WSO2 Enterprise Integrator 6.6What’s new in WSO2 Enterprise Integrator 6.6
What’s new in WSO2 Enterprise Integrator 6.6
 
Triangle Devops Meetup 10/2015
Triangle Devops Meetup 10/2015Triangle Devops Meetup 10/2015
Triangle Devops Meetup 10/2015
 
Docker & ECS: Secure Nearline Execution
Docker & ECS: Secure Nearline ExecutionDocker & ECS: Secure Nearline Execution
Docker & ECS: Secure Nearline Execution
 
Architecting for Microservices Part 2
Architecting for Microservices Part 2Architecting for Microservices Part 2
Architecting for Microservices Part 2
 
Java concurrency
Java concurrencyJava concurrency
Java concurrency
 
NetflixOSS Meetup season 3 episode 1
NetflixOSS Meetup season 3 episode 1NetflixOSS Meetup season 3 episode 1
NetflixOSS Meetup season 3 episode 1
 
Kafka Summit NYC 2017 - Scalable Real-Time Complex Event Processing @ Uber
Kafka Summit NYC 2017 - Scalable Real-Time Complex Event Processing @ UberKafka Summit NYC 2017 - Scalable Real-Time Complex Event Processing @ Uber
Kafka Summit NYC 2017 - Scalable Real-Time Complex Event Processing @ Uber
 

More from Ruslan Meshenberg

NetflixOSS Meetup season 3 episode 2
NetflixOSS Meetup season 3 episode 2NetflixOSS Meetup season 3 episode 2
NetflixOSS Meetup season 3 episode 2
Ruslan Meshenberg
 
Netflix oss past-present-future
Netflix oss   past-present-futureNetflix oss   past-present-future
Netflix oss past-present-future
Ruslan Meshenberg
 
Dev309 from asgard to zuul - netflix oss-final
Dev309  from asgard to zuul - netflix oss-finalDev309  from asgard to zuul - netflix oss-final
Dev309 from asgard to zuul - netflix oss-final
Ruslan Meshenberg
 
NetflixOSS season 2 episode 2 - Reactive / Async
NetflixOSS   season 2 episode 2 - Reactive / AsyncNetflixOSS   season 2 episode 2 - Reactive / Async
NetflixOSS season 2 episode 2 - Reactive / Async
Ruslan Meshenberg
 
OSS Think Tank - NetflixOSS - OSS as a Competitive Differentiator
OSS Think Tank - NetflixOSS - OSS as a Competitive DifferentiatorOSS Think Tank - NetflixOSS - OSS as a Competitive Differentiator
OSS Think Tank - NetflixOSS - OSS as a Competitive Differentiator
Ruslan Meshenberg
 
Netflix oss season 2 episode 1 - meetup Lightning talks
Netflix oss   season 2 episode 1 - meetup Lightning talksNetflix oss   season 2 episode 1 - meetup Lightning talks
Netflix oss season 2 episode 1 - meetup Lightning talksRuslan Meshenberg
 
Arc305 how netflix leverages multiple regions to increase availability an i...
Arc305 how netflix leverages multiple regions to increase availability   an i...Arc305 how netflix leverages multiple regions to increase availability   an i...
Arc305 how netflix leverages multiple regions to increase availability an i...
Ruslan Meshenberg
 
Svc 202-netflix-open-source
Svc 202-netflix-open-sourceSvc 202-netflix-open-source
Svc 202-netflix-open-source
Ruslan Meshenberg
 
Netflix oss season 1 episode 3
Netflix oss season 1 episode 3 Netflix oss season 1 episode 3
Netflix oss season 1 episode 3
Ruslan Meshenberg
 
NetflixOSS meetup lightning talks and roadmap
NetflixOSS meetup lightning talks and roadmapNetflixOSS meetup lightning talks and roadmap
NetflixOSS meetup lightning talks and roadmapRuslan Meshenberg
 
re:Invent 2012 Optimizing Cassandra
re:Invent 2012 Optimizing Cassandrare:Invent 2012 Optimizing Cassandra
re:Invent 2012 Optimizing Cassandra
Ruslan Meshenberg
 
The Netflix Open Source Platform
The Netflix Open Source PlatformThe Netflix Open Source Platform
The Netflix Open Source Platform
Ruslan Meshenberg
 

More from Ruslan Meshenberg (12)

NetflixOSS Meetup season 3 episode 2
NetflixOSS Meetup season 3 episode 2NetflixOSS Meetup season 3 episode 2
NetflixOSS Meetup season 3 episode 2
 
Netflix oss past-present-future
Netflix oss   past-present-futureNetflix oss   past-present-future
Netflix oss past-present-future
 
Dev309 from asgard to zuul - netflix oss-final
Dev309  from asgard to zuul - netflix oss-finalDev309  from asgard to zuul - netflix oss-final
Dev309 from asgard to zuul - netflix oss-final
 
NetflixOSS season 2 episode 2 - Reactive / Async
NetflixOSS   season 2 episode 2 - Reactive / AsyncNetflixOSS   season 2 episode 2 - Reactive / Async
NetflixOSS season 2 episode 2 - Reactive / Async
 
OSS Think Tank - NetflixOSS - OSS as a Competitive Differentiator
OSS Think Tank - NetflixOSS - OSS as a Competitive DifferentiatorOSS Think Tank - NetflixOSS - OSS as a Competitive Differentiator
OSS Think Tank - NetflixOSS - OSS as a Competitive Differentiator
 
Netflix oss season 2 episode 1 - meetup Lightning talks
Netflix oss   season 2 episode 1 - meetup Lightning talksNetflix oss   season 2 episode 1 - meetup Lightning talks
Netflix oss season 2 episode 1 - meetup Lightning talks
 
Arc305 how netflix leverages multiple regions to increase availability an i...
Arc305 how netflix leverages multiple regions to increase availability   an i...Arc305 how netflix leverages multiple regions to increase availability   an i...
Arc305 how netflix leverages multiple regions to increase availability an i...
 
Svc 202-netflix-open-source
Svc 202-netflix-open-sourceSvc 202-netflix-open-source
Svc 202-netflix-open-source
 
Netflix oss season 1 episode 3
Netflix oss season 1 episode 3 Netflix oss season 1 episode 3
Netflix oss season 1 episode 3
 
NetflixOSS meetup lightning talks and roadmap
NetflixOSS meetup lightning talks and roadmapNetflixOSS meetup lightning talks and roadmap
NetflixOSS meetup lightning talks and roadmap
 
re:Invent 2012 Optimizing Cassandra
re:Invent 2012 Optimizing Cassandrare:Invent 2012 Optimizing Cassandra
re:Invent 2012 Optimizing Cassandra
 
The Netflix Open Source Platform
The Netflix Open Source PlatformThe Netflix Open Source Platform
The Netflix Open Source Platform
 

Recently uploaded

When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
Bhaskar Mitra
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 

Recently uploaded (20)

When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 

NetflixOSS Open House Lightning talks

  • 1. NetflixOSS Open House Lightning talks
  • 2. Jordan Zimmerman @randgalt jzimmerman@netflix.com NetflixOSS projects I work on Jordan Zimmerman Netflix Platform Team jzimmerman@netflix.com @randgalt
  • 3. Correct ZooKeeper use is hard! ● Curator is a set of Java libraries that make using ZooKeeper much easier and enforce best practices. ● Curator is focused on the recipes: locks, leaders, etc. Most people interested in ZooKeeper don't need to be concerned with the details of connection management, etc. What they want is a simple way to use the recipes. ● Connection management, retries, recipes, best practices. ● Recipes! Leader Latch, Leader Election, Shared Reentrant Lock, Shared Lock, Shared Reentrant Read Write Lock, Shared Semaphore, Multi Shared Lock, Distributed Queue, Distributed Id Queue, Distributed Priority Queue, Distributed Delay Queue, Simple Distributed Queue, Barrier, Double Barrier, Shared counter, Distributed Atomic Long, Path Cache, Node Cache
  • 4. ZooKeeper Ops is very hard! ● Instance Monitoring ● Log Cleanup ● Backup/Restore ● Cluster-wide Configuration ● Rolling Ensemble Changes ● Automatic Instance Management ● Visualizer ● ZooKeeper Data Mutation ● Curator Integration ● Rich REST API
  • 5. A library of extensions and utilities that enhance Google Guice to provide: ● Classpath scanning and automatic binding ● Lifecycle management ● Configuration to field mapping ● Field validation ● Parallelized object warmup ● Lazy singleton ● Fine grained, more concurrent singleton ● Generic binding annotations
  • 6. BLITZ4j ● At Netflix ● Billions of log lines per day ● BI reporting, Monitoring, Debugging ● Log4j for several years ● What we faced? ● Traffic increased – per instance logging increased ● Contentions in logging ● Impact in application response time ● Deadlocks during reconfiguration ● What is wrong with Log4j? ● Strict locking model ● Synchronization semantics everywhere ● Impacting application response for logging a few lines? ● What is Blitz4j? ● Seamlessly replace all contention points ● Decouple logging and application ● Asynchronous appender – optimized, configurable ● Dynamic configurability ● How can your application benefit? ● Does your application use log4j and logs heavily? ● Immediate performance boost ● Include blitz4j in classpath and couple of lines of configuration
  • 7. EUREKA ● REST service ● Primarily useful in the AWS cloud ● Find other middle-tier services in the cloud ● Service -farm of instances providing functionality ● identified by well known name ● Why discover other services? ● Services find other services to interact - midde tier ● In AWS cloud, this communication can be tricky ● Instances come and go, ASG scales up/down ● Interacting services should be aware of this ● ELB can track this – but exposes internet traffic ● DNS can discover services – but cannot maintain automatically ● Eureka tracks this information and relays to all communicating services ● What does Eureka provide? ● Finding instances for middle-tier communication and loadbalancing ● Other management activities - take instances in/out of live traffic ● Share application-specific metadata between services ● Built-in Resilience to network partitions, zone failures,eureka peer outages VMore about Eureka and Blitz4j - Visit us at the booth
  • 8. Ribbon Inter-process communication library with software load balancers and client ● Cornerstone of Netflix Internal Web Services (NIWS), a Service Oriented Architecture ● Multiple built-in load balancing schemes ○ round robin, response time weighted, circuit breaker enabled ● Cloud ready ○ Integration with Eureka to provide dynamic server pools in AWS ○ AWS specific features - zone affinity, zone avoidance, connection priming ● Highly configurable JSR 311 based REST Client ● Coming soon ○ Annotation based provider for easy serialization/deserialization and cache support ○ SLA measurement for clients ○ Response cache for REST client ○ Asynchronous/batch operation for REST client
  • 9. Archaius Archaius is a dynamic configuration library ● Enable configuration change at runtime without restarting ● Framework to poll configuration source or listen to external property related events ● Supports configuration sources from generic URLs, JDBC, Amazon DynamoDB, ZooKeeper and jCloud ● Central place to organize properties into "buckets" by their nature and priorities ● Coming soon ○ Service that manage properties with multiple dimensions ○ Property Management UI ○ Property validation and change notification
  • 10. Astyanax /əˈstaɪ.ənæks/ ● Cassandra Java Client Library - Higher level fluent API ● Connection Pool ○ Bag, Round Robin, Token Aware, Rack aware ○ Connection Priming ○ Failover + Retry ○ Latency optimization ● Optimized for running in the cloud ○ Node discovery ○ Monitoring ○ Metrics ● Recipes - Common Cassandra Data Models ○ Entity Mapping ○ Message Queue (w/ Quartz like scheduling) ○ All rows reader with checkpoints ○ Distributed lock ○ Large object store
  • 11. Priam - Jason Brown (@jasobrown) - Coprocess for running cassandra in ec2 - backup & recovery - configuration - token management (*)
  • 12. Cassandra virtual nodes - new feature in c* 1.2 - multiple, non-contiguous shards per instance - simplifies operations for growing / shrinking c * cluster
  • 13. CassJMeter - plugin for Apache JMeter - load testing cassandra - swappable clients - astyanax - hector - fat client
  • 14. Edda ● REST Webservice ● Crawls Amazon's AWS APIs ○ Stores results as versioned JSON docs ● Dynamic Querying $ curl "http://edda/api/v2/view/instances;publicIpAddress=1.2.3.4" ["i-012345678b"] ● View History (resources that no longer exist) $ curl "http://edda/api/v2/view/instances;publicIpAddress=1.2.3.4;_since=0" ["i-0123456789","i-012345678a","i-012345678b"] ● View Changes (diff over time of a resource)
  • 15. Founder of the Netflix Simian Army
  • 16. The Netflix Simian Army • Chaos Monkey • Circus Monkey • Chaos Gorilla • Doctor Monkey • Latency Monkey • Howler Monkey • Janitor Monkey • Security Monkey • Conformity Monkey • Chaos Kong • Efficiency Monkey
  • 17.
  • 18. 30 99.99% = 99.7% uptime
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26. Turbine Metrics Stream Aggregator Puneet Oberai API Platform
  • 27.
  • 28. Low latency streaming infrastructure ● Pluggable Cloud Instance Discovery ● Config based (Use Archaius) ● File system ● Eureka Plugin ● Data agnostic
  • 30. What do these ops have in common? ● Query for all videos that a Netflix member has rated >= 4 ● Drag and Drop event
  • 32.
  • 33.
  • 34. Two Design Patterns Iterator Observer ● next() ● update(item) ● hasNext() ● ??? ● throw ex ● ???
  • 35. Two Design Patterns Iterator Observer ● next() ● onNext(item) ● hasNext() ● onCompleted() ● throw ex ● onError(ex)
  • 36. Example: Videos with Rating >= 4.0 Iterable<Video> videosWithHighRating = netflixMember.getVideoLists(). map({ Iterable<Video> videoList -> return videoList. filter({ Video video -> video.getRating() >= 4.0 }); }). merge();
  • 37. Example: Drag Event Observable<MouseEvent> mouseDowns = // convert a legacy Observable Observable<MouseEvent> mouseMoves = // ... Observable<MouseEvent> mouseUps = // ... Observable<MouseEvent> mouseDrags = mouseDowns. map({ MouseEvent mouseDownEvent -> return mouseMoves. takeUntil(mouseUps); }). merge();
  • 38. Spin Locks Dead Locks Threads Observable 1. map Semaphores 2. filter 3. merge 4. reduce Race Conditions 5. zip