SlideShare ist ein Scribd-Unternehmen logo
1 von 35
MAY 21 - 23, 2019
Gaylord National Resort & Convention Center Maryland
Project Casquatch
An Open Source Java Abstraction Layer for
Cassandra Databases.
WHO?
© DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved.
Who am I & Where do I come from?
● Josh Turner
● Principal Engineer @ T-Mobile
● Distributed Data Systems Lead
● Software Development Engineering
/turnerjosh /tdl-jturner
WHY?
© DataStax, All Rights Reserved.Confidential
Why build it?
● Moving from Oracle™ to Cassandra
● High Learning Curve
● Complex Configuration
● Duplicated Code
● Missing Enterprise Best Practices
© DataStax, All Rights Reserved.Confidential
Why share it?
● Versatile Framework
● Reduces Learning Curve
● Success Internally In T-Mobile
● Because We Can. #UnCarrier
© DataStax, All Rights Reserved.Confidential
Why Casquatch?
● Cassandra Is A Name!
● Researched Nicknames
● Sasquatch Is Our Local Legend
● Casquatch Is Born!
WHAT?
© DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved.
What is
Casquatch?
● Cassandra Made Easy!
● Java Abstraction Layer For Cassandra
● Pre-tuned For Enterprise Best Practices
● Object Oriented Code Generation
● Simple Object Based API
● Java Spring Boot Framework Integration
© DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved.
What do I
get?
● Load Balancing / Geo Redundancy
● Connection Pooling
● Reconnection & Retry Policy
● Data Caching
● Workload Filtering
● Security
© DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved.
Open Source
● Open Source Only Model
● T-Mobile Open Source Group
− https://opensource.t-mobile.com
● Project Casquatch
− https://github.com/tmobile/casquatch
● JavaDocs
− https://tmobile.github.io/casquatch/
© DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved.
Open Source
● We recognize that there is a wide range of
platforms, and T-Mobile can't address them
all. This is why we open sourced Casquatch --
we hope the community will be able to expand
how Casquatch is used. As with any tool,
consult with your IT department before using in
production.
● All code samples included are for
demonstration purposes only.
● Licensed under Apache 2.0
− https://www.apache.org/licenses/LICENSE-2.0
© DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved.
Project
History
● 03/05/2018 – 1.0 Internal Release
● 04/05/2018 – 1.1 Release
● 06/22/2018 – 1.2 Release Open Sourced!
● 09/17/2018 – 1.3 Release
● 05/01/2018 – 1.4 Release
HOW?
© DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved.
How did I get
here?
● We started with Spring Data
● All the testing went great… Until production
● We didn’t know what we didn’t know…
● Tried to fix Spring
● Decided to build and integrate
© DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved.
How does it
compare?
● Spring Data
− No High Availability
− No Retry
− Non Industry Best Practices
● Casquatch
− Highly Available
− Automatic Retry
− Follows Industry Best Practices
● Savings
− Significant reduction in support and design cost
− Highly Reliable Architecture
© DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved.
How much do
I have to
write?
● Spring Data - Developer Effort
− ~150 Lines For Basic Configuration
− ~100 Lines Per Table
− ~10 Tables Per App
● Casquatch - Developer Effort
− ~10 lines of code
● Savings
− 1100+ lines of code and days of developer time
for each application
© DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved.
Code
Generator
● Command Line Interface
● Driven by Table Metadata
● Annotated Objects
● Customizable
© DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved.
Maven
● Hosted by Sonatype
● Available in Maven Central
● Include in pom.xml
© DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved.
Spring Boot
Integration:
● Optional Spring Boot Integration
● Add Import to Application.java
● Dependency Injection
Code For Demonstration Purposes Only
© DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved.
If You Build
It…
● Skip Spring Boot
● Builder Pattern
● CassandraDriver.builder().withUsername() …
.build()
● All properties are available
Code For Demonstration Purposes Only
SHOW ME!
© DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved.
Spring Boot Configuration:
● Standard application.properties
● The Basics
− Credentials, Contact Points,
Keyspace, etc
● The Advanced
− Connection Limits, LoadBalancing,
Timeout, SSL, etc
● Many More in README.md
Code For Demonstration Purposes Only
© DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved.
Builder Pattern:
● Skip Spring Boot and Do It Yourself
● The Basics
− Credentials, Contact Points,
Keyspace, etc
● The Advanced
− Connection Limits, LoadBalancing,
Timeout, SSL, etc
● Many More in API Docs
Code For Demonstration Purposes Only
© DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved.
Create Schema:
● Create a Cassandra Table
● Columns use _ for spaces
● Supports all data types
● Supports UDT
Code For Demonstration Purposes Only
© DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved.
Create Some Code:
● Run the code generator
● Read in settings on command line
or from properties file
● Configurable options
● More in README.md
Code For Demonstration Purposes Only
© DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved.
Get Some Code: tableName.java
● Custom Package
● Only Required
Imports
Code For Demonstration Purposes Only
© DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved.
Get Some Code: tableName.java
● Comments
● Full CQL
● Annotated
Code For Demonstration Purposes Only
© DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved.
Get Some Code: tableName.java
● JavaDoc
● Constructors
● Getters and Setters
Code For Demonstration Purposes Only
© DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved.
Get Some Code: pom.xml
● Package option
creates pom.xml
● Snippet shorted for
slide
● Complete Artifact
Code For Demonstration Purposes Only
© DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved.
Use The Code:
● T getById(Class<T> c, T o) : Get by passing an object instance with the key populated.
● void save(Class<T> c, T o) : Save by passing an object instance.
● void delete(Class<T> c, T o): Delete by passing an object instance with the key populated
Code For Demonstration Purposes Only
QUESTIONS
© DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved.
Demo – Casquatch In 5 Minutes
THANK YOU

Weitere ähnliche Inhalte

Ähnlich wie Java Abstraction Layer for Cassandra Databases

Make your data fly - Building data platform in AWS
Make your data fly - Building data platform in AWSMake your data fly - Building data platform in AWS
Make your data fly - Building data platform in AWSKimmo Kantojärvi
 
Presto: SQL-on-Anything. Netherlands Hadoop User Group Meetup
Presto: SQL-on-Anything. Netherlands Hadoop User Group MeetupPresto: SQL-on-Anything. Netherlands Hadoop User Group Meetup
Presto: SQL-on-Anything. Netherlands Hadoop User Group MeetupWojciech Biela
 
Hazelcast Jet - January 08, 2018
Hazelcast Jet - January 08, 2018Hazelcast Jet - January 08, 2018
Hazelcast Jet - January 08, 2018Rahul Gupta
 
Safer restarts, faster streaming, and better repair, just a glimpse of cassan...
Safer restarts, faster streaming, and better repair, just a glimpse of cassan...Safer restarts, faster streaming, and better repair, just a glimpse of cassan...
Safer restarts, faster streaming, and better repair, just a glimpse of cassan...Vinay Kumar Chella
 
Azure + DataStax Enterprise Powers Office 365 Per User Store
Azure + DataStax Enterprise Powers Office 365 Per User StoreAzure + DataStax Enterprise Powers Office 365 Per User Store
Azure + DataStax Enterprise Powers Office 365 Per User StoreDataStax Academy
 
How to Manage Cloud Infrastructures using Zend Framework
How to Manage Cloud Infrastructures using Zend FrameworkHow to Manage Cloud Infrastructures using Zend Framework
How to Manage Cloud Infrastructures using Zend FrameworkZend by Rogue Wave Software
 
Building a Stock Prediction system with Machine Learning using Geode, SpringX...
Building a Stock Prediction system with Machine Learning using Geode, SpringX...Building a Stock Prediction system with Machine Learning using Geode, SpringX...
Building a Stock Prediction system with Machine Learning using Geode, SpringX...William Markito Oliveira
 
Intro to creating kubernetes operators
Intro to creating kubernetes operators Intro to creating kubernetes operators
Intro to creating kubernetes operators Juraj Hantak
 
Self-service PR-based Terraform
Self-service PR-based TerraformSelf-service PR-based Terraform
Self-service PR-based TerraformAndrew Kirkpatrick
 
Aleksejs Nemirovskis - Manage your data using oracle BDA
Aleksejs Nemirovskis - Manage your data using oracle BDAAleksejs Nemirovskis - Manage your data using oracle BDA
Aleksejs Nemirovskis - Manage your data using oracle BDAAndrejs Vorobjovs
 
Production Plone on OpenStack Cloud
Production Plone on OpenStack CloudProduction Plone on OpenStack Cloud
Production Plone on OpenStack CloudSerg Melikyan
 
Container Attached Storage (CAS) with OpenEBS - SDC 2018
Container Attached Storage (CAS) with OpenEBS -  SDC 2018Container Attached Storage (CAS) with OpenEBS -  SDC 2018
Container Attached Storage (CAS) with OpenEBS - SDC 2018OpenEBS
 
Etl engine testing with scala
Etl engine testing with scalaEtl engine testing with scala
Etl engine testing with scalavodQA
 
Truemotion Adventures in Containerization
Truemotion Adventures in ContainerizationTruemotion Adventures in Containerization
Truemotion Adventures in ContainerizationRyan Hunter
 
Custom Script Execution Environment on TD Workflow @ TD Tech Talk 2018-10-17
Custom Script Execution Environment on TD Workflow @ TD Tech Talk 2018-10-17Custom Script Execution Environment on TD Workflow @ TD Tech Talk 2018-10-17
Custom Script Execution Environment on TD Workflow @ TD Tech Talk 2018-10-17Muga Nishizawa
 
Performance is not an Option - gRPC and Cassandra
Performance is not an Option - gRPC and CassandraPerformance is not an Option - gRPC and Cassandra
Performance is not an Option - gRPC and CassandraDave Bechberger
 
PGConf.ASIA 2019 - The Future of TDEforPG - Taiki Kondo
PGConf.ASIA 2019 - The Future of TDEforPG - Taiki KondoPGConf.ASIA 2019 - The Future of TDEforPG - Taiki Kondo
PGConf.ASIA 2019 - The Future of TDEforPG - Taiki KondoEqunix Business Solutions
 
Rohit Yadav - The future of the CloudStack Virtual Router
Rohit Yadav - The future of the CloudStack Virtual RouterRohit Yadav - The future of the CloudStack Virtual Router
Rohit Yadav - The future of the CloudStack Virtual RouterShapeBlue
 
Zetta: An API First Platform
Zetta: An API First PlatformZetta: An API First Platform
Zetta: An API First PlatformAPI Meetup
 

Ähnlich wie Java Abstraction Layer for Cassandra Databases (20)

Make your data fly - Building data platform in AWS
Make your data fly - Building data platform in AWSMake your data fly - Building data platform in AWS
Make your data fly - Building data platform in AWS
 
Presto: SQL-on-Anything. Netherlands Hadoop User Group Meetup
Presto: SQL-on-Anything. Netherlands Hadoop User Group MeetupPresto: SQL-on-Anything. Netherlands Hadoop User Group Meetup
Presto: SQL-on-Anything. Netherlands Hadoop User Group Meetup
 
Hazelcast Jet - January 08, 2018
Hazelcast Jet - January 08, 2018Hazelcast Jet - January 08, 2018
Hazelcast Jet - January 08, 2018
 
Dagster @ R&S MNT
Dagster @ R&S MNTDagster @ R&S MNT
Dagster @ R&S MNT
 
Safer restarts, faster streaming, and better repair, just a glimpse of cassan...
Safer restarts, faster streaming, and better repair, just a glimpse of cassan...Safer restarts, faster streaming, and better repair, just a glimpse of cassan...
Safer restarts, faster streaming, and better repair, just a glimpse of cassan...
 
Azure + DataStax Enterprise Powers Office 365 Per User Store
Azure + DataStax Enterprise Powers Office 365 Per User StoreAzure + DataStax Enterprise Powers Office 365 Per User Store
Azure + DataStax Enterprise Powers Office 365 Per User Store
 
How to Manage Cloud Infrastructures using Zend Framework
How to Manage Cloud Infrastructures using Zend FrameworkHow to Manage Cloud Infrastructures using Zend Framework
How to Manage Cloud Infrastructures using Zend Framework
 
Building a Stock Prediction system with Machine Learning using Geode, SpringX...
Building a Stock Prediction system with Machine Learning using Geode, SpringX...Building a Stock Prediction system with Machine Learning using Geode, SpringX...
Building a Stock Prediction system with Machine Learning using Geode, SpringX...
 
Intro to creating kubernetes operators
Intro to creating kubernetes operators Intro to creating kubernetes operators
Intro to creating kubernetes operators
 
Self-service PR-based Terraform
Self-service PR-based TerraformSelf-service PR-based Terraform
Self-service PR-based Terraform
 
Aleksejs Nemirovskis - Manage your data using oracle BDA
Aleksejs Nemirovskis - Manage your data using oracle BDAAleksejs Nemirovskis - Manage your data using oracle BDA
Aleksejs Nemirovskis - Manage your data using oracle BDA
 
Production Plone on OpenStack Cloud
Production Plone on OpenStack CloudProduction Plone on OpenStack Cloud
Production Plone on OpenStack Cloud
 
Container Attached Storage (CAS) with OpenEBS - SDC 2018
Container Attached Storage (CAS) with OpenEBS -  SDC 2018Container Attached Storage (CAS) with OpenEBS -  SDC 2018
Container Attached Storage (CAS) with OpenEBS - SDC 2018
 
Etl engine testing with scala
Etl engine testing with scalaEtl engine testing with scala
Etl engine testing with scala
 
Truemotion Adventures in Containerization
Truemotion Adventures in ContainerizationTruemotion Adventures in Containerization
Truemotion Adventures in Containerization
 
Custom Script Execution Environment on TD Workflow @ TD Tech Talk 2018-10-17
Custom Script Execution Environment on TD Workflow @ TD Tech Talk 2018-10-17Custom Script Execution Environment on TD Workflow @ TD Tech Talk 2018-10-17
Custom Script Execution Environment on TD Workflow @ TD Tech Talk 2018-10-17
 
Performance is not an Option - gRPC and Cassandra
Performance is not an Option - gRPC and CassandraPerformance is not an Option - gRPC and Cassandra
Performance is not an Option - gRPC and Cassandra
 
PGConf.ASIA 2019 - The Future of TDEforPG - Taiki Kondo
PGConf.ASIA 2019 - The Future of TDEforPG - Taiki KondoPGConf.ASIA 2019 - The Future of TDEforPG - Taiki Kondo
PGConf.ASIA 2019 - The Future of TDEforPG - Taiki Kondo
 
Rohit Yadav - The future of the CloudStack Virtual Router
Rohit Yadav - The future of the CloudStack Virtual RouterRohit Yadav - The future of the CloudStack Virtual Router
Rohit Yadav - The future of the CloudStack Virtual Router
 
Zetta: An API First Platform
Zetta: An API First PlatformZetta: An API First Platform
Zetta: An API First Platform
 

Kürzlich hochgeladen

(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Scott Andery
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 

Kürzlich hochgeladen (20)

(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 

Java Abstraction Layer for Cassandra Databases

  • 1. MAY 21 - 23, 2019 Gaylord National Resort & Convention Center Maryland
  • 2. Project Casquatch An Open Source Java Abstraction Layer for Cassandra Databases.
  • 4. © DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved. Who am I & Where do I come from? ● Josh Turner ● Principal Engineer @ T-Mobile ● Distributed Data Systems Lead ● Software Development Engineering /turnerjosh /tdl-jturner
  • 6. © DataStax, All Rights Reserved.Confidential Why build it? ● Moving from Oracle™ to Cassandra ● High Learning Curve ● Complex Configuration ● Duplicated Code ● Missing Enterprise Best Practices
  • 7. © DataStax, All Rights Reserved.Confidential Why share it? ● Versatile Framework ● Reduces Learning Curve ● Success Internally In T-Mobile ● Because We Can. #UnCarrier
  • 8. © DataStax, All Rights Reserved.Confidential Why Casquatch? ● Cassandra Is A Name! ● Researched Nicknames ● Sasquatch Is Our Local Legend ● Casquatch Is Born!
  • 10. © DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved. What is Casquatch? ● Cassandra Made Easy! ● Java Abstraction Layer For Cassandra ● Pre-tuned For Enterprise Best Practices ● Object Oriented Code Generation ● Simple Object Based API ● Java Spring Boot Framework Integration
  • 11. © DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved. What do I get? ● Load Balancing / Geo Redundancy ● Connection Pooling ● Reconnection & Retry Policy ● Data Caching ● Workload Filtering ● Security
  • 12. © DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved. Open Source ● Open Source Only Model ● T-Mobile Open Source Group − https://opensource.t-mobile.com ● Project Casquatch − https://github.com/tmobile/casquatch ● JavaDocs − https://tmobile.github.io/casquatch/
  • 13. © DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved. Open Source ● We recognize that there is a wide range of platforms, and T-Mobile can't address them all. This is why we open sourced Casquatch -- we hope the community will be able to expand how Casquatch is used. As with any tool, consult with your IT department before using in production. ● All code samples included are for demonstration purposes only. ● Licensed under Apache 2.0 − https://www.apache.org/licenses/LICENSE-2.0
  • 14. © DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved. Project History ● 03/05/2018 – 1.0 Internal Release ● 04/05/2018 – 1.1 Release ● 06/22/2018 – 1.2 Release Open Sourced! ● 09/17/2018 – 1.3 Release ● 05/01/2018 – 1.4 Release
  • 15. HOW?
  • 16. © DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved. How did I get here? ● We started with Spring Data ● All the testing went great… Until production ● We didn’t know what we didn’t know… ● Tried to fix Spring ● Decided to build and integrate
  • 17. © DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved. How does it compare? ● Spring Data − No High Availability − No Retry − Non Industry Best Practices ● Casquatch − Highly Available − Automatic Retry − Follows Industry Best Practices ● Savings − Significant reduction in support and design cost − Highly Reliable Architecture
  • 18. © DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved. How much do I have to write? ● Spring Data - Developer Effort − ~150 Lines For Basic Configuration − ~100 Lines Per Table − ~10 Tables Per App ● Casquatch - Developer Effort − ~10 lines of code ● Savings − 1100+ lines of code and days of developer time for each application
  • 19. © DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved. Code Generator ● Command Line Interface ● Driven by Table Metadata ● Annotated Objects ● Customizable
  • 20. © DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved. Maven ● Hosted by Sonatype ● Available in Maven Central ● Include in pom.xml
  • 21. © DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved. Spring Boot Integration: ● Optional Spring Boot Integration ● Add Import to Application.java ● Dependency Injection Code For Demonstration Purposes Only
  • 22. © DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved. If You Build It… ● Skip Spring Boot ● Builder Pattern ● CassandraDriver.builder().withUsername() … .build() ● All properties are available Code For Demonstration Purposes Only
  • 24. © DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved. Spring Boot Configuration: ● Standard application.properties ● The Basics − Credentials, Contact Points, Keyspace, etc ● The Advanced − Connection Limits, LoadBalancing, Timeout, SSL, etc ● Many More in README.md Code For Demonstration Purposes Only
  • 25. © DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved. Builder Pattern: ● Skip Spring Boot and Do It Yourself ● The Basics − Credentials, Contact Points, Keyspace, etc ● The Advanced − Connection Limits, LoadBalancing, Timeout, SSL, etc ● Many More in API Docs Code For Demonstration Purposes Only
  • 26. © DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved. Create Schema: ● Create a Cassandra Table ● Columns use _ for spaces ● Supports all data types ● Supports UDT Code For Demonstration Purposes Only
  • 27. © DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved. Create Some Code: ● Run the code generator ● Read in settings on command line or from properties file ● Configurable options ● More in README.md Code For Demonstration Purposes Only
  • 28. © DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved. Get Some Code: tableName.java ● Custom Package ● Only Required Imports Code For Demonstration Purposes Only
  • 29. © DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved. Get Some Code: tableName.java ● Comments ● Full CQL ● Annotated Code For Demonstration Purposes Only
  • 30. © DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved. Get Some Code: tableName.java ● JavaDoc ● Constructors ● Getters and Setters Code For Demonstration Purposes Only
  • 31. © DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved. Get Some Code: pom.xml ● Package option creates pom.xml ● Snippet shorted for slide ● Complete Artifact Code For Demonstration Purposes Only
  • 32. © DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved. Use The Code: ● T getById(Class<T> c, T o) : Get by passing an object instance with the key populated. ● void save(Class<T> c, T o) : Save by passing an object instance. ● void delete(Class<T> c, T o): Delete by passing an object instance with the key populated Code For Demonstration Purposes Only
  • 34. © DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved. Demo – Casquatch In 5 Minutes

Hinweis der Redaktion

  1. Image source: Pixabay Licensed photo https://pixabay.com/photos/lego-building-blocks-colorful-2285065/
  2. Image source: creative commons licensed flikr photo by Donnie Ray Jones: https://www.flickr.com/photos/donnieray/16174454907
  3. Picture by Jim Fischer. Licensed under Creative Commons. https://www.flickr.com/photos/jimfischer/26436247304
  4. 03/05/2018 – 1.0 Internal Release 04/05/2018 – 1.1 Release Highlights: ASync calls and Solr support added 06/22/2018 – 1.2 Release Open Sourced! Highlights: Added Spring Config, open source optimizations 09/17/2018 – 1.3 Release Highlights: Added SSL, Updated Driver, Optional DSE Licensed Driver, Solr Search By Object (Req 6.0+) 05/01/2018 – 1.4 Release Highlights: Generate CLI, Enhanced Filter policies
  5. https://www.youtube.com/watch?v=XNVZFzTsM04