Presenter: Puneet Oberai, Senior Software Engineer at Netflix
In this session, we'll cover a quick introduction to the Astyanax Java client driver, powerful features, comparison to Java Driver and what to do with CQL3.
4. Top Level Features
• Load balancing
• Connection pooling - resilient with failover and retries
• Pluggable host discovery mechanism
• Metrics (there are a lot!)
• Highly configurable and pluggable
15. No wait! Astyanax has a new adaptor
• Built on top of Java Driver
• All your queries are now async
• Astyanax APIs (structured queries) are supported
• All Astyanax recipes work
18. What About Performance?
If you use prepared statements, you’re good!
More findings on our blog
http://techblog.netflix.com/2013/12/astyanax-update.html
19. Prepared Statements
• There is no magic here
• You “prepare”
• Then you re-use
For generic DAOs this means - prepared statement
management.
20. Astyanax Value Add
Structured Queries Naturally Have Some
Query Signature
keyspace.prepareQuery( myCF )!
.withRow( myRowKey )!
.withColumnSlice( start, end)!
.execute();!
Translates to
select * from ks.myCF where key=? and column1 =? and
column1 =?;
21. But wait! Something is not right with the new
model
• Are columns
really columns?
• Are rows still
rows?
• Are columns
really rows?
22. Simple Schema
key validator – int
col comparator – int
default validator – utf8
24. Astyanax preserves original semantics
• Astyanax maintains backwards compatibility
with the api
• Hence rows are still rows and columns are
still columns
25. Takeaway for Astyanax
Apps really care about high level abstractions
• Time series
• Sliding window
• Objects with attribute based indexing
26. So What Should I Use?
• Astyanax presents a higher level abstraction
• Astyanax has recipes
• Astyanax is good for structured queries
• If all you want is CQL3, then use Java Driver