SlideShare une entreprise Scribd logo
1  sur  22
Télécharger pour lire hors ligne
Introdução ao NOSQL
com Java
Otávio Santana
@otaviojava
https://github.com/otaviojava/
http://about.me/otaviojava
Cassandra Trip Brasil
Cassandra em Cinco Cidades
Data: 2 de setembro, Segunda-Feira
Cidade: Campinas
Data: 3 de setembro, Terça-Feira
Cidade: São Paulo
Data: 3 de setembro, Terça-Feira
Cidade: Online
Data: 4 de setembro, Quarta-Feira
Cidade: Florianópolis
Data: 5 de setembro, Quinta-Feira
Cidade: Brasília
Data: 6 de setembro, Sexta-Feira
Cidade: Salvador
Cassandra Trip Brasil
Cassandra em Cinco Cidades
Link: http://goo.gl/wbjQyz
Data: 2 de setembro, Segunda-Feira
Cidade: Campinas
Data: 3 de setembro, Terça-Feira
Cidade: São Paulo
Data: 3 de setembro, Terça-Feira
Cidade: Online
Data: 4 de setembro, Quarta-Feira
Cidade: Florianópolis
Data: 5 de setembro, Quinta-Feira
Cidade: Brasília
Data: 6 de setembro, Sexta-Feira
Cidade: Salvador
Cassandra Brasil
Planeta Cassandra
Cassandra Brasil Google Groups
Cassandra Brasil Linkedin
Cassandra Trip Brasil
Agenda
Lembrando o passado
NOSQL
NOSQL – Definições
Relacional vs NOSQL
Cassandra
Arquitetura
Hierarquia
Nível de consistência
Modelagem
Exemplo(Spring e CDI Weld)
Relacional
Modelagem: 1970
Configuração aprox:
16kb RAM
800kb armazenamento
NOSQL
Não apenas SQL
Conhecer o melhor
dos dois mundos
Uso específico
A.C.I.D. vs B.A.S.E
Atomicidade
Consistência
Isolamento
Durabilidade
Basicamente Avaliado
Soft-state
Eventualmente persistente
SQL vs NOSQL
Driver
SQL ANSI
Transação
Alto custo de IO
Fácil troca de Banco
Relacionamento
API
Não padronizado
Não Transação
Busca por chave
Difícil troca de Banco
Não relacionamento
Classificação
Arquitetura Armazenamento Estrutura Dados
Chave-Valor
Documentos
Grafo
Família de Colunas
Cassandra
Distribuída
Configurável
Família de Colunas
Cassandra
Gossip
Nível de consistência
Leitura e Escrita
ANY
ONE
LOCAL_QUORUM
EACH_QOURUM
ALL
Disponibilidade
Consistência
Modelagem
TwittSandra
Usuários Seguidores Seguidos
User Line TimeLine Tweets
Column Family Usuários
alice nome : Allison senha : *
bob nome : Roberto senha : *
eve nome : Evelyn senha : *
chuck nome : Carlos senha : * site : datastax.com
Usuários
Column Family Followers
alice bob : mallory : trent :
Seguidores
Column Family Following
alice bob : carlos : david :
Seguidos
Column Family UserLine
alice 125695372 : AXML 126695372 : XCVL 127695372 : XENY
bob 125795372 : SDFG 126895372 : XCVN
eve 125694372 : FDHL
arthur 125600000 : AXML 125800000 : XCVL 127900000 : XENY
Twettes do usuário
Column Family Timeline
bob 125795372 : SDFG 126895372 : XCVN
eve 1279900000 : FDHL
arthur 125600000 : AXML 125800000 : XCVL 127900000 : XENY
alice 125795372 : SDFG 125800000 : XCVL 1279900000 : FDHL
TimeLine
Column Family: Tweets
LMNO timestamp :
175695372
corpo : estou tão
equivicado?
user : carlos
AXML timestamp :
125695372
corpo: recebeu a
minha mensagem? user : alice
DEXDL timestamp :
155695372
corpo: ouvi o que diz. user : eve
BADFO timestamp :
135695372
corpo : manda-me a
senha.
user : mallory
Tweets
Column Family: UserLine
bob 127695372 : XENY126695372 : XCVL 200000000 : LUMP
Column Family: TimeLine
alice
125795372 : SDFG 125800000 : XCVL 1279900000 : FDHL200000000 : LUMP
125695372 : AXML
bob
125795372 : SDFG 126895372 : XCVN 200000000 : LUMP
eve
1279900000 : FDHL 200000000 : LUMP
UserLine e TimeLine
Exemplo
Integração
http://otaviojava.github.io/Easy-Cassandra/
Obrigado
Otávio Santana
@otaviojava
https://github.com/otaviojava/
http://about.me/otaviojava

Contenu connexe

Plus de Otávio Santana

Plus de Otávio Santana (20)

NoSQL design pitfalls with Java
NoSQL design pitfalls with JavaNoSQL design pitfalls with Java
NoSQL design pitfalls with Java
 
Modern Cloud-Native Jakarta EE Frameworks: tips, challenges, and trends.
Modern Cloud-Native Jakarta EE Frameworks: tips, challenges, and trends.Modern Cloud-Native Jakarta EE Frameworks: tips, challenges, and trends.
Modern Cloud-Native Jakarta EE Frameworks: tips, challenges, and trends.
 
Architecting Cloud Computing Solutions with Java [1.1]
Architecting Cloud Computing Solutions with Java [1.1]Architecting Cloud Computing Solutions with Java [1.1]
Architecting Cloud Computing Solutions with Java [1.1]
 
Arquitetando soluções de computação em nuvem com Java
Arquitetando soluções de computação em nuvem com JavaArquitetando soluções de computação em nuvem com Java
Arquitetando soluções de computação em nuvem com Java
 
Build, run, and scale your Java applications end to end
Build, run, and scale your Java applications end to endBuild, run, and scale your Java applications end to end
Build, run, and scale your Java applications end to end
 
Jakarta NoSQL: Meet the first Jakarta EE specification in the Cloud
Jakarta NoSQL: Meet the first Jakarta EE specification in the CloudJakarta NoSQL: Meet the first Jakarta EE specification in the Cloud
Jakarta NoSQL: Meet the first Jakarta EE specification in the Cloud
 
ORMs: Heroes or Villains Inside the Architecture?
ORMs: Heroes or Villains Inside the Architecture?ORMs: Heroes or Villains Inside the Architecture?
ORMs: Heroes or Villains Inside the Architecture?
 
Jakarta EE Meets NoSQL at the Cloud Age
Jakarta EE Meets NoSQL at the Cloud AgeJakarta EE Meets NoSQL at the Cloud Age
Jakarta EE Meets NoSQL at the Cloud Age
 
Boost your APIs with GraphQL 1.0
Boost your APIs with GraphQL 1.0Boost your APIs with GraphQL 1.0
Boost your APIs with GraphQL 1.0
 
Jakarta EE Meets NoSQL in the Cloud Age [DEV6109]
Jakarta EE Meets NoSQL in the Cloud Age [DEV6109]Jakarta EE Meets NoSQL in the Cloud Age [DEV6109]
Jakarta EE Meets NoSQL in the Cloud Age [DEV6109]
 
Let’s Make Graph Databases Fun Again with Java [DEV6043]
Let’s Make Graph Databases Fun Again with Java [DEV6043]Let’s Make Graph Databases Fun Again with Java [DEV6043]
Let’s Make Graph Databases Fun Again with Java [DEV6043]
 
Eclipse JNoSQL: One API to Many NoSQL Databases - BYOL [HOL5998]
Eclipse JNoSQL: One API to Many NoSQL Databases - BYOL [HOL5998]Eclipse JNoSQL: One API to Many NoSQL Databases - BYOL [HOL5998]
Eclipse JNoSQL: One API to Many NoSQL Databases - BYOL [HOL5998]
 
The new generation of data persistence with graph
The new generation of data persistence with graphThe new generation of data persistence with graph
The new generation of data persistence with graph
 
Eclipse JNoSQL updates from JCP September 11
Eclipse JNoSQL updates from JCP September 11Eclipse JNoSQL updates from JCP September 11
Eclipse JNoSQL updates from JCP September 11
 
Stateless Microservice Security via JWT and MicroProfile - Guatemala
Stateless Microservice Security via JWT and MicroProfile - GuatemalaStateless Microservice Security via JWT and MicroProfile - Guatemala
Stateless Microservice Security via JWT and MicroProfile - Guatemala
 
Stateless Microservice Security via JWT and MicroProfile - Mexico
Stateless Microservice Security via JWT and MicroProfile - MexicoStateless Microservice Security via JWT and MicroProfile - Mexico
Stateless Microservice Security via JWT and MicroProfile - Mexico
 
Eclipse JNoSQL: The Definitive Solution for Java and NoSQL Database
Eclipse JNoSQL: The Definitive Solution for Java and NoSQL DatabaseEclipse JNoSQL: The Definitive Solution for Java and NoSQL Database
Eclipse JNoSQL: The Definitive Solution for Java and NoSQL Database
 
Polyglot persistence
Polyglot persistencePolyglot persistence
Polyglot persistence
 
Management 3.0 and open source
Management 3.0 and open sourceManagement 3.0 and open source
Management 3.0 and open source
 
Building a Recommendation Engine with Java EE
Building a Recommendation Engine with Java EEBuilding a Recommendation Engine with Java EE
Building a Recommendation Engine with Java EE
 

Introdução ao NOSQL com Java (Cassandra)