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

More Related Content

PDF
Physical Memory Management.pdf
PDF
File System Implementation - Part1
PPT
PPT Organization Units
PPTX
Slab Allocator in Linux Kernel
PDF
Profiling deep learning network using NVIDIA nsight systems
PDF
RESTful Machine Learning with Flask and TensorFlow Serving - Carlo Mazzaferro
PPT
Database backup & recovery
PDF
Distributed Locking in Kubernetes
Physical Memory Management.pdf
File System Implementation - Part1
PPT Organization Units
Slab Allocator in Linux Kernel
Profiling deep learning network using NVIDIA nsight systems
RESTful Machine Learning with Flask and TensorFlow Serving - Carlo Mazzaferro
Database backup & recovery
Distributed Locking in Kubernetes

What's hot (20)

PPTX
Deletes Without Tombstones or TTLs (Eric Stevens, ProtectWise) | Cassandra Su...
PPT
SIGGRAPH Asia 2008 Modern OpenGL
PPT
41 page replacement fifo
PPTX
Samsung: CMM-H Tiered Memory Solution with Built-in DRAM
PDF
NoSQL databases
PDF
Partitioning tables and indexing them
PPT
Database backup and recovery basics
PDF
Ch 5: Introduction to heap overflows
PPT
Chapter 12 - Mass Storage Systems
PPTX
Chapter 13 silbershatz operating systems
PPTX
Database basics
PPTX
Spark etl
PPTX
Mass Storage Structure
PDF
Kernel Recipes 2017 - 20 years of Linux Virtual Memory - Andrea Arcangeli
PPTX
System components (os)
PDF
CNIT 121: 12 Investigating Windows Systems (Part 1 of 3)
PDF
Part 01 Linux Kernel Compilation (Ubuntu)
PPTX
How to build a streaming Lakehouse with Flink, Kafka, and Hudi
PDF
Why you should care about data layout in the file system with Cheng Lian and ...
PDF
Tzu-Li (Gordon) Tai - Stateful Stream Processing with Apache Flink
Deletes Without Tombstones or TTLs (Eric Stevens, ProtectWise) | Cassandra Su...
SIGGRAPH Asia 2008 Modern OpenGL
41 page replacement fifo
Samsung: CMM-H Tiered Memory Solution with Built-in DRAM
NoSQL databases
Partitioning tables and indexing them
Database backup and recovery basics
Ch 5: Introduction to heap overflows
Chapter 12 - Mass Storage Systems
Chapter 13 silbershatz operating systems
Database basics
Spark etl
Mass Storage Structure
Kernel Recipes 2017 - 20 years of Linux Virtual Memory - Andrea Arcangeli
System components (os)
CNIT 121: 12 Investigating Windows Systems (Part 1 of 3)
Part 01 Linux Kernel Compilation (Ubuntu)
How to build a streaming Lakehouse with Flink, Kafka, and Hudi
Why you should care about data layout in the file system with Cheng Lian and ...
Tzu-Li (Gordon) Tai - Stateful Stream Processing with Apache Flink
Ad

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

PDF
Connector/J Beyond JDBC: the X DevAPI for Java and MySQL as a Document Store
PDF
MySQL Document Store and Node.JS
PDF
MySQL Connector/Node.js and the X DevAPI
PDF
Node.js and the MySQL Document Store
PPTX
Develop PHP Applications with MySQL X DevAPI
PDF
MySQL Day Paris 2016 - MySQL as a Document Store
PDF
MySQL Document Store - A Document Store with all the benefts of a Transactona...
PDF
MySQL Document Store (Oracle Code Warsaw 2018)
PDF
20171104 hk-py con-mysql-documentstore_v1
PDF
MySQL Connector/J in the Making of Modern Applications
PDF
MySQL 8.0, what's new ? - Forum PHP 2018
PDF
MySQL Document Store
PDF
MySQL Document Store -- SCaLE 17x Presentation
PDF
[OSC 2020 Online/Nagoya] MySQLドキュメントストア
PDF
MySQL Document Store for Modern Applications
PDF
MySQL as a Document Store
PDF
MySQL 8.0 - What's New ?
ODP
Doc store
PDF
Oracle Code Event - MySQL JSON Document Store
PDF
Open Source World June '21 -- JSON Within a Relational Database
Connector/J Beyond JDBC: the X DevAPI for Java and MySQL as a Document Store
MySQL Document Store and Node.JS
MySQL Connector/Node.js and the X DevAPI
Node.js and the MySQL Document Store
Develop PHP Applications with MySQL X DevAPI
MySQL Day Paris 2016 - MySQL as a Document Store
MySQL Document Store - A Document Store with all the benefts of a Transactona...
MySQL Document Store (Oracle Code Warsaw 2018)
20171104 hk-py con-mysql-documentstore_v1
MySQL Connector/J in the Making of Modern Applications
MySQL 8.0, what's new ? - Forum PHP 2018
MySQL Document Store
MySQL Document Store -- SCaLE 17x Presentation
[OSC 2020 Online/Nagoya] MySQLドキュメントストア
MySQL Document Store for Modern Applications
MySQL as a Document Store
MySQL 8.0 - What's New ?
Doc store
Oracle Code Event - MySQL JSON Document Store
Open Source World June '21 -- JSON Within a Relational Database
Ad

Recently uploaded (20)

PDF
Developing a website for English-speaking practice to English as a foreign la...
PDF
Flame analysis and combustion estimation using large language and vision assi...
PDF
STKI Israel Market Study 2025 version august
PDF
sustainability-14-14877-v2.pddhzftheheeeee
PDF
Produktkatalog für HOBO Datenlogger, Wetterstationen, Sensoren, Software und ...
PPTX
Custom Battery Pack Design Considerations for Performance and Safety
PDF
sbt 2.0: go big (Scala Days 2025 edition)
PDF
Consumable AI The What, Why & How for Small Teams.pdf
PDF
A contest of sentiment analysis: k-nearest neighbor versus neural network
PDF
Improvisation in detection of pomegranate leaf disease using transfer learni...
PDF
Five Habits of High-Impact Board Members
PPTX
The various Industrial Revolutions .pptx
PDF
Credit Without Borders: AI and Financial Inclusion in Bangladesh
PPTX
Modernising the Digital Integration Hub
PDF
“A New Era of 3D Sensing: Transforming Industries and Creating Opportunities,...
PPT
Geologic Time for studying geology for geologist
PPTX
AI IN MARKETING- PRESENTED BY ANWAR KABIR 1st June 2025.pptx
PPTX
Build Your First AI Agent with UiPath.pptx
PDF
OpenACC and Open Hackathons Monthly Highlights July 2025
PPT
Module 1.ppt Iot fundamentals and Architecture
Developing a website for English-speaking practice to English as a foreign la...
Flame analysis and combustion estimation using large language and vision assi...
STKI Israel Market Study 2025 version august
sustainability-14-14877-v2.pddhzftheheeeee
Produktkatalog für HOBO Datenlogger, Wetterstationen, Sensoren, Software und ...
Custom Battery Pack Design Considerations for Performance and Safety
sbt 2.0: go big (Scala Days 2025 edition)
Consumable AI The What, Why & How for Small Teams.pdf
A contest of sentiment analysis: k-nearest neighbor versus neural network
Improvisation in detection of pomegranate leaf disease using transfer learni...
Five Habits of High-Impact Board Members
The various Industrial Revolutions .pptx
Credit Without Borders: AI and Financial Inclusion in Bangladesh
Modernising the Digital Integration Hub
“A New Era of 3D Sensing: Transforming Industries and Creating Opportunities,...
Geologic Time for studying geology for geologist
AI IN MARKETING- PRESENTED BY ANWAR KABIR 1st June 2025.pptx
Build Your First AI Agent with UiPath.pptx
OpenACC and Open Hackathons Monthly Highlights July 2025
Module 1.ppt Iot fundamentals and Architecture

Working with NoSQL in a SQL Database (XDevApi)