cool stuff we use cassandra on

19
Presented by Michael Smyers Co-founder and SVP of Architecture Apache Cassandra at Zipwhip: Messaging with Multi Datacenter and Carrier-Grade Uptime Cool stuff we use Cassandra on

Upload: planet-cassandra

Post on 15-Jan-2015

370 views

Category:

Documents


1 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Cool stuff we use Cassandra on

Presented by Michael SmyersCo-founder and SVP of Architecture

Apache Cassandra at Zipwhip: Messaging with

Multi Datacenter and Carrier-Grade Uptime

Cool stuff we use Cassandra on

Page 2: Cool stuff we use Cassandra on

©2013 Zipwhip

WHO IS ZIPWHIP?

Zipwhip has moved text messaging to the cloud.

Text messaging is no longer just for mobile phones. You can now send and receive text messages on your existing landline or toll free number using Zipwhip.

On April 10th, 2013, Zipwhip officially became the world’s first text carrier by adding a second carrier, a text carrier, to a business’s existing landline or toll free number.

Page 3: Cool stuff we use Cassandra on

©2013 Zipwhip 03

CURRENT CARRIER CUSTOMERS

Page 4: Cool stuff we use Cassandra on

©2013 Zipwhip

CARRIER-GRADE CLOUD TEXTING

Zipwhip peers with the wireless carrier ecosystem passing traffic freely between carrier networks and your business landline or toll free numbers.

We are servicing nearly 20 million users and Zipwhip handles nearly 1 billion texts per month.

Zipwhip is a carrier-grade cloud texting platform.

Wireless Operator

Inter-Carrier Ecosystem Zipwhip Cloud Texting

Inter-Carrier Texting

Ecosystem

AT&T

Sprint

T-Mobile

C Spire

Tracfone

U.S. Cellular

Verizon

Zipwhip Platform

The landline or toll free phone numbers are placed into the core routing tables for text

messaging.

The text messages flow in and out of

Zipwhip’s platform.

Page 5: Cool stuff we use Cassandra on

©2013 Zipwhip

APPS FOR ANY DEVICE AND OPERATING SYSTEM

Page 6: Cool stuff we use Cassandra on

©2013 Zipwhip

TWO-WAY CONVERSATION TEXTING APPLICATION

Zipwhips extensive cloud platform includes:

Unlimited texting Unlimited storage SMS cloud sync Full suite of apps Delivery receipt Multiple user log in

Coming Soon:MMS & Caller ID HTML

Page 7: Cool stuff we use Cassandra on

©2013 Zipwhip

WHAT ARE THE USE-CASES FOR CASSANDRA?

Signal delivery to all connected devices

- Event Sync: When you delete a message, the change cascades to all devices

- Privacy: Who is getting a copy of my texts?

Message (sms) storage (coming soon)

Page 8: Cool stuff we use Cassandra on

©2013 Zipwhip

THE SIGNAL SERVER

Always-on connection to many devices

Devices maintain “presence”

Active-active datacenter

Scale horizontally

Nameless nodes

Zero configuration

Page 9: Cool stuff we use Cassandra on

©2013 Zipwhip

HOW DO YOU SCALE THE SYSTEM?

Add another Cassandra node (self discovery)

Add another Signal Server node (self discovery)

Binds into central ActiveMQ (JMS)

Binds into central Zookeeper

Binds into central Cassandra

Page 10: Cool stuff we use Cassandra on

©2013 Zipwhip

SPECIFIC CASSANDRA USE-CASES

Topology: Who cares about what?

Timeline: Ordered events that are to be delivered

Page 11: Cool stuff we use Cassandra on

©2013 Zipwhip

SUBSCRIPTION TOPOLOGY – WHO CARES ABOUT WHAT?

This stuff is only written when they first connect

Page 12: Cool stuff we use Cassandra on

©2013 Zipwhip 12

SUBSCRIPTION TOPOLOGY

ChannelAddressChannelAddressChannelAddress

ClientAddress

ChannelAddressChannelAddressClientAddress

ChannelAddress

ColumnFamily: (Dormant+Active)SubscriptionTopology(Normal+Index)RowKey: addressString1 (channel or client addresses)ColumnName: subscriptionId_addressString2 (the opposite of above)ColumnValue: subscriptionId

Page 13: Cool stuff we use Cassandra on

©2013 Zipwhip 13

SUBSCRIPTION TOPOLOGY

Page 14: Cool stuff we use Cassandra on

©2013 Zipwhip

TIMELINE – THE EVENTS TO DELIVER

Page 15: Cool stuff we use Cassandra on

©2013 Zipwhip

TIMELINE – THE EVENTS TO DELIVER

Event<T> Event<T> Event<T> Event<T> Event<T> Event<T>

HeadLast Acknowledged(for a given clientAddress)

Channel: /user/3223424

Page 16: Cool stuff we use Cassandra on

©2013 Zipwhip 16

TIMELINE – HOW IT’S USED

ColumnFamily: MessageTimelineRowKey: address.toString()ColumnName: timestampColumnValue: JsonSerializer.serialize(message)

Page 17: Cool stuff we use Cassandra on

©2013 Zipwhip

WHY CASSANDRA?

High write performance by adding new nodes

Easy to scale – zero configuration

Immediately consistent within the same datacenter

Eventually consistent across all datacenters

Auto expiration of old signals/subscriptions via TTL

Page 18: Cool stuff we use Cassandra on

©2013 Zipwhip

MILESTONES AND PRODUCT ROADMAP

We’re testing out Cassandra with Signal Server

Preparing to migrate all SMS inter-carrier traffic to

Cassandra (currently sharded/master/slave MySql)

Page 19: Cool stuff we use Cassandra on

Contact Michael Smyers for more info at:[email protected]

Thank you!