Transcript
Page 1: Webinar: Building Blocks for the Future of Television

Building Blocks for the Future of Television

DataStax Webinar 5/6/2014Boris Wolf

Page 2: Webinar: Building Blocks for the Future of Television

Driving Innovation at CSV

Evangelize

InfrastructureCross Platform

Services

ExpandTV Platform / X1

ExtendHome Platform

Demonstrate

Syndicateto other platforms

Experiment

Page 3: Webinar: Building Blocks for the Future of Television

An entirely new cloud-based, personalized, and interactive TV experience.

X1 Platform Overview

Page 4: Webinar: Building Blocks for the Future of Television

Delivering anengaging, interactive, and immersive sports viewing experience.

X1 Sports App

Page 5: Webinar: Building Blocks for the Future of Television

Some Examples of C* Usage in X1

• DVR (recording history etc.)• Personalization• Preferences• CMB (message bus)

Page 6: Webinar: Building Blocks for the Future of Television

CMB – Cloud Message Bus

• CMB = CQS + CNS• An Open Source General Purpose High Throughput

Distributed Message Bus Infrastructure for the Cloud• Queuing and Notification Services• API compatible with AWS SQS/SNS• Built on C* and Redis

Page 7: Webinar: Building Blocks for the Future of Television

Receive()

Receive()

MM MReceive()

CQS – Queuing Service

Send(M)

M

M

Page 8: Webinar: Building Blocks for the Future of Television

T

http://…

http://…

http://…

CQS

SQS

CQS

Publish(M)

M

M

M

M

M

M

SubscribersCNS – Notification Service

Page 9: Webinar: Building Blocks for the Future of Television

CMB – Cloud Message Bus

• CMB = CQS + CNS• An Open Source General Purpose High Throughput

Distributed Message Bus Infrastructure for the Cloud• Queuing and Notification Services• API compatible with AWS SQS/SNS• Built on C* and Redis

Page 10: Webinar: Building Blocks for the Future of Television

CMB – Tradeoffs

• Guaranteed delivery (even if recipients loose messages!)

• Best effort ordering• Duplicates are possible on occasion

Page 11: Webinar: Building Blocks for the Future of Television
Page 12: Webinar: Building Blocks for the Future of Television

t=0

Receive()

Page 13: Webinar: Building Blocks for the Future of Television

t=0

VTO=30sec

Process()

Page 14: Webinar: Building Blocks for the Future of Television

t=5

VTO=25secDelete()

Page 15: Webinar: Building Blocks for the Future of Television

t=5

Page 16: Webinar: Building Blocks for the Future of Television
Page 17: Webinar: Building Blocks for the Future of Television

t=0

Receive()

Receive()

Page 18: Webinar: Building Blocks for the Future of Television

t=0

VTO=30sec

Receive()

Process()

Page 19: Webinar: Building Blocks for the Future of Television

t=5

VTO=25sec

Process()

Receive()

Page 20: Webinar: Building Blocks for the Future of Television

t=5

VTO=25sec

Receive()

Page 21: Webinar: Building Blocks for the Future of Television

t=25

VTO=5sec

Receive()

Page 22: Webinar: Building Blocks for the Future of Television

t=30

Receive()

Page 23: Webinar: Building Blocks for the Future of Television

t=30

VTO=30secProcess()

Page 24: Webinar: Building Blocks for the Future of Television

t=35

Delete()

VTO=25sec

Page 25: Webinar: Building Blocks for the Future of Television

t=35

Page 26: Webinar: Building Blocks for the Future of Television

SQS / SNS API CompatibilityAmazonSQSClient sqs = new AmazonSQSClient(new BasicAWSCredentials("Z2DV…", "bH2U…."));

sqs.setEndpoint("http://localhost:6059"); // create queue String queueUrl = sqs.createQueue(new CreateQueueRequest("myqueue")).getQueueUrl(); // send message sqs.sendMessage(new SendMessageRequest(queueUrl, "my message")); // receive messages List<Message> messages = sqs.receiveMessage(new ReceiveMessageRequest(queueUrl)).getMessages(); for (Message m : messages) {

System.out.println(m.getBody());}

Page 27: Webinar: Building Blocks for the Future of Television

CMB Web UI

Page 28: Webinar: Building Blocks for the Future of Television

• We actually do: As fail-over option, for proto-typing, …

• CMB as Open Source alternative to avoid vendor lock-in

Why not just use AWS SQS/SNS?

Page 29: Webinar: Building Blocks for the Future of Television

CMB – Cloud Message Bus

• CMB = CQS + CNS• An Open Source General Purpose High Throughput

Distributed Message Bus Infrastructure for the Cloud• Queuing and Notification Services• API compatible with AWS SQS/SNS• Built on C* and Redis

Page 30: Webinar: Building Blocks for the Future of Television

CQS Implementation - C* and RedisCMB API Nodes• Embedded Jetty implementing SQS and SNS APIsCassandra• Cross-DC persistence and replication• Proven horizontal scalabilityRedis• Avoid duplicates• Help with best effort ordering• Handle Visibility Timeout (VTO)

Page 31: Webinar: Building Blocks for the Future of Television

Case Study X1 DVR

Scheduler WS

Recorder WS X1 STB

XRE

CQS

CQS

XRE

Worker Service

X1 STBX1 STB

Page 32: Webinar: Building Blocks for the Future of Television

Deployment details:• 2 DC Deployment, 8-Node C* Ring in each (local

quorum reads and writes)• 10 Redis Shards (each DC)• 12 CMB Nodes (each DC)

Case Study X1 DVR

Page 33: Webinar: Building Blocks for the Future of Television

SQS APIs Params

SendMessage() MessageBody=…

ReceiveMessage() MaxNumberOfMessages=10VisibilityTimeout=4WaitTimeSeconds=20

DeleteMessage() ReceiptHandle=1383970619866:0:ed006cabb22dcc80e44f1967ac259f3b_0_65:2902396753389907544:-7877921303127914669

Case Study X1 DVR

Page 34: Webinar: Building Blocks for the Future of Television

Case Study X1 DVR

Page 35: Webinar: Building Blocks for the Future of Television

• Follow SQS/SNS APIs as they evolve (Dead Letter Queue, Mobile Push)

• C* 2.0 features, CQL3, binary protocol drivers • Make operations / scaling / capacity planning

easier• Offer CMB as a Service

Opportunities for Improvement

Page 36: Webinar: Building Blocks for the Future of Television

Thank You!

http://github.com/Comcast/cmb

http://groups.google.com/forum/#!forum/cmb-user-forum

[email protected]


Recommended