SlideShare a Scribd company logo
Working with NoSQL
in a SQL Database (XDevApi)
Lior Altarescu
Lioral@wix.com linkedin/lioraltarescu github.com/lioraltarescu
▪ 7 years a DBA…
▪ Oracle, MySQL, MongoDB,
Elasticsearch, Cassandra, and
PostgreSQL
▪ Proud data nerd
TODAY
What X DevAPI is
Nosql and SQL in a single
database
CRUD operations
Our experience with it
One big JSON
X 130M
One big JSON
X 130M
One big JSON
Team
(microservice)
#1
Team
(microservice)
#2
How developers
see data
How developers see data How DBAs see data
Choose...?
MySQL
What is
X DevAPI?
01
X DevAPI MySQL
C++
Java
.Net
Node.js
Python
PHP
X Plugin
Async CRUD
operations
X DevAPI MySQL
C++
Java
.Net
Node.js
Python
PHP
X Plugin
Async CRUD
operations
session
Transparently
scale to a
multiple server
environment
MySQLX DevAPI
It’s a
document
datastore.
session
MySQL
It’s a
document
datastore.
Schemaless
NoSQL, fully ACID
Keeps data integrity
Allows SQL & CRUD
Max Document size 1G
Very secure
GTID Replication
transaction_isolation
MySQL
ID #1
JSON
Collection A
A collection
of…
documents.
NoSQL and SQL
in a single database
02
Storage
Optimizer
MySQL
connection
handling
Application
MySQL Connector / ODBC
Classic
MySQL protocol
MySQL
Application
MySQL Connector / ODBCX DevAPI
X DevAPI
X DevAPI
SQL
result
MySQL
Storage
Optimizer
MySQL
connection
handling
X Plugin
Classic
MySQL protocolX protocol
Application
MySQL Connector / ODBC
MySQL Shell
Node.js Application
Windows Application
JavaScript / Python
MySQL C / Node.js
MySQL connector / Net
X DevAPI
X DevAPI
X DevAPI
SQL
result
MySQL
Storage
Optimizer
MySQL
connection
handlingX PluginX Plugin
Classic
MySQL protocolX protocol
CRUD operations
with X DevAPI
03
A New
Collection
db.createCollection('meetup_collection’)
<Collection:meetup_collection>
List / Drop a
Collection
db.getCollections()
[
<Collection:items_table>,
<Collection:meetup_collection>
]
-- drop collection
db.dropCollection('meetup_collection')
db.getCollections()
[
<Collection:items_table>
]
A New
Document
with SQL:
insert into items_table values(‘phone’,21443,’blue’);
insert into items_table values(‘phone’,567734,’pink’);
with X DevAPI:
db.items_table.add({"name":"phone","price":21443,"color":"blue"}).
add({"name":"tablet","price":567734,"color":"pink"})
A New
Document
with SQL:
insert into items_table values(‘phone’,21443,’blue’);
insert into items_table values(‘phone’,567734,’pink’);
with X DevAPI:
db.items_table.add({"name":"phone","price":21443,"color":"blue"}).
add({"name":"tablet","price":567734,"color":"pink"})
//OR
db.items_table.add({"name":"phone","price":21443,"color":"blue"})
db.items_table.add({"name":"tablet","price":567734,"color":"pink"})
Find a
Document
with SQL:
select * from items_table where price > 25000;
with X DevAPI:
db.items_table.find("price>25000")
db.items_table.find("price>:param").bind(‘param’,’25000’)
Modify a
Document
with SQL:
update items_table set price=11111 where name = 'phone’;
with X DevAPI:
db.items_table.modify("name=phone").set("price","11111")
db.items_table.find("name='phone'")
{
"_id": "00005dc476b00000000000000009",
"name": "phone",
"color": "blue",
"price": 11111
}
Remove a
Document
with SQL:
delete from items_table where name = 'phone'
with X DevAPI:
db.items_table.remove("name='phone'")
A Full Data
Transaction
var myColl = db.createCollection('dummy_collection');
session.startTransaction();
myColl.add({name: 'Rohit', age: 18, height: 1.76}).execute();
session.setSavepoint('sp1')
myColl.add({name: 'Misaki', age: 24, height: 1.65}).execute();
myColl.add({name: 'Leon', age: 39, height: 1.9}).execute();
session.rollbackTo('sp1')
session.commit();
MySQL
@Wix
04
Before X DevAPI
Working with NoSQL in a SQL Database (XDevApi)
Switchover
Does NOT support
the X protocol
Mysql connectors as a replacement to proxySQL ?
Connector XdevAPI Failover Load Balancing
Java ✓ ✓ ✓
Nodejs ✓ ✓ ✘
Python ✓ ✓ ✘
Net ✓ ✓ ✓
PHP ✓ ✓ ✓
C++ ✓ ✘ ✘
Play the Waiting Game
Solution #1
Working with NoSQL in a SQL Database (XDevApi)
InnoDB Cluster
Solution #2
Mysql InnoDB
cluster
Mysql replication
Primary election when the current
primary failure VS
Need to have a script or additional
infrastructure for automatic failover
Advances AdminAPI for administrative
purpose
No AdminAPI, regular commands
Easy to scale with innodb cluster requires some effort to scale
Not mature Solution Mature Solution
VS
Working with NoSQL in a SQL Database (XDevApi)
X DevAPI allows you
to work with MySQL
as a document store
(both relational and
schema-less data).
Takeaways
X DevAPI allows you
to work with MySQL
as a document store
(both relational and
schema-less data).
Takeaways
ProxySQL doesn’t
support it, but we got
around it with InnoDB
cluster.
Q&A
Lioral@wix.com linkedin/lioraltarescu github.com/lioraltarescu
Thank You
Lioral@wix.com linkedin/lioraltarescu github.com/lioraltarescu
Ad

Recommended

Fundamentos de Testes de Software
Fundamentos de Testes de Software
Álvaro Farias Pinheiro
 
Teste de software
Teste de software
Rafael Sanches
 
Curriculo christiane abril13
Curriculo christiane abril13
Christiane Benatti A. de Oliveira
 
Introdução à Gerência de configuração de Software
Introdução à Gerência de configuração de Software
Lucas Amaral
 
Introdução a Tecnologias Web
Introdução a Tecnologias Web
Álvaro Farias Pinheiro
 
Agile code quality metrics
Agile code quality metrics
Gil Nahmias
 
Aula 1 - Introdução a Engenharia de Software
Aula 1 - Introdução a Engenharia de Software
Leinylson Fontinele
 
Entorno de la computadora
Entorno de la computadora
Ever Jonathan Unzueta Cazares
 
SQL Server Performance Tuning Baseline
SQL Server Performance Tuning Baseline
► Supreme Mandal ◄
 
Confie no seu pipeline: Teste automaticamente um aplicativo Java de ponta a p...
Confie no seu pipeline: Teste automaticamente um aplicativo Java de ponta a p...
Elias Nogueira
 
Teste de Software Introdução à Qualidade
Teste de Software Introdução à Qualidade
Camilo Ribeiro
 
Aula 6 - Qualidade de Software
Aula 6 - Qualidade de Software
Leinylson Fontinele
 
Garantia da Qualidade (GQA)
Garantia da Qualidade (GQA)
Júlia Pacheco
 
Aula 8 - Lógica de Programação - Variáveis, Tipos de dados e Operadores
Aula 8 - Lógica de Programação - Variáveis, Tipos de dados e Operadores
André Constantino da Silva
 
Apresentação clipper e harbour
Apresentação clipper e harbour
Edilberto Souza
 
Robot Framework Dos And Don'ts
Robot Framework Dos And Don'ts
Pekka Klärck
 
Black box testing lecture 11
Black box testing lecture 11
Abdul Basit
 
Exemplo de documento de requisitos
Exemplo de documento de requisitos
Leandro Rodrigues
 
Engenharia de requisitos
Engenharia de requisitos
Mailson Queiroz
 
Arquitetura básica de testes para seu projeto Java
Arquitetura básica de testes para seu projeto Java
Elias Nogueira
 
Diagramas de casos de uso - aula 2
Diagramas de casos de uso - aula 2
Franklin Matos Correia
 
ALTER FACE Test Heuristic
ALTER FACE Test Heuristic
Júlio de Lima
 
Prototipação de software
Prototipação de software
Marcio Costa
 
Mini curso de testes ágeis
Mini curso de testes ágeis
Qualister
 
TOTVS - Agile Testing e a Importância de se ter Estratégia de Testes
TOTVS - Agile Testing e a Importância de se ter Estratégia de Testes
Samanta Cicilia
 
TestNG Framework
TestNG Framework
Levon Apreyan
 
Ndb cluster 80_ycsb_mem
Ndb cluster 80_ycsb_mem
mikaelronstrom
 
Angular Unit Testing
Angular Unit Testing
Alessandro Giorgetti
 
Connector/J Beyond JDBC: the X DevAPI for Java and MySQL as a Document Store
Connector/J Beyond JDBC: the X DevAPI for Java and MySQL as a Document Store
Filipe Silva
 
MySQL Document Store and Node.JS
MySQL Document Store and Node.JS
Reggie Burnett
 

More Related Content

What's hot (20)

SQL Server Performance Tuning Baseline
SQL Server Performance Tuning Baseline
► Supreme Mandal ◄
 
Confie no seu pipeline: Teste automaticamente um aplicativo Java de ponta a p...
Confie no seu pipeline: Teste automaticamente um aplicativo Java de ponta a p...
Elias Nogueira
 
Teste de Software Introdução à Qualidade
Teste de Software Introdução à Qualidade
Camilo Ribeiro
 
Aula 6 - Qualidade de Software
Aula 6 - Qualidade de Software
Leinylson Fontinele
 
Garantia da Qualidade (GQA)
Garantia da Qualidade (GQA)
Júlia Pacheco
 
Aula 8 - Lógica de Programação - Variáveis, Tipos de dados e Operadores
Aula 8 - Lógica de Programação - Variáveis, Tipos de dados e Operadores
André Constantino da Silva
 
Apresentação clipper e harbour
Apresentação clipper e harbour
Edilberto Souza
 
Robot Framework Dos And Don'ts
Robot Framework Dos And Don'ts
Pekka Klärck
 
Black box testing lecture 11
Black box testing lecture 11
Abdul Basit
 
Exemplo de documento de requisitos
Exemplo de documento de requisitos
Leandro Rodrigues
 
Engenharia de requisitos
Engenharia de requisitos
Mailson Queiroz
 
Arquitetura básica de testes para seu projeto Java
Arquitetura básica de testes para seu projeto Java
Elias Nogueira
 
Diagramas de casos de uso - aula 2
Diagramas de casos de uso - aula 2
Franklin Matos Correia
 
ALTER FACE Test Heuristic
ALTER FACE Test Heuristic
Júlio de Lima
 
Prototipação de software
Prototipação de software
Marcio Costa
 
Mini curso de testes ágeis
Mini curso de testes ágeis
Qualister
 
TOTVS - Agile Testing e a Importância de se ter Estratégia de Testes
TOTVS - Agile Testing e a Importância de se ter Estratégia de Testes
Samanta Cicilia
 
TestNG Framework
TestNG Framework
Levon Apreyan
 
Ndb cluster 80_ycsb_mem
Ndb cluster 80_ycsb_mem
mikaelronstrom
 
Angular Unit Testing
Angular Unit Testing
Alessandro Giorgetti
 
SQL Server Performance Tuning Baseline
SQL Server Performance Tuning Baseline
► Supreme Mandal ◄
 
Confie no seu pipeline: Teste automaticamente um aplicativo Java de ponta a p...
Confie no seu pipeline: Teste automaticamente um aplicativo Java de ponta a p...
Elias Nogueira
 
Teste de Software Introdução à Qualidade
Teste de Software Introdução à Qualidade
Camilo Ribeiro
 
Garantia da Qualidade (GQA)
Garantia da Qualidade (GQA)
Júlia Pacheco
 
Aula 8 - Lógica de Programação - Variáveis, Tipos de dados e Operadores
Aula 8 - Lógica de Programação - Variáveis, Tipos de dados e Operadores
André Constantino da Silva
 
Apresentação clipper e harbour
Apresentação clipper e harbour
Edilberto Souza
 
Robot Framework Dos And Don'ts
Robot Framework Dos And Don'ts
Pekka Klärck
 
Black box testing lecture 11
Black box testing lecture 11
Abdul Basit
 
Exemplo de documento de requisitos
Exemplo de documento de requisitos
Leandro Rodrigues
 
Engenharia de requisitos
Engenharia de requisitos
Mailson Queiroz
 
Arquitetura básica de testes para seu projeto Java
Arquitetura básica de testes para seu projeto Java
Elias Nogueira
 
ALTER FACE Test Heuristic
ALTER FACE Test Heuristic
Júlio de Lima
 
Prototipação de software
Prototipação de software
Marcio Costa
 
Mini curso de testes ágeis
Mini curso de testes ágeis
Qualister
 
TOTVS - Agile Testing e a Importância de se ter Estratégia de Testes
TOTVS - Agile Testing e a Importância de se ter Estratégia de Testes
Samanta Cicilia
 
Ndb cluster 80_ycsb_mem
Ndb cluster 80_ycsb_mem
mikaelronstrom
 

Similar to Working with NoSQL in a SQL Database (XDevApi) (20)

Connector/J Beyond JDBC: the X DevAPI for Java and MySQL as a Document Store
Connector/J Beyond JDBC: the X DevAPI for Java and MySQL as a Document Store
Filipe Silva
 
MySQL Document Store and Node.JS
MySQL Document Store and Node.JS
Reggie Burnett
 
MySQL Connector/Node.js and the X DevAPI
MySQL Connector/Node.js and the X DevAPI
Rui Quelhas
 
Node.js and the MySQL Document Store
Node.js and the MySQL Document Store
Rui Quelhas
 
Develop PHP Applications with MySQL X DevAPI
Develop PHP Applications with MySQL X DevAPI
Dave Stokes
 
MySQL Day Paris 2016 - MySQL as a Document Store
MySQL Day Paris 2016 - MySQL as a Document Store
Olivier DASINI
 
MySQL Document Store - A Document Store with all the benefts of a Transactona...
MySQL Document Store - A Document Store with all the benefts of a Transactona...
Olivier DASINI
 
MySQL Document Store (Oracle Code Warsaw 2018)
MySQL Document Store (Oracle Code Warsaw 2018)
Vittorio Cioe
 
20171104 hk-py con-mysql-documentstore_v1
20171104 hk-py con-mysql-documentstore_v1
Ivan Ma
 
MySQL Connector/J in the Making of Modern Applications
MySQL Connector/J in the Making of Modern Applications
Filipe Silva
 
MySQL 8.0, what's new ? - Forum PHP 2018
MySQL 8.0, what's new ? - Forum PHP 2018
Olivier DASINI
 
MySQL Document Store
MySQL Document Store
Mario Beck
 
MySQL Document Store -- SCaLE 17x Presentation
MySQL Document Store -- SCaLE 17x Presentation
Dave Stokes
 
[OSC 2020 Online/Nagoya] MySQLドキュメントストア
[OSC 2020 Online/Nagoya] MySQLドキュメントストア
Ryusuke Kajiyama
 
MySQL Document Store for Modern Applications
MySQL Document Store for Modern Applications
Olivier DASINI
 
MySQL as a Document Store
MySQL as a Document Store
Ted Wennmark
 
MySQL 8.0 - What's New ?
MySQL 8.0 - What's New ?
Olivier DASINI
 
Doc store
Doc store
Mysql User Camp
 
Oracle Code Event - MySQL JSON Document Store
Oracle Code Event - MySQL JSON Document Store
Mark Swarbrick
 
Open Source World June '21 -- JSON Within a Relational Database
Open Source World June '21 -- JSON Within a Relational Database
Dave Stokes
 
Connector/J Beyond JDBC: the X DevAPI for Java and MySQL as a Document Store
Connector/J Beyond JDBC: the X DevAPI for Java and MySQL as a Document Store
Filipe Silva
 
MySQL Document Store and Node.JS
MySQL Document Store and Node.JS
Reggie Burnett
 
MySQL Connector/Node.js and the X DevAPI
MySQL Connector/Node.js and the X DevAPI
Rui Quelhas
 
Node.js and the MySQL Document Store
Node.js and the MySQL Document Store
Rui Quelhas
 
Develop PHP Applications with MySQL X DevAPI
Develop PHP Applications with MySQL X DevAPI
Dave Stokes
 
MySQL Day Paris 2016 - MySQL as a Document Store
MySQL Day Paris 2016 - MySQL as a Document Store
Olivier DASINI
 
MySQL Document Store - A Document Store with all the benefts of a Transactona...
MySQL Document Store - A Document Store with all the benefts of a Transactona...
Olivier DASINI
 
MySQL Document Store (Oracle Code Warsaw 2018)
MySQL Document Store (Oracle Code Warsaw 2018)
Vittorio Cioe
 
20171104 hk-py con-mysql-documentstore_v1
20171104 hk-py con-mysql-documentstore_v1
Ivan Ma
 
MySQL Connector/J in the Making of Modern Applications
MySQL Connector/J in the Making of Modern Applications
Filipe Silva
 
MySQL 8.0, what's new ? - Forum PHP 2018
MySQL 8.0, what's new ? - Forum PHP 2018
Olivier DASINI
 
MySQL Document Store
MySQL Document Store
Mario Beck
 
MySQL Document Store -- SCaLE 17x Presentation
MySQL Document Store -- SCaLE 17x Presentation
Dave Stokes
 
[OSC 2020 Online/Nagoya] MySQLドキュメントストア
[OSC 2020 Online/Nagoya] MySQLドキュメントストア
Ryusuke Kajiyama
 
MySQL Document Store for Modern Applications
MySQL Document Store for Modern Applications
Olivier DASINI
 
MySQL as a Document Store
MySQL as a Document Store
Ted Wennmark
 
MySQL 8.0 - What's New ?
MySQL 8.0 - What's New ?
Olivier DASINI
 
Oracle Code Event - MySQL JSON Document Store
Oracle Code Event - MySQL JSON Document Store
Mark Swarbrick
 
Open Source World June '21 -- JSON Within a Relational Database
Open Source World June '21 -- JSON Within a Relational Database
Dave Stokes
 
Ad

Recently uploaded (20)

Data Validation and System Interoperability
Data Validation and System Interoperability
Safe Software
 
ENERGY CONSUMPTION CALCULATION IN ENERGY-EFFICIENT AIR CONDITIONER.pdf
ENERGY CONSUMPTION CALCULATION IN ENERGY-EFFICIENT AIR CONDITIONER.pdf
Muhammad Rizwan Akram
 
Floods in Valencia: Two FME-Powered Stories of Data Resilience
Floods in Valencia: Two FME-Powered Stories of Data Resilience
Safe Software
 
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Anish Kumar
 
Oracle Cloud Infrastructure Generative AI Professional
Oracle Cloud Infrastructure Generative AI Professional
VICTOR MAESTRE RAMIREZ
 
Supporting the NextGen 911 Digital Transformation with FME
Supporting the NextGen 911 Digital Transformation with FME
Safe Software
 
TrustArc Webinar - 2025 Global Privacy Survey
TrustArc Webinar - 2025 Global Privacy Survey
TrustArc
 
National Fuels Treatments Initiative: Building a Seamless Map of Hazardous Fu...
National Fuels Treatments Initiative: Building a Seamless Map of Hazardous Fu...
Safe Software
 
Your startup on AWS - How to architect and maintain a Lean and Mean account J...
Your startup on AWS - How to architect and maintain a Lean and Mean account J...
angelo60207
 
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Alliance
 
Edge-banding-machines-edgeteq-s-200-en-.pdf
Edge-banding-machines-edgeteq-s-200-en-.pdf
AmirStern2
 
Introduction to Typescript - GDG On Campus EUE
Introduction to Typescript - GDG On Campus EUE
Google Developer Group On Campus European Universities in Egypt
 
MuleSoft for AgentForce : Topic Center and API Catalog
MuleSoft for AgentForce : Topic Center and API Catalog
shyamraj55
 
“Why It’s Critical to Have an Integrated Development Methodology for Edge AI,...
“Why It’s Critical to Have an Integrated Development Methodology for Edge AI,...
Edge AI and Vision Alliance
 
The State of Web3 Industry- Industry Report
The State of Web3 Industry- Industry Report
Liveplex
 
Analysis of the changes in the attitude of the news comments caused by knowin...
Analysis of the changes in the attitude of the news comments caused by knowin...
Matsushita Laboratory
 
FIDO Seminar: Targeting Trust: The Future of Identity in the Workforce.pptx
FIDO Seminar: Targeting Trust: The Future of Identity in the Workforce.pptx
FIDO Alliance
 
Artificial Intelligence in the Nonprofit Boardroom.pdf
Artificial Intelligence in the Nonprofit Boardroom.pdf
OnBoard
 
FME for Distribution & Transmission Integrity Management Program (DIMP & TIMP)
FME for Distribution & Transmission Integrity Management Program (DIMP & TIMP)
Safe Software
 
“From Enterprise to Makers: Driving Vision AI Innovation at the Extreme Edge,...
“From Enterprise to Makers: Driving Vision AI Innovation at the Extreme Edge,...
Edge AI and Vision Alliance
 
Data Validation and System Interoperability
Data Validation and System Interoperability
Safe Software
 
ENERGY CONSUMPTION CALCULATION IN ENERGY-EFFICIENT AIR CONDITIONER.pdf
ENERGY CONSUMPTION CALCULATION IN ENERGY-EFFICIENT AIR CONDITIONER.pdf
Muhammad Rizwan Akram
 
Floods in Valencia: Two FME-Powered Stories of Data Resilience
Floods in Valencia: Two FME-Powered Stories of Data Resilience
Safe Software
 
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Anish Kumar
 
Oracle Cloud Infrastructure Generative AI Professional
Oracle Cloud Infrastructure Generative AI Professional
VICTOR MAESTRE RAMIREZ
 
Supporting the NextGen 911 Digital Transformation with FME
Supporting the NextGen 911 Digital Transformation with FME
Safe Software
 
TrustArc Webinar - 2025 Global Privacy Survey
TrustArc Webinar - 2025 Global Privacy Survey
TrustArc
 
National Fuels Treatments Initiative: Building a Seamless Map of Hazardous Fu...
National Fuels Treatments Initiative: Building a Seamless Map of Hazardous Fu...
Safe Software
 
Your startup on AWS - How to architect and maintain a Lean and Mean account J...
Your startup on AWS - How to architect and maintain a Lean and Mean account J...
angelo60207
 
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Alliance
 
Edge-banding-machines-edgeteq-s-200-en-.pdf
Edge-banding-machines-edgeteq-s-200-en-.pdf
AmirStern2
 
MuleSoft for AgentForce : Topic Center and API Catalog
MuleSoft for AgentForce : Topic Center and API Catalog
shyamraj55
 
“Why It’s Critical to Have an Integrated Development Methodology for Edge AI,...
“Why It’s Critical to Have an Integrated Development Methodology for Edge AI,...
Edge AI and Vision Alliance
 
The State of Web3 Industry- Industry Report
The State of Web3 Industry- Industry Report
Liveplex
 
Analysis of the changes in the attitude of the news comments caused by knowin...
Analysis of the changes in the attitude of the news comments caused by knowin...
Matsushita Laboratory
 
FIDO Seminar: Targeting Trust: The Future of Identity in the Workforce.pptx
FIDO Seminar: Targeting Trust: The Future of Identity in the Workforce.pptx
FIDO Alliance
 
Artificial Intelligence in the Nonprofit Boardroom.pdf
Artificial Intelligence in the Nonprofit Boardroom.pdf
OnBoard
 
FME for Distribution & Transmission Integrity Management Program (DIMP & TIMP)
FME for Distribution & Transmission Integrity Management Program (DIMP & TIMP)
Safe Software
 
“From Enterprise to Makers: Driving Vision AI Innovation at the Extreme Edge,...
“From Enterprise to Makers: Driving Vision AI Innovation at the Extreme Edge,...
Edge AI and Vision Alliance
 
Ad

Working with NoSQL in a SQL Database (XDevApi)