+ All Categories
Home > Documents > Intravert atx meetup_condensed

Intravert atx meetup_condensed

Date post: 15-Jan-2015
Category:
Upload: zznate
View: 693 times
Download: 1 times
Share this document with a friend
Description:
What would you get if Cassandra and Vert.x had a baby?
Popular Tags:
54
Intravert Experimental Transport for Apache Cassandra Friday, April 5, 13
Transcript
Page 1: Intravert atx meetup_condensed

IntravertExperimental

Transport for Apache Cassandra

Friday, April 5, 13

Page 2: Intravert atx meetup_condensed

Hi Folks!I’m Nate @zznate

Friday, April 5, 13

Page 3: Intravert atx meetup_condensed

API ManagementAPI AnalyticsAPI Tools

Friday, April 5, 13

Page 4: Intravert atx meetup_condensed

Vert.x + Cassandra = ?

Friday, April 5, 13

Page 5: Intravert atx meetup_condensed

But first: Architectural stuff

Friday, April 5, 13

Page 7: Intravert atx meetup_condensed

So there are options, why create something new?

Friday, April 5, 13

Page 8: Intravert atx meetup_condensed

Common client patterns emerged

Friday, April 5, 13

Page 9: Intravert atx meetup_condensed

union operationsaggregationsfilteringjoins (round-trip required!)redundant data on insertion

Friday, April 5, 13

Page 10: Intravert atx meetup_condensed

These client patterns are wasteful.

Friday, April 5, 13

Page 11: Intravert atx meetup_condensed

Lots of CPU and memory burned (server and client)

Lots of data on the wire won’t be used (ser/deSer cost)

Friday, April 5, 13

Page 12: Intravert atx meetup_condensed

One more thing about CQL...

Friday, April 5, 13

Page 13: Intravert atx meetup_condensed

“If [they] think that CQL is the answer to usability then I just won. We at least know where our problems are.”- 10gen exec.

Friday, April 5, 13

Page 14: Intravert atx meetup_condensed

Transports in sum

Friday, April 5, 13

Page 15: Intravert atx meetup_condensed

Thrift:I can has distributed computing degree

Friday, April 5, 13

Page 16: Intravert atx meetup_condensed

CQL:MOAR TOOLz!!!

Friday, April 5, 13

Page 17: Intravert atx meetup_condensed

IMO: In 2013, binary protocols with idiomatic clients misses the market.

Friday, April 5, 13

Page 18: Intravert atx meetup_condensed

I love writing apps in Java (sometimes python), but...

Friday, April 5, 13

Page 19: Intravert atx meetup_condensed

The most popular application framework these days:

Friday, April 5, 13

Page 20: Intravert atx meetup_condensed

The most popular application framework these days:HTML5

Friday, April 5, 13

Page 21: Intravert atx meetup_condensed

and thus...Intravert

Friday, April 5, 13

Page 22: Intravert atx meetup_condensed

Any new transport had to be HTTP based

Friday, April 5, 13

Page 23: Intravert atx meetup_condensed

Easy to useEasy to secureEasy to compressYou can test with a browser!

Friday, April 5, 13

Page 24: Intravert atx meetup_condensed

The payload had to be JSON based

Friday, April 5, 13

Page 25: Intravert atx meetup_condensed

Quick Vert.x summary

Friday, April 5, 13

Page 26: Intravert atx meetup_condensed

- Event-driven IO (Netty)- Message bus- Runtime load/unload of modules- Polyglot support via invokeDynamic in JDK7

http://vertx.ioFriday, April 5, 13

Page 27: Intravert atx meetup_condensed

Initial use case: Server side indexing

Friday, April 5, 13

Page 28: Intravert atx meetup_condensed

Easy to construct most common operations

Friday, April 5, 13

Page 29: Intravert atx meetup_condensed

Simple REST semanticsPOST /myks/mycf/key1{“uname”:”zznate”}

GET /myks/mycf/key1/uname{”zznate”}

Friday, April 5, 13

Page 30: Intravert atx meetup_condensed

Command-driven JSON payload

Friday, April 5, 13

Page 31: Intravert atx meetup_condensed

Extensible and transparentOrdered operations Not tied to any predefined notions

Friday, April 5, 13

Page 32: Intravert atx meetup_condensed

Benefits of doing this with Vert.x

Friday, April 5, 13

Page 33: Intravert atx meetup_condensed

Message bus flexibilityConfigure which modules to load (read-only nodes!)Hot deploy of fixes and new features

Friday, April 5, 13

Page 34: Intravert atx meetup_condensed

Cassandra is best-of-breed for a lot of things. So we used it as a framework.

Friday, April 5, 13

Page 35: Intravert atx meetup_condensed

Example Intravert Operations

Friday, April 5, 13

Page 36: Intravert atx meetup_condensed

Slice:{"id":6,"type":"slice","op":{      "end":"9",      "rowkey":"5",      "size":4,      "start":"1"}}

Friday, April 5, 13

Page 37: Intravert atx meetup_condensed

Set:{"id":2,"type":"SET","op":{            "rowkey":"key1",      "uname":"zznate",      "email":"[email protected]",      "age":37}}

Friday, April 5, 13

Page 38: Intravert atx meetup_condensed

Easy to use Composites

Friday, April 5, 13

Page 39: Intravert atx meetup_condensed

{"id":1,"type":"SET","op":{            "rowkey":"key1",      "COMP_NAME":[          "37",  "zznate"      ],      "value":"key1",      }}

Friday, April 5, 13

Page 40: Intravert atx meetup_condensed

One or more commands per payload

Friday, April 5, 13

Page 41: Intravert atx meetup_condensed

Friday, April 5, 13

Page 42: Intravert atx meetup_condensed

Flexible batching - batch reads and writes- different keyspaces in same op- change ks/cf mid-op- streaming (soon)

Friday, April 5, 13

Page 43: Intravert atx meetup_condensed

Server-side Filtering

Friday, April 5, 13

Page 44: Intravert atx meetup_condensed

{ "type": "CREATEFILTER", "op": { "name": "stouts", "spec": "javascript", "value": "function(row) { if (row['value'] == 'Breakfast Stout') return row; else return null; }" } }, { "type": "FILTERMODE", "op": { "name": "stouts", "on": true } }, { "type": "SLICE", "op": { "rowkey": "beers", "start": "Allagash", "end": "Sierra Nevada", "size": 9 } }

Friday, April 5, 13

Page 45: Intravert atx meetup_condensed

{ "exception":null, "exceptionId":null, "opsRes": { "0":"OK", "1":"OK", "2":"OK", "3":"OK", "4":"OK", "5":"OK", "6":[{ "name":"Founders", "value":"Breakfast Stout" }]}}

Friday, April 5, 13

Page 46: Intravert atx meetup_condensed

GetRef:Results of one operation as input from another

Friday, April 5, 13

Page 47: Intravert atx meetup_condensed

{ "type": "GET", "op": { "rowkey": "getref_test", "name": "col1" } }, { "type": "SET", "op": { "rowkey": "getref_test", "name": "col3", "value": { "type": "GETREF", "op": { "resultref": 4, "wanted": "value" } } } }, { "type": "GET", "op": { "rowkey": "getref_test", "name": "col3" } }

Friday, April 5, 13

Page 48: Intravert atx meetup_condensed

“Triggers”- Perform complex multi-step operations server side- Examine and change request objects- Interface directly with IntraVert- Interface directly with Cassandra (StorageProxy, CFMetaData, etc)

Friday, April 5, 13

Page 49: Intravert atx meetup_condensed

Multi-Processors:Shape results with a union of operations

Friday, April 5, 13

Page 50: Intravert atx meetup_condensed

Prepared Request Statement:Requests saved server side - send only the bind variables

Friday, April 5, 13

Page 51: Intravert atx meetup_condensed

CQL support built-in.

Friday, April 5, 13

Page 52: Intravert atx meetup_condensed

What’s missing?

Friday, April 5, 13

Page 53: Intravert atx meetup_condensed

Security (Shiro integration coming soon)Distribution semanticsCassandra-RESTHBASE-like scanners

Friday, April 5, 13

Page 54: Intravert atx meetup_condensed

github.com/zznate/intravert-ug

Friday, April 5, 13


Recommended