SlideShare ist ein Scribd-Unternehmen logo
Searching Cassandra with Solr



Rachel Pedreschi
Lead Technical Evangelist- Datastax Enterprise

@rachelpedreschi
An Introductory Technical Overview of Datastax Enterprise Search
Confidential
What is Search?
2
Confidential 3
Confidential 4
The bright blue butterfly hangs on the breeze.
[the] [bright] [blue] [butterfly] [hangs] [on] [the] [breeze]
Tokens
Confidential 5
Credit: https://developer.apple.com/library/mac/documentation/userexperience/conceptual/SearchKitConcepts/searchKit_basics/searchKit_basics.html
Terms
Confidential
It can be lonely for Solr

6
Confidential
Cassandra
7
✓ Highly available
✓ Linear scalability
✓ Low latency OLTP
queries
C*
Confidential 8
+ =
Confidential
Like… High Availability
9
Data Partitioning
Application
Data Center 1
hash(key) => token(43)
80
10
3050
70
60
40
20
Application
Data Center 1
Replication
hash(key) => token(43)
replication factor = 3
80
10
3050
70
60
40
20
Multi-Data Center Replication
Application
Data Center 1
hash(key) => token(43)
replication factor = 3
80
10
3050
70
60
40
20
Data Center 2
replication factor = 3
81
11
3151
71
61
41
21
Confidential
How does DSE integrate Solr?
13
C*
C*/
S O L R
Confidential 14
Confidential 15
SELECT * FROM
killrvideo.videos
WHERE solr_query='{ "q": "{!
edismax qf="name^2 tags^1
description"}datastax" }';
SELECT id, value FROM
keyspace.table WHERE token(id)
>= -3074457345618258601 AND
token(id) <=
3074457345618258603 AND
solr_query='id:*'
Confidential
Vocab
16
Cassandra term Solr term
Column Family /Table Core
Row Document
Column Field
SSTable Index
… … … …
… … … …
… … … …
… … … …
… … … …
… … … …
… … … …
… … … …
… … … …
… … … …
… … … …
… … … …
… … … …
… … … …
17
Node memory
Node file system
Client
partition key1 first:Oscar last:Orange level:42
partition key2 first:Ricky last:Red
Memtable (corresponds to a CQL table)
Coordinator
CommitLog
AppendOnly
… … … …
… … … …
… … … …
SSTables
Flush current state to SSTable
Compact related

SSTables
W
rite 

<3, Betty, Blue, 63>
Acknowledge
partition key3 first:Betty last:Blue level:63
Compaction
Each write request …
Periodically …
Periodically …
… … … …
… … … …
… … … …
… … … …
… … … …
… … … …
… … … …
… … … …
… … … …
… … … …
… … … …
… … … …
… … … …
… … … …
18
Node memory
Node file system
Client
1 best 1
2 bright 2,3
Ram Buffer
Coordinator
… … … …
… … … …
… … … …
Segments
Flushes current state to Segment (Softcommit)
Write 

<1,blue, 2,3>
3 blue 2,3
Merge (STW)
Each write request …
Periodically …
On C* Memtable Flush, In memory segments hard commit to disk
Shard Router
… … … …
… … … …
… … … …
… … … …
… … … …
… … … …
… … … …
… … … …
… … … …
… … … …
… … … …
… … … …
… … … …
… … … …
… … … …
… … … …
… … … …
… … … …
19
Node memory
Node file system
1 best 1
2 bright 2,3
Ram Buffer
… … … …
… … … …
… … … …
Segments
3 blue 2,3
Not Searchable
Searchable
Coordinator
Shard Router
… … … …
… … … …
… … … …
… … … …
… … … …
… … … …
… … … …
… … … …
… … … …
Confidential
And… Scalability
20
Application
80
10
3050
70
60
40
20Data Center 1
Application
Data Center 1
80
10
30
50
70
60
40
20
Application
Data Center 1
80
8
32
56
72
64
48
16
24
4040
24
Confidential
Even… Improved Performance
24
Confidential 25
Standard Solr Indexing
DSE Search Live Indexing
Confidential 26
Confidential
Let’s go code diving!
27
Confidential
Behind the scenes…
28
// Videos by id
CREATE TABLE videos (
videoid uuid,
userid uuid,
name text,
description text,
location text,
location_type int,
preview_image_location text,
tags set<text>,
added_date timestamp,
PRIMARY KEY (videoid)
);
// Index for tag keywords
CREATE TABLE videos_by_tag (
tag text,
videoid uuid,
added_date timestamp,
userid uuid,
name text,
preview_image_location text,
tagged_date timestamp,
PRIMARY KEY (tag, videoid)
);
Not a great idea
Possible Index
Confidential 29
//Videos by id
CREATE TABLE videos (
videoid uuid,
userid uuid,
name text,
description text,
location text,
location_type int,
preview_image_location text,
tags set<text>,
added_date timestamp,
PRIMARY KEY (videoid)
And
this?
This?
This?
Confidential 30
Confidential 31
1) Spin up a new C* Cluster with search enabled using the DSE
installer.
$ sudo service dse cassandra -s
2) Run your schema DDL to create the C* keyspace and tables.
3) Run dse_tool on the videos table
$ dsetool create_core killrvideo.videos generateResources=true
4) Use the Solr Admin to check sanity and make sure you have a
core.
5) Write a CQL query with a Solr Search in it.
SELECT * FROM killrvideo.videos
WHERE solr_query='{ "q": "{!edismax qf="name^2 tags^1 description
"}datastax" }';
Confidential
Search all of the things in 5 easy steps…
32
Confidential
Resources
33
www.killrvideo.com
https://github.com/LukeTillman/killrvideo-csharp
www.datastax.com
Confidential 34
Questions?
35
50% off Priorty Pass:
RachelP50
25% Certification:
RachelPCert
Thank You
@RachelPedreschi

Weitere ähnliche Inhalte

PDF
Apache Cassandra - Einführung
Andreas Finke
 
PDF
Tech Talk Cassandra
adesso AG
 
PDF
Streaming Plattformen und die Qual der Wahl
Matthias Niehoff
 
PDF
MongoDB für Java Programmierer (JUGKA, 11.12.13)
Uwe Printz
 
PDF
Private Cloud mit Open Source
Daniel Schneller
 
PDF
Ceph Object Store
Daniel Schneller
 
PPTX
Storage Spaces Direct - Introduction
[MVP] Florian Klaffenbach
 
PDF
DOAG Webinar Oracle und Docker
Stefan Oehrli
 
Apache Cassandra - Einführung
Andreas Finke
 
Tech Talk Cassandra
adesso AG
 
Streaming Plattformen und die Qual der Wahl
Matthias Niehoff
 
MongoDB für Java Programmierer (JUGKA, 11.12.13)
Uwe Printz
 
Private Cloud mit Open Source
Daniel Schneller
 
Ceph Object Store
Daniel Schneller
 
Storage Spaces Direct - Introduction
[MVP] Florian Klaffenbach
 
DOAG Webinar Oracle und Docker
Stefan Oehrli
 

Was ist angesagt? (15)

PPTX
Schlaglichter Oracle DB 11gR2 - DOAG Regio-Treffen 2010 - OPITZ CONSULTING - ...
OPITZ CONSULTING Deutschland
 
PDF
Tipps & Tricks für den erfolgreichen Einsatz von GPU-Computing
Jörn Dinkla
 
PDF
GPU-Computing mit CUDA und OpenCL in der Praxis
Jörn Dinkla
 
PPTX
Multi-GPU-Computing: Eins, zwei, drei, ganz viele
Jörn Dinkla
 
PDF
openstack Übersicht @GPN15
m1no
 
PDF
Ceph Introduction @GPN15
m1no
 
PDF
AOUG 2019 Oracle Centrally Managed Users 18c / 19c
Stefan Oehrli
 
PDF
Oracle und Docker
Stefan Oehrli
 
PDF
Mit OpenStack zur eigenen Cloud (OSDC 2012)
hastexo
 
PDF
Andreas Jordan – IT-Tage 2015 – Flashback – Warum Oracle Zeitreisen anbieten ...
Informatik Aktuell
 
PDF
Exadata with VM as Consolidation Plattform
Daniele Massimi
 
PDF
Private Cloud mit Ceph und OpenStack
Daniel Schneller
 
PDF
Twisted Eventloop Short Presentation
frog32
 
PDF
OSMC 2021 | SNMP Monitoring mit Prometheus / OIDs dynamisch auswählen und im ...
NETWAYS
 
PDF
Infrastructure as code: Cloud-Umgebungen mit Terraform verwalten
inovex GmbH
 
Schlaglichter Oracle DB 11gR2 - DOAG Regio-Treffen 2010 - OPITZ CONSULTING - ...
OPITZ CONSULTING Deutschland
 
Tipps & Tricks für den erfolgreichen Einsatz von GPU-Computing
Jörn Dinkla
 
GPU-Computing mit CUDA und OpenCL in der Praxis
Jörn Dinkla
 
Multi-GPU-Computing: Eins, zwei, drei, ganz viele
Jörn Dinkla
 
openstack Übersicht @GPN15
m1no
 
Ceph Introduction @GPN15
m1no
 
AOUG 2019 Oracle Centrally Managed Users 18c / 19c
Stefan Oehrli
 
Oracle und Docker
Stefan Oehrli
 
Mit OpenStack zur eigenen Cloud (OSDC 2012)
hastexo
 
Andreas Jordan – IT-Tage 2015 – Flashback – Warum Oracle Zeitreisen anbieten ...
Informatik Aktuell
 
Exadata with VM as Consolidation Plattform
Daniele Massimi
 
Private Cloud mit Ceph und OpenStack
Daniel Schneller
 
Twisted Eventloop Short Presentation
frog32
 
OSMC 2021 | SNMP Monitoring mit Prometheus / OIDs dynamisch auswählen und im ...
NETWAYS
 
Infrastructure as code: Cloud-Umgebungen mit Terraform verwalten
inovex GmbH
 
Anzeige

Andere mochten auch (8)

PDF
Migrating Netflix from Datacenter Oracle to Global Cassandra
Adrian Cockcroft
 
PPTX
Cql – cassandra query language
Courtney Robinson
 
PDF
Apache Cassandra and DataStax Enterprise Explained with Peter Halliday at Wil...
DataStax Academy
 
PPT
Introduction to cassandra
Nguyen Quang
 
PDF
Introduction to Apache Cassandra
Robert Stupp
 
PDF
Cassandra at eBay - Cassandra Summit 2012
Jay Patel
 
PPTX
Replication and Consistency in Cassandra... What Does it All Mean? (Christoph...
DataStax
 
PPTX
An Overview of Apache Cassandra
DataStax
 
Migrating Netflix from Datacenter Oracle to Global Cassandra
Adrian Cockcroft
 
Cql – cassandra query language
Courtney Robinson
 
Apache Cassandra and DataStax Enterprise Explained with Peter Halliday at Wil...
DataStax Academy
 
Introduction to cassandra
Nguyen Quang
 
Introduction to Apache Cassandra
Robert Stupp
 
Cassandra at eBay - Cassandra Summit 2012
Jay Patel
 
Replication and Consistency in Cassandra... What Does it All Mean? (Christoph...
DataStax
 
An Overview of Apache Cassandra
DataStax
 
Anzeige

Ähnlich wie Solr & Cassandra: Searching Cassandra with DataStax Enterprise (20)

PDF
Stack- und Heap-Overflow-Schutz bei Windows XP und Windows Vista
Johannes Hohenbichler
 
PDF
Hackers Undergroundbook
prasadpsrh
 
PDF
SSD vs HDD: Risiken und Nebenwirkungen der Flash-Technologie - Webinar
Kroll Ontrack GmbH
 
PDF
SSD vs. HDD, Risiken und Nebenwirkungen der Flash Technologie
Kroll Ontrack GmbH
 
PDF
The pain of choice - Important libs for C# developers
FDeitelhoff
 
PDF
Dataservices - Data Processing mit Microservices
QAware GmbH
 
PDF
Storage Trends für KMU
A. Baggenstos & Co. AG
 
PPTX
Datenrettung in Virtuellen Umgebungen
Kroll Ontrack GmbH
 
PDF
Blockchain-based access right management for private data in decentralized cl...
ArtemEger
 
PDF
Wie Endgeräteverschlüsselung funktioniert
Symantec
 
PDF
Reconfigurable System Design and Verification 14 1st Edition Pao-Ann Hsiung
dxfqupq1636
 
PDF
Cynapspro data endpoint protection - Anbindung von Drittsysteme
cynapspro GmbH
 
PDF
Oracle workshop sessiontracing
ciganek
 
PDF
Azure Days 2019: Master the Move to Azure (Konrad Brunner)
Trivadis
 
PDF
MySQL Security SLAC 2015
FromDual GmbH
 
PPTX
Sensitive Daten in der Oracle Datenbank
Ulrike Schwinn
 
PDF
Das "Privacy Handbuch"
Dominik Wind
 
PDF
Introducing Microsoft Sql Server 2008 R2 Ross Mistry And Stacia Misner
vuollipenera
 
PDF
Heise Security - Scheunentor Bluetooth
Thierry Zoller
 
PDF
Praktische Erfahrungen mit den kleinen SPARC S7-2 Servern
JomaSoft
 
Stack- und Heap-Overflow-Schutz bei Windows XP und Windows Vista
Johannes Hohenbichler
 
Hackers Undergroundbook
prasadpsrh
 
SSD vs HDD: Risiken und Nebenwirkungen der Flash-Technologie - Webinar
Kroll Ontrack GmbH
 
SSD vs. HDD, Risiken und Nebenwirkungen der Flash Technologie
Kroll Ontrack GmbH
 
The pain of choice - Important libs for C# developers
FDeitelhoff
 
Dataservices - Data Processing mit Microservices
QAware GmbH
 
Storage Trends für KMU
A. Baggenstos & Co. AG
 
Datenrettung in Virtuellen Umgebungen
Kroll Ontrack GmbH
 
Blockchain-based access right management for private data in decentralized cl...
ArtemEger
 
Wie Endgeräteverschlüsselung funktioniert
Symantec
 
Reconfigurable System Design and Verification 14 1st Edition Pao-Ann Hsiung
dxfqupq1636
 
Cynapspro data endpoint protection - Anbindung von Drittsysteme
cynapspro GmbH
 
Oracle workshop sessiontracing
ciganek
 
Azure Days 2019: Master the Move to Azure (Konrad Brunner)
Trivadis
 
MySQL Security SLAC 2015
FromDual GmbH
 
Sensitive Daten in der Oracle Datenbank
Ulrike Schwinn
 
Das "Privacy Handbuch"
Dominik Wind
 
Introducing Microsoft Sql Server 2008 R2 Ross Mistry And Stacia Misner
vuollipenera
 
Heise Security - Scheunentor Bluetooth
Thierry Zoller
 
Praktische Erfahrungen mit den kleinen SPARC S7-2 Servern
JomaSoft
 

Mehr von DataStax Academy (20)

PDF
Forrester CXNYC 2017 - Delivering great real-time cx is a true craft
DataStax Academy
 
PPTX
Introduction to DataStax Enterprise Graph Database
DataStax Academy
 
PPTX
Introduction to DataStax Enterprise Advanced Replication with Apache Cassandra
DataStax Academy
 
PPTX
Cassandra on Docker @ Walmart Labs
DataStax Academy
 
PDF
Cassandra 3.0 Data Modeling
DataStax Academy
 
PPTX
Cassandra Adoption on Cisco UCS & Open stack
DataStax Academy
 
PDF
Data Modeling for Apache Cassandra
DataStax Academy
 
PDF
Coursera Cassandra Driver
DataStax Academy
 
PDF
Production Ready Cassandra
DataStax Academy
 
PDF
Cassandra @ Netflix: Monitoring C* at Scale, Gossip and Tickler & Python
DataStax Academy
 
PPTX
Cassandra @ Sony: The good, the bad, and the ugly part 1
DataStax Academy
 
PPTX
Cassandra @ Sony: The good, the bad, and the ugly part 2
DataStax Academy
 
PDF
Standing Up Your First Cluster
DataStax Academy
 
PDF
Real Time Analytics with Dse
DataStax Academy
 
PDF
Introduction to Data Modeling with Apache Cassandra
DataStax Academy
 
PDF
Cassandra Core Concepts
DataStax Academy
 
PPTX
Enabling Search in your Cassandra Application with DataStax Enterprise
DataStax Academy
 
PPTX
Bad Habits Die Hard
DataStax Academy
 
PDF
Advanced Data Modeling with Apache Cassandra
DataStax Academy
 
PDF
Advanced Cassandra
DataStax Academy
 
Forrester CXNYC 2017 - Delivering great real-time cx is a true craft
DataStax Academy
 
Introduction to DataStax Enterprise Graph Database
DataStax Academy
 
Introduction to DataStax Enterprise Advanced Replication with Apache Cassandra
DataStax Academy
 
Cassandra on Docker @ Walmart Labs
DataStax Academy
 
Cassandra 3.0 Data Modeling
DataStax Academy
 
Cassandra Adoption on Cisco UCS & Open stack
DataStax Academy
 
Data Modeling for Apache Cassandra
DataStax Academy
 
Coursera Cassandra Driver
DataStax Academy
 
Production Ready Cassandra
DataStax Academy
 
Cassandra @ Netflix: Monitoring C* at Scale, Gossip and Tickler & Python
DataStax Academy
 
Cassandra @ Sony: The good, the bad, and the ugly part 1
DataStax Academy
 
Cassandra @ Sony: The good, the bad, and the ugly part 2
DataStax Academy
 
Standing Up Your First Cluster
DataStax Academy
 
Real Time Analytics with Dse
DataStax Academy
 
Introduction to Data Modeling with Apache Cassandra
DataStax Academy
 
Cassandra Core Concepts
DataStax Academy
 
Enabling Search in your Cassandra Application with DataStax Enterprise
DataStax Academy
 
Bad Habits Die Hard
DataStax Academy
 
Advanced Data Modeling with Apache Cassandra
DataStax Academy
 
Advanced Cassandra
DataStax Academy
 

Solr & Cassandra: Searching Cassandra with DataStax Enterprise