37
Art van Scheppingen - Senior (No)SQL DBA @ VidaXL Bart Oleś - Senior Support Engineer @ Severalnines Polyglot persistence: utilizing open source databases as a Swiss pocket knife

open source databases as a Swiss pocket knife Polyglot ... persistence... · Art van Scheppingen - Senior (No)SQL DBA @ VidaXL Bart Oleś - Senior Support Engineer @ Severalnines

  • Upload
    others

  • View
    5

  • Download
    0

Embed Size (px)

Citation preview

Page 1: open source databases as a Swiss pocket knife Polyglot ... persistence... · Art van Scheppingen - Senior (No)SQL DBA @ VidaXL Bart Oleś - Senior Support Engineer @ Severalnines

Art van Scheppingen - Senior (No)SQL DBA @ VidaXLBart Oleś - Senior Support Engineer @ Severalnines

Polyglot persistence: utilizing open source databases as a

Swiss pocket knife

Page 2: open source databases as a Swiss pocket knife Polyglot ... persistence... · Art van Scheppingen - Senior (No)SQL DBA @ VidaXL Bart Oleś - Senior Support Engineer @ Severalnines

Who are we?

Page 3: open source databases as a Swiss pocket knife Polyglot ... persistence... · Art van Scheppingen - Senior (No)SQL DBA @ VidaXL Bart Oleś - Senior Support Engineer @ Severalnines

VidaXL Company Stats

• Online retailer in (mostly) slow moving goods

• Founded 2008

• 350M turnover, 40% growth yearly

• 1500 employees (US, CN, AU, IN, RO, UA)

• HQ in the Netherlands

• 4 warehouses worldwide (NL, US and AU)

Page 4: open source databases as a Swiss pocket knife Polyglot ... persistence... · Art van Scheppingen - Senior (No)SQL DBA @ VidaXL Bart Oleś - Senior Support Engineer @ Severalnines

How does VidaXL sell its goods?

• Own webshop platform in EU, US and AU

• Warehouses in NL, US and AU

• Selling on other platforms, e.g. Amazon, eBay

• Allow selling on our own platform using Mirakl

• B2B drop-shipments

Page 5: open source databases as a Swiss pocket knife Polyglot ... persistence... · Art van Scheppingen - Senior (No)SQL DBA @ VidaXL Bart Oleś - Senior Support Engineer @ Severalnines

VidaXL Technical Foundations

• SAP as ERP system

• Genesys as CS system

• Webshop

• Open source web-based development strategy

• PHP / NodeJS

• Docker

• Cloudflare workers

Page 6: open source databases as a Swiss pocket knife Polyglot ... persistence... · Art van Scheppingen - Senior (No)SQL DBA @ VidaXL Bart Oleś - Senior Support Engineer @ Severalnines

VidaXL DevOps Datastores

• MySQL

• MariaDB (Galera) clusters

• MySQL replication

• PostgreSQL

• SOLR

• Elasticsearch• ELK

• MongoDB

• Couchbase

• (RabbitMQ)

• Prometheus

Page 7: open source databases as a Swiss pocket knife Polyglot ... persistence... · Art van Scheppingen - Senior (No)SQL DBA @ VidaXL Bart Oleś - Senior Support Engineer @ Severalnines

What is Polyglot Persistence?Using multiple specialized persistent stores rather than one single general-purpose database

Page 8: open source databases as a Swiss pocket knife Polyglot ... persistence... · Art van Scheppingen - Senior (No)SQL DBA @ VidaXL Bart Oleś - Senior Support Engineer @ Severalnines

Where does the term come from?

• The way we work is changing

• Enterprise applications are becoming more complex

• Separate (devops/agile) teams

• Ownership of applications

• (Micro)services

• Everyone has their preference

• Various programming languages

• Various storage systems

Page 9: open source databases as a Swiss pocket knife Polyglot ... persistence... · Art van Scheppingen - Senior (No)SQL DBA @ VidaXL Bart Oleś - Senior Support Engineer @ Severalnines

Where does the term come from?

• Monoglot Programming

• Only one programming language allowed

• Readability

• All code is in the same language

• Support

• One platform to support

• Knowledge

• Everybody is an expert

• Is there a jack-of-all-trades language?

Page 10: open source databases as a Swiss pocket knife Polyglot ... persistence... · Art van Scheppingen - Senior (No)SQL DBA @ VidaXL Bart Oleś - Senior Support Engineer @ Severalnines

Where does the term come from?

• Monoglot Programming

• Only one programming language allowed

• Readability

• All code is in the same language

• Support

• One platform to support

• Knowledge

• Everybody is an expert

• Is there a jack-of-all-trades language?

Page 11: open source databases as a Swiss pocket knife Polyglot ... persistence... · Art van Scheppingen - Senior (No)SQL DBA @ VidaXL Bart Oleś - Senior Support Engineer @ Severalnines

Monoglot programming•

Page 12: open source databases as a Swiss pocket knife Polyglot ... persistence... · Art van Scheppingen - Senior (No)SQL DBA @ VidaXL Bart Oleś - Senior Support Engineer @ Severalnines

Monoglot programming

Carpenters actually use a broad variety of tools

Page 13: open source databases as a Swiss pocket knife Polyglot ... persistence... · Art van Scheppingen - Senior (No)SQL DBA @ VidaXL Bart Oleś - Senior Support Engineer @ Severalnines

Polyglot Programming

• Polyglot Programming• Use programming languages for what they are good at• Flexibility

• Use Java for a secure API• Use Scala for real time stream processing• Use Python for text analysis• Tie everything together using AngularJS

• Knowledge• Everybody is expert at one or more languages

Page 14: open source databases as a Swiss pocket knife Polyglot ... persistence... · Art van Scheppingen - Senior (No)SQL DBA @ VidaXL Bart Oleś - Senior Support Engineer @ Severalnines

Polyglot Programming

Page 15: open source databases as a Swiss pocket knife Polyglot ... persistence... · Art van Scheppingen - Senior (No)SQL DBA @ VidaXL Bart Oleś - Senior Support Engineer @ Severalnines

Monoglot Persistence

Page 16: open source databases as a Swiss pocket knife Polyglot ... persistence... · Art van Scheppingen - Senior (No)SQL DBA @ VidaXL Bart Oleś - Senior Support Engineer @ Severalnines

Data storage landscape changes

• Relational data stores (RDBMS)• Key-Value data stores (“NoSQL”)• Columnar data stores (OLAP)• Document data stores (NoSQL)• Graph data stores (GDB)• Big Data

Page 17: open source databases as a Swiss pocket knife Polyglot ... persistence... · Art van Scheppingen - Senior (No)SQL DBA @ VidaXL Bart Oleś - Senior Support Engineer @ Severalnines

Data storage landscape changes

Software

RDBMS Oracle, MySQL, PostgreSQL

Key-Value Redis, Riak

Columnar InfiniDB, Clickhouse

Document MongoDB, Couchbase

Graph Neo4J, Janusgraph

Big Data Hadoop

Page 18: open source databases as a Swiss pocket knife Polyglot ... persistence... · Art van Scheppingen - Senior (No)SQL DBA @ VidaXL Bart Oleś - Senior Support Engineer @ Severalnines

Data storage landscape changes

Software AWS Google

RDBMS Oracle, MySQL, PostgreSQL

RDS, Aurora CloudSQL, Spanner

Key-Value Redis, Riak DynamoDB Datastore

Columnar InfiniDB, Clickhouse Redshift BigQuery

Document MongoDB, Couchbase

SimpleDB Bigtable

Graph Neo4J, Janusgraph Neptune

Big Data Hadoop EMR Cloud Dataproc

Page 19: open source databases as a Swiss pocket knife Polyglot ... persistence... · Art van Scheppingen - Senior (No)SQL DBA @ VidaXL Bart Oleś - Senior Support Engineer @ Severalnines

Even Hadoop has become a polyglot

Page 20: open source databases as a Swiss pocket knife Polyglot ... persistence... · Art van Scheppingen - Senior (No)SQL DBA @ VidaXL Bart Oleś - Senior Support Engineer @ Severalnines

Polyglot Persistence

• Complex problems require different storage systems• Use the right tool for the job, for example

• Use PostgreSQL for financial data• Use MySQL for website contents• Use MongoDB for user profiles• Use Cassandra for real time streams• Use Neo4J for recommendation analysis

Page 21: open source databases as a Swiss pocket knife Polyglot ... persistence... · Art van Scheppingen - Senior (No)SQL DBA @ VidaXL Bart Oleś - Senior Support Engineer @ Severalnines

Use the right tool for the right job

Document storage: MongoDB

Page 22: open source databases as a Swiss pocket knife Polyglot ... persistence... · Art van Scheppingen - Senior (No)SQL DBA @ VidaXL Bart Oleś - Senior Support Engineer @ Severalnines

Use the right tool for the right job

Columnar storage: Cassandra

Page 23: open source databases as a Swiss pocket knife Polyglot ... persistence... · Art van Scheppingen - Senior (No)SQL DBA @ VidaXL Bart Oleś - Senior Support Engineer @ Severalnines

Use the right tool for the right job

Graph storage: Neo4J

Page 24: open source databases as a Swiss pocket knife Polyglot ... persistence... · Art van Scheppingen - Senior (No)SQL DBA @ VidaXL Bart Oleś - Senior Support Engineer @ Severalnines

Polyglot Persistence

Page 25: open source databases as a Swiss pocket knife Polyglot ... persistence... · Art van Scheppingen - Senior (No)SQL DBA @ VidaXL Bart Oleś - Senior Support Engineer @ Severalnines

Polyglot Persistence at VidaXLYes we certainly are polyglots!

Page 26: open source databases as a Swiss pocket knife Polyglot ... persistence... · Art van Scheppingen - Senior (No)SQL DBA @ VidaXL Bart Oleś - Senior Support Engineer @ Severalnines

Quick recap on our data stores

• MySQL• MariaDB (Galera) clusters• MySQL replication• ProxySQL

• PostgreSQL

• SOLR

• Elasticsearch• ELK

• MongoDB

• Couchbase

• (RabbitMQ)

• Prometheus

Page 27: open source databases as a Swiss pocket knife Polyglot ... persistence... · Art van Scheppingen - Senior (No)SQL DBA @ VidaXL Bart Oleś - Senior Support Engineer @ Severalnines

How did this happen?

• Continuous growth

• Hardly any time to overhaul existing systems

• Transition from monolith to microservice architecture

• For each microservice the most optimal solution has been chosen

• Early adopters of new technology

• Gaining advantage over competition

Page 28: open source databases as a Swiss pocket knife Polyglot ... persistence... · Art van Scheppingen - Senior (No)SQL DBA @ VidaXL Bart Oleś - Senior Support Engineer @ Severalnines

From monolith to microservice

Page 29: open source databases as a Swiss pocket knife Polyglot ... persistence... · Art van Scheppingen - Senior (No)SQL DBA @ VidaXL Bart Oleś - Senior Support Engineer @ Severalnines

From monolith to microservice

Page 30: open source databases as a Swiss pocket knife Polyglot ... persistence... · Art van Scheppingen - Senior (No)SQL DBA @ VidaXL Bart Oleś - Senior Support Engineer @ Severalnines

From monolith to microservice

Page 31: open source databases as a Swiss pocket knife Polyglot ... persistence... · Art van Scheppingen - Senior (No)SQL DBA @ VidaXL Bart Oleś - Senior Support Engineer @ Severalnines

From monolith to microservice

Page 32: open source databases as a Swiss pocket knife Polyglot ... persistence... · Art van Scheppingen - Senior (No)SQL DBA @ VidaXL Bart Oleś - Senior Support Engineer @ Severalnines

From monolith to microservice

Page 33: open source databases as a Swiss pocket knife Polyglot ... persistence... · Art van Scheppingen - Senior (No)SQL DBA @ VidaXL Bart Oleś - Senior Support Engineer @ Severalnines

From monolith to microservice

Page 34: open source databases as a Swiss pocket knife Polyglot ... persistence... · Art van Scheppingen - Senior (No)SQL DBA @ VidaXL Bart Oleś - Senior Support Engineer @ Severalnines

What were the challenges?

• Automation

• Increased complexity

• Systems monitoring

• Multiple integrations

• Maintenance becomes more difficult

• Backups

• Scaling

• Software updates

• DevOps are not a DBA

Page 35: open source databases as a Swiss pocket knife Polyglot ... persistence... · Art van Scheppingen - Senior (No)SQL DBA @ VidaXL Bart Oleś - Senior Support Engineer @ Severalnines

What were the solutions?

• Invest in automation

• Never perform any (large) task thrice

• Increase tooling

• Build it ourselves costs time

• Buying/licensing tools costs money

• Keeping the headcount low saves money

• Focus on systems that matter most

• Get (exteneral) help

• Hire DBAs! ;)

Page 36: open source databases as a Swiss pocket knife Polyglot ... persistence... · Art van Scheppingen - Senior (No)SQL DBA @ VidaXL Bart Oleś - Senior Support Engineer @ Severalnines

ClusterControl by Severalnines<some subtitle here?>

Page 37: open source databases as a Swiss pocket knife Polyglot ... persistence... · Art van Scheppingen - Senior (No)SQL DBA @ VidaXL Bart Oleś - Senior Support Engineer @ Severalnines

Thank you