Apachecon cassandra transport

1,335 views

Published on

Apache Cassandra client and transport architecture. Slides from ApacheCon NA 2013 in Portland, OR.

0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,335
On SlideShare
0
From Embeds
0
Number of Embeds
83
Actions
Shares
0
Downloads
22
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

Apachecon cassandra transport

  1. 1. Apache Cassandra Clients and TransportsThursday, February 28, 13
  2. 2. Hi Folks! I’m Nate @zznateThursday, February 28, 13
  3. 3. API Management API Analytics API ToolsThursday, February 28, 13
  4. 4. Clients and transports for CassandraThursday, February 28, 13
  5. 5. But first... some questionsThursday, February 28, 13
  6. 6. But first: Architectural stuffThursday, February 28, 13
  7. 7. Cassandra: “Sparsely Columnar”Thursday, February 28, 13
  8. 8. An RDBMS tableThursday, February 28, 13
  9. 9. An RDBMS tableThursday, February 28, 13
  10. 10. Cassandra StyleThursday, February 28, 13
  11. 11. Cassandra StyleThursday, February 28, 13
  12. 12. Cassandra data modellingThursday, February 28, 13
  13. 13. Four common patterns Simple object to simple row Sparse object to rows Materialized view Manual indexThursday, February 28, 13
  14. 14. simple objects to simple rowThursday, February 28, 13
  15. 15. “static” column familyThursday, February 28, 13
  16. 16. Sparse ObjectsThursday, February 28, 13
  17. 17. “dynamic” column familyThursday, February 28, 13
  18. 18. Materialized ViewsThursday, February 28, 13
  19. 19. Materialized viewThursday, February 28, 13
  20. 20. Regardless of the approached used, there are four overall goalsThursday, February 28, 13
  21. 21. 1. Denormalize 2. Eliminate seeks 3. Design for read 4. Optimiza for blind writesThursday, February 28, 13
  22. 22. Now... let’s talk about protocolsThursday, February 28, 13
  23. 23. ThriftThursday, February 28, 13
  24. 24. Thrift RPC-BasedThursday, February 28, 13
  25. 25. Thrift RPC-Based Mature Apache ProjectThursday, February 28, 13
  26. 26. Thrift RPC-Based Mature Apache Project Supports lots of languagesThursday, February 28, 13
  27. 27. Thrift RPC-Based Mature Apache Project Supports lots of languages Extensible!Thursday, February 28, 13
  28. 28. CQLThursday, February 28, 13
  29. 29. CQL Well defined protocolThursday, February 28, 13
  30. 30. CQL Well defined protocol Supports CompressionThursday, February 28, 13
  31. 31. CQL Well defined protocol Supports Compression Netty/NIO-basedThursday, February 28, 13
  32. 32. Storage Mechanics (but quickly)Thursday, February 28, 13
  33. 33. get_slice Workhorse of Cassandra selection methodsThursday, February 28, 13
  34. 34. get_slice: key The row keyThursday, February 28, 13
  35. 35. get_slice: ColumnParent The column family (a.k.a table)Thursday, February 28, 13
  36. 36. get_slice: SlicePredicate defines the column range, or specifically named columnsThursday, February 28, 13
  37. 37. get_slice:ConsistencyLevel The level of consistency we want for this readThursday, February 28, 13
  38. 38. Obtuse at first glance, but nothing is hiddenThursday, February 28, 13
  39. 39. So...Thursday, February 28, 13
  40. 40. But one person’s abstraction leakage is another’s preffered modelThursday, February 28, 13
  41. 41. How closely do you want to interact with the underlying storage engine?Thursday, February 28, 13
  42. 42. Client APIsThursday, February 28, 13
  43. 43. Benefits of thriftThursday, February 28, 13
  44. 44. Benefits of thrift Mature selection of clientsThursday, February 28, 13
  45. 45. Benefits of thrift Mature selection of clients Multiple languagesThursday, February 28, 13
  46. 46. Benefits of thrift Mature selection of clients Multiple languages Well documentedThursday, February 28, 13
  47. 47. Benefits of thrift Mature selection of clients Multiple languages Well documented Can be used in other placesThursday, February 28, 13
  48. 48. Drawbacks of thriftThursday, February 28, 13
  49. 49. Drawbacks of thrift Several objects are required for any requestThursday, February 28, 13
  50. 50. Drawbacks of thrift Several objects are required for any request Clients differs in implementationThursday, February 28, 13
  51. 51. Drawbacks of thrift Several objects are required for any request Clients differs in implementation Upstream dependency issuesThursday, February 28, 13
  52. 52. Drawbacks of thrift Several objects are required for any request Clients differs in implementation Upstream dependency issues Schema changes and cluster health done pro-activelyThursday, February 28, 13
  53. 53. Benefits of cql apiThursday, February 28, 13
  54. 54. Benefits of cql api Stored proceduresThursday, February 28, 13
  55. 55. Benefits of cql api Stored procedures Common operations are straight forwardThursday, February 28, 13
  56. 56. Benefits of cql api Stored procedures Common operations are straight forward Cluster health and schema change push-backThursday, February 28, 13
  57. 57. Benefits of cql api Stored procedures Common operations are straight forward Cluster health and schema change push-back Awesome client availableThursday, February 28, 13
  58. 58. Drawbacks of CQL apisThursday, February 28, 13
  59. 59. Drawbacks of CQL apis Still have idiomatic clientsThursday, February 28, 13
  60. 60. Drawbacks of CQL apis Still have idiomatic clients Still a binary protocolThursday, February 28, 13
  61. 61. Drawbacks of CQL apis Still have idiomatic clients Still a binary protocol Default storage model emposes substantial restrictions ** see gotchas section laterThursday, February 28, 13
  62. 62. Considerations for your appThursday, February 28, 13
  63. 63. Stick with Thrift if...Thursday, February 28, 13
  64. 64. Heavy update workloadsThursday, February 28, 13
  65. 65. Large, dynamic batch insertionsThursday, February 28, 13
  66. 66. Hadoop integration (CASSANDRA-4421)Thursday, February 28, 13
  67. 67. Commonly deal with very wide rows (CASSANDRA-4176)Thursday, February 28, 13
  68. 68. CASSANDRA-4176: “Pick your shard keys carefully”Thursday, February 28, 13
  69. 69. Thursday, February 28, 13
  70. 70. Consider CQL if...Thursday, February 28, 13
  71. 71. Static column family model: Take advantage of stored procedures for common readsThursday, February 28, 13
  72. 72. Despite the shard key jab, CQL makes good use of the storage modelThursday, February 28, 13
  73. 73. You can replace some custom serialization with collections Thursday, February 28, 13
  74. 74. Integration with JDBC and/or BI toolsThursday, February 28, 13
  75. 75. Wire efficient: Does not return timestamp or TTL by defaultThursday, February 28, 13
  76. 76. Larger, potentially more transient evironmentsThursday, February 28, 13
  77. 77. But CQL is - new - an abstractionThursday, February 28, 13
  78. 78. In some cases, CQL might not do what you thinkThursday, February 28, 13
  79. 79. Most common CQL pitfallsThursday, February 28, 13
  80. 80. Collections can only be retrieved in their entiretyThursday, February 28, 13
  81. 81. Can’t mix static and dynamic data in a column familyThursday, February 28, 13
  82. 82. “keys only” range slices don’t work (CASSANDRA-4536)Thursday, February 28, 13
  83. 83. Range ghosts will not be returnedThursday, February 28, 13
  84. 84. Batch inserts are clunky (CASSANDRA-4693)Thursday, February 28, 13
  85. 85. With non-compact storage the whole row must be read every time.Thursday, February 28, 13
  86. 86. The take away is that you have options. Particularly good ones for Java.Thursday, February 28, 13
  87. 87. Thursday, February 28, 13
  88. 88. BUTThursday, February 28, 13
  89. 89. there is a larger, more fundamental problem to discussThursday, February 28, 13
  90. 90. “If [they] think that CQL is the answer to usability then I just won. We at least know where our problems are.” - 10gen exec.Thursday, February 28, 13
  91. 91. The market has spoken and we missed the boat.Thursday, February 28, 13
  92. 92. POST /endpoint {json}Thursday, February 28, 13
  93. 93. A Cassandra-MVP actually maintains a REST front-endThursday, February 28, 13
  94. 94. So we’ve taken this and gone furtherThursday, February 28, 13
  95. 95. What if...Thursday, February 28, 13
  96. 96. Coming soon... Intravert. Vert.x+Cassandra. ASF-licensed. Driven by real-world requirements.Thursday, February 28, 13

×