SlideShare uma empresa Scribd logo
1 de 21
Baixar para ler offline
Cassandra Data Access in Java
eBuddy use of Cassandra
XMS
● User Data Service
● User Discovery Service
● Persistent Session Store
● Message History
● Location-based Discovery
Cassandra in
eBuddy Messaging Platform
● Current size of data
● 1,4 TiB total (replication of 3x); 467 GiB actual data
● 12 million sessions (11 million users plus groups)
● Almost a billion rows in one column family
(inverse social graph)
Some Statistics
Data Access - Overview
Design Objectives
● Data Source Agnostic
● Testable
● Thread Safe
● Strong Typing
● Supports “transactions”, i.e. units of work in batch
● Efficient Mapping to Application Domain Model
● Follows Familiar Patterns (e.g. Spring JDBC Template)
Data Access in Layers
“Operations” Layer
Writing
● Use Generic Typing
● Has Interface
(for testability, etc.)
● Handles Exceptions
Reading
● Use Mappers
Serializers
● Constructed with serializers that convert to types needed
by data access layer
Reading
Data Access Layer
Data Access Object
● Data Access Object (DAO) is singleton
● Transforms from data model to domain model
● Operations object configured with serializers to convert
from data model to domain model
● Defines the mappers for read operations
Next Steps
CQL3
DataStax:
"We believe that CQL3 is a simpler and overall better API for Cassandra
than the thrift API is. Therefore, new projects/applications are encouraged
to use CQL3"
At eBuddy, we are still using the Thrift API and the Java Hector library.
We are currently looking at CQL3 and whether we want to use it going
forward and whether we will "upgrade" existing code.
Structured Data
● Object Mapping Frameworks
● Mapped vs. Embedded Objects
● Nested Properties ("path" access)
Object Mapping Frameworks
● Simple mapper frameworks with (some) JPA support
● Hector Object Mapper
● Kundera
● Firebrand (not JPA)
● has most features,
e.g supports both embedded and mapped object graphs
https://github.com/impetus-opensource/Kundera
http://github.com/hector-client/hector
http://firebrandocm.org
Hierarchical Properties
● Use DynamicComposites to model keys that have a
variable number of components
put(“accounts|msn|x.y.z|sign_in”, “0”);
put(“accounts|msn|x.y.z|key”, “value”);
get(“accounts”) --> retrieved as a map:
{"accounts":
{ "msn":
{ "x.y.z":
{ "sign_in": "0",
"key": "value" } } } }
● Use a slice query to retrieve properties using partial path:
Questions?
XMS
Unlimited messaging.
Better. Free.
We're Hiring!
Download XMS now:

Mais conteúdo relacionado

Mais procurados

IMC Summit 2016 Breakout - William Bain - Implementing Extensible Data Struct...
IMC Summit 2016 Breakout - William Bain - Implementing Extensible Data Struct...IMC Summit 2016 Breakout - William Bain - Implementing Extensible Data Struct...
IMC Summit 2016 Breakout - William Bain - Implementing Extensible Data Struct...
In-Memory Computing Summit
 
Webtech Conference: NoSQL and Web scalability
Webtech Conference: NoSQL and Web scalabilityWebtech Conference: NoSQL and Web scalability
Webtech Conference: NoSQL and Web scalability
Luca Bonmassar
 
The CIOs Guide to NoSQL
The CIOs Guide to NoSQLThe CIOs Guide to NoSQL
The CIOs Guide to NoSQL
DATAVERSITY
 

Mais procurados (20)

Exploring MongoDB & Elasticsearch: Better Together
Exploring MongoDB & Elasticsearch: Better TogetherExploring MongoDB & Elasticsearch: Better Together
Exploring MongoDB & Elasticsearch: Better Together
 
A head start on cloud native event driven applications - bigdatadays
A head start on cloud native event driven applications - bigdatadaysA head start on cloud native event driven applications - bigdatadays
A head start on cloud native event driven applications - bigdatadays
 
Overhauling a database engine in 2 months
Overhauling a database engine in 2 monthsOverhauling a database engine in 2 months
Overhauling a database engine in 2 months
 
Oslo bekk2014
Oslo bekk2014Oslo bekk2014
Oslo bekk2014
 
Stream Processing with Ballerina
Stream Processing with BallerinaStream Processing with Ballerina
Stream Processing with Ballerina
 
Multi-model databases and node.js
Multi-model databases and node.jsMulti-model databases and node.js
Multi-model databases and node.js
 
WSO2 Stream Processor: Graphical Editor, HTTP & Message Trace Analytics and m...
WSO2 Stream Processor: Graphical Editor, HTTP & Message Trace Analytics and m...WSO2 Stream Processor: Graphical Editor, HTTP & Message Trace Analytics and m...
WSO2 Stream Processor: Graphical Editor, HTTP & Message Trace Analytics and m...
 
IMC Summit 2016 Breakout - William Bain - Implementing Extensible Data Struct...
IMC Summit 2016 Breakout - William Bain - Implementing Extensible Data Struct...IMC Summit 2016 Breakout - William Bain - Implementing Extensible Data Struct...
IMC Summit 2016 Breakout - William Bain - Implementing Extensible Data Struct...
 
Electron, databases, and RxDB
Electron, databases, and RxDBElectron, databases, and RxDB
Electron, databases, and RxDB
 
Webtech Conference: NoSQL and Web scalability
Webtech Conference: NoSQL and Web scalabilityWebtech Conference: NoSQL and Web scalability
Webtech Conference: NoSQL and Web scalability
 
Log analysis using elk
Log analysis using elkLog analysis using elk
Log analysis using elk
 
Accelerating Delivery of Data Products - The EBSCO Way
Accelerating Delivery of Data Products - The EBSCO WayAccelerating Delivery of Data Products - The EBSCO Way
Accelerating Delivery of Data Products - The EBSCO Way
 
FOXX - a Javascript application framework on top of ArangoDB
FOXX - a Javascript application framework on top of ArangoDBFOXX - a Javascript application framework on top of ArangoDB
FOXX - a Javascript application framework on top of ArangoDB
 
The CIOs Guide to NoSQL
The CIOs Guide to NoSQLThe CIOs Guide to NoSQL
The CIOs Guide to NoSQL
 
Backbone using Extensible Database APIs over HTTP
Backbone using Extensible Database APIs over HTTPBackbone using Extensible Database APIs over HTTP
Backbone using Extensible Database APIs over HTTP
 
NoSQL for SQL Users
NoSQL for SQL UsersNoSQL for SQL Users
NoSQL for SQL Users
 
Data platform architecture principles - ieee infrastructure 2020
Data platform architecture principles - ieee infrastructure 2020Data platform architecture principles - ieee infrastructure 2020
Data platform architecture principles - ieee infrastructure 2020
 
Document Database
Document DatabaseDocument Database
Document Database
 
Scaling ArangoDB on Mesosphere DCOS
Scaling ArangoDB on Mesosphere DCOSScaling ArangoDB on Mesosphere DCOS
Scaling ArangoDB on Mesosphere DCOS
 
Db presentation google_megastore
Db presentation google_megastoreDb presentation google_megastore
Db presentation google_megastore
 

Destaque

Model assure media pembelajaran
Model assure media pembelajaranModel assure media pembelajaran
Model assure media pembelajaran
itnay cindo
 
Using puppet, foreman and git to develop and operate a large scale internet s...
Using puppet, foreman and git to develop and operate a large scale internet s...Using puppet, foreman and git to develop and operate a large scale internet s...
Using puppet, foreman and git to develop and operate a large scale internet s...
techblog
 

Destaque (13)

Meetup cassandra for_java_cql
Meetup cassandra for_java_cqlMeetup cassandra for_java_cql
Meetup cassandra for_java_cql
 
Retention and upsale in using customer data
Retention and upsale in using customer dataRetention and upsale in using customer data
Retention and upsale in using customer data
 
C* path
C* pathC* path
C* path
 
Агман Забуровна
Агман ЗабуровнаАгман Забуровна
Агман Забуровна
 
שירות כמנוע צמיחה ורווחיות
שירות כמנוע צמיחה ורווחיותשירות כמנוע צמיחה ורווחיות
שירות כמנוע צמיחה ורווחיות
 
Агман Забуровна
Агман ЗабуровнаАгман Забуровна
Агман Забуровна
 
Integrating Voice Of Customers with Customer Success
Integrating Voice Of Customers with Customer SuccessIntegrating Voice Of Customers with Customer Success
Integrating Voice Of Customers with Customer Success
 
B2B - Measuring Customer Satisfaction - Comverse ltd
B2B - Measuring Customer Satisfaction - Comverse ltdB2B - Measuring Customer Satisfaction - Comverse ltd
B2B - Measuring Customer Satisfaction - Comverse ltd
 
Voice of Customers programs in B2B
Voice of Customers programs in B2BVoice of Customers programs in B2B
Voice of Customers programs in B2B
 
Model assure media pembelajaran
Model assure media pembelajaranModel assure media pembelajaran
Model assure media pembelajaran
 
Using puppet, foreman and git to develop and operate a large scale internet s...
Using puppet, foreman and git to develop and operate a large scale internet s...Using puppet, foreman and git to develop and operate a large scale internet s...
Using puppet, foreman and git to develop and operate a large scale internet s...
 
Managing service projects in a B2B environment
Managing service projects in a B2B environmentManaging service projects in a B2B environment
Managing service projects in a B2B environment
 
Post Usage ROI?
Post Usage ROI?Post Usage ROI?
Post Usage ROI?
 

Semelhante a Cassandra data access

BISSA: Empowering Web gadget Communication with Tuple Spaces
BISSA: Empowering Web gadget Communication with Tuple SpacesBISSA: Empowering Web gadget Communication with Tuple Spaces
BISSA: Empowering Web gadget Communication with Tuple Spaces
Srinath Perera
 
Architectures, Frameworks and Infrastructure
Architectures, Frameworks and InfrastructureArchitectures, Frameworks and Infrastructure
Architectures, Frameworks and Infrastructure
harendra_pathak
 

Semelhante a Cassandra data access (20)

Composable Parallel Processing in Apache Spark and Weld
Composable Parallel Processing in Apache Spark and WeldComposable Parallel Processing in Apache Spark and Weld
Composable Parallel Processing in Apache Spark and Weld
 
Big data distributed processing: Spark introduction
Big data distributed processing: Spark introductionBig data distributed processing: Spark introduction
Big data distributed processing: Spark introduction
 
Cassandra meetup slides - Oct 15 Santa Monica Coloft
Cassandra meetup slides - Oct 15 Santa Monica ColoftCassandra meetup slides - Oct 15 Santa Monica Coloft
Cassandra meetup slides - Oct 15 Santa Monica Coloft
 
MongoDB Versatility: Scaling the MapMyFitness Platform
MongoDB Versatility: Scaling the MapMyFitness PlatformMongoDB Versatility: Scaling the MapMyFitness Platform
MongoDB Versatility: Scaling the MapMyFitness Platform
 
GraphFrames: DataFrame-based graphs for Apache® Spark™
GraphFrames: DataFrame-based graphs for Apache® Spark™GraphFrames: DataFrame-based graphs for Apache® Spark™
GraphFrames: DataFrame-based graphs for Apache® Spark™
 
BISSA: Empowering Web gadget Communication with Tuple Spaces
BISSA: Empowering Web gadget Communication with Tuple SpacesBISSA: Empowering Web gadget Communication with Tuple Spaces
BISSA: Empowering Web gadget Communication with Tuple Spaces
 
Architectures, Frameworks and Infrastructure
Architectures, Frameworks and InfrastructureArchitectures, Frameworks and Infrastructure
Architectures, Frameworks and Infrastructure
 
Shift: Real World Migration from MongoDB to Cassandra
Shift: Real World Migration from MongoDB to CassandraShift: Real World Migration from MongoDB to Cassandra
Shift: Real World Migration from MongoDB to Cassandra
 
Summer 2017 undergraduate research powerpoint
Summer 2017 undergraduate research powerpointSummer 2017 undergraduate research powerpoint
Summer 2017 undergraduate research powerpoint
 
MongoDB 4.0 새로운 기능 소개
MongoDB 4.0 새로운 기능 소개MongoDB 4.0 새로운 기능 소개
MongoDB 4.0 새로운 기능 소개
 
JPoint'15 Mom, I so wish Hibernate for my NoSQL database...
JPoint'15 Mom, I so wish Hibernate for my NoSQL database...JPoint'15 Mom, I so wish Hibernate for my NoSQL database...
JPoint'15 Mom, I so wish Hibernate for my NoSQL database...
 
Apache Spark on HDinsight Training
Apache Spark on HDinsight TrainingApache Spark on HDinsight Training
Apache Spark on HDinsight Training
 
Kafka Streams - From the Ground Up to the Cloud
Kafka Streams - From the Ground Up to the CloudKafka Streams - From the Ground Up to the Cloud
Kafka Streams - From the Ground Up to the Cloud
 
Apache Spark 101 - Demi Ben-Ari
Apache Spark 101 - Demi Ben-AriApache Spark 101 - Demi Ben-Ari
Apache Spark 101 - Demi Ben-Ari
 
Spark
SparkSpark
Spark
 
Spring data presentation
Spring data presentationSpring data presentation
Spring data presentation
 
AWS Big Data Demystified #1: Big data architecture lessons learned
AWS Big Data Demystified #1: Big data architecture lessons learned AWS Big Data Demystified #1: Big data architecture lessons learned
AWS Big Data Demystified #1: Big data architecture lessons learned
 
Introduction to TitanDB
Introduction to TitanDB Introduction to TitanDB
Introduction to TitanDB
 
Otimizações de Projetos de Big Data, Dw e AI no Microsoft Azure
Otimizações de Projetos de Big Data, Dw e AI no Microsoft AzureOtimizações de Projetos de Big Data, Dw e AI no Microsoft Azure
Otimizações de Projetos de Big Data, Dw e AI no Microsoft Azure
 
PostgreSQL - Object Relational Database
PostgreSQL - Object Relational DatabasePostgreSQL - Object Relational Database
PostgreSQL - Object Relational Database
 

Último

Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
panagenda
 

Último (20)

Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
 
Google I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGoogle I/O Extended 2024 Warsaw
Google I/O Extended 2024 Warsaw
 
The Metaverse: Are We There Yet?
The  Metaverse:    Are   We  There  Yet?The  Metaverse:    Are   We  There  Yet?
The Metaverse: Are We There Yet?
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM Performance
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджера
 
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
 
Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024
 
2024 May Patch Tuesday
2024 May Patch Tuesday2024 May Patch Tuesday
2024 May Patch Tuesday
 
Oauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoftOauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoft
 
Introduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptxIntroduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptx
 
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
 
ADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptxADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptx
 
Intro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxIntro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptx
 
Collecting & Temporal Analysis of Behavioral Web Data - Tales From The Inside
Collecting & Temporal Analysis of Behavioral Web Data - Tales From The InsideCollecting & Temporal Analysis of Behavioral Web Data - Tales From The Inside
Collecting & Temporal Analysis of Behavioral Web Data - Tales From The Inside
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
 
ERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage IntacctERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage Intacct
 
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfIntroduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
 
Microsoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireMicrosoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - Questionnaire
 
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
 

Cassandra data access

  • 2. eBuddy use of Cassandra
  • 3. XMS
  • 4. ● User Data Service ● User Discovery Service ● Persistent Session Store ● Message History ● Location-based Discovery Cassandra in eBuddy Messaging Platform
  • 5. ● Current size of data ● 1,4 TiB total (replication of 3x); 467 GiB actual data ● 12 million sessions (11 million users plus groups) ● Almost a billion rows in one column family (inverse social graph) Some Statistics
  • 6. Data Access - Overview
  • 7. Design Objectives ● Data Source Agnostic ● Testable ● Thread Safe ● Strong Typing ● Supports “transactions”, i.e. units of work in batch ● Efficient Mapping to Application Domain Model ● Follows Familiar Patterns (e.g. Spring JDBC Template)
  • 8. Data Access in Layers
  • 10. Writing ● Use Generic Typing ● Has Interface (for testability, etc.) ● Handles Exceptions
  • 12. Serializers ● Constructed with serializers that convert to types needed by data access layer
  • 15. Data Access Object ● Data Access Object (DAO) is singleton ● Transforms from data model to domain model ● Operations object configured with serializers to convert from data model to domain model ● Defines the mappers for read operations
  • 17. CQL3 DataStax: "We believe that CQL3 is a simpler and overall better API for Cassandra than the thrift API is. Therefore, new projects/applications are encouraged to use CQL3" At eBuddy, we are still using the Thrift API and the Java Hector library. We are currently looking at CQL3 and whether we want to use it going forward and whether we will "upgrade" existing code.
  • 18. Structured Data ● Object Mapping Frameworks ● Mapped vs. Embedded Objects ● Nested Properties ("path" access)
  • 19. Object Mapping Frameworks ● Simple mapper frameworks with (some) JPA support ● Hector Object Mapper ● Kundera ● Firebrand (not JPA) ● has most features, e.g supports both embedded and mapped object graphs https://github.com/impetus-opensource/Kundera http://github.com/hector-client/hector http://firebrandocm.org
  • 20. Hierarchical Properties ● Use DynamicComposites to model keys that have a variable number of components put(“accounts|msn|x.y.z|sign_in”, “0”); put(“accounts|msn|x.y.z|key”, “value”); get(“accounts”) --> retrieved as a map: {"accounts": { "msn": { "x.y.z": { "sign_in": "0", "key": "value" } } } } ● Use a slice query to retrieve properties using partial path: