Announcing ToroDB Stampede 1.0 beta

A few days ago we published a blog post, “The conundrum of BI/aggregate queries on MongoDB”, where we analyzed and measured some performance issues that happen on MongoDB with aggregate/OLAP/DW type of queries. We also showed that if we would transform the JSON data into a relational form and query it with SQL on a PostgreSQL database, performance can be up to orders of magnitude better. Impressive!

However, this requires a significant effort. The DDL needs to be defined –and this may be non-trivial if the origin data is of high variety. Also the data needs to be migrated, and while there are many ETL tools for that, it is still an involved process. And won’t happen in real-time! What if I require real-time statistics? What if my origin data adds a new property that is not reflected in the DDL? Do I need to sacrifice the “schema-less“ness of MongoDB for being able to perform analytic queries?

Of course not! At least, starting today. I’m very pleased to announce ToroDB Stampede, the first member of ToroDB’s family and 8Kdata’s first commercial product.

stampede

With ToroDB Stampede you will see how your MongoDB collections are transformed, in real time, to a relational structure in PostgreSQL. From there, you can run your native SQL queries on the data and use your favorite Business Intelligence tools, without requiring any ETL or change in your current database infrastructure.

So how does it work? It’s very simple:

  • Stampede works as a secondary (hidden) node on a MongoDB replica set.
  • Once started it will perform a full initial database sync and then will switch to streaming replication mode.
  • All the incoming data is transformed on-the-fly from a document shape (strictly speaking, BSON) into a set of relational tables. Tables will have the names of your document properties, arrays and nested documents will be transformed into relations, and columns named after the corresponding keys.
  • You don’t need to provide any DDL. All the DDL is automagically created by Stampede. Even if new keys or embedded documents appear, new columns and/or tables will be automatically and transparently created.

And this is where the fun begins. Now you have all your MongoDB data in perfectly shaped tables in a PostgreSQL database! Visualization and data exploration are greatly improved, and, more importantly, SQL querying, native SQL querying, is at your hand! Use it to connect to your favorite BI tools. Use it to migrate off of MongoDB to PostgreSQL. Use it to have a SQL replica. Unleash your unstructured data, into a relational database! See the example below to understand how ToroDB generates the tables and columns out of JSON documents, and check the documentation for more information.

toro_stampede_mappingSurely enough, performance matters. Does ToroDB Stampede deliver on the promise of 10-100x faster queries? There’s only one way to find it out. Benchmark time! The following benchmarks used one or more (when MongoDB was used in a sharded configuration) AWS i2.xlarge instances (4 vCPUs, 30GB RAM, 800Gb local SSD). We used a XFS filesystem and basic tunning was done on both MongoDB and PostgreSQL configuration. For each dataset, we manually created 6 different queries, that try to extract business value out of the information. MongoDB queries were done via the Aggregation Framework and Stampede ones with regular (Postgres) SQL. MongoDB 3.2 with WiredTiger (compression enabled, the default) and PostgreSQL 9.6 were used. All the tests were run 5 times, using the first two to warm up the caches and the numbers show the average of the last three runs.

Based on the Github Archive we performed an initial benchmark over a 500Gb dataset. We run 6 different queries (named A through F) which you may check here: MongoDB (A, B, C, D, E, F) and Stampede/PostgreSQL (A, B, C, D, E, F).

stampede-github500gb

Up to 57x faster! All queries are significantly faster than MongoDB, and only one (A) is slightly slower compared to a 3-node MongoDB cluster. Trying with a smaller dataset reveals even bigger differences. This is likely due to a much better buffer management in PostgreSQL:

stampede-github100gb

Woah! 267x faster! Query D takes 2,400 seconds on a single MongoDB node (about 20 minutes), 383 seconds on a three-node MongoDB shard (better, but still more than 6 minutes) and just 9 seconds on a single node PostgreSQL.

Here both MongoDB and Stampede had an index on both the _id and actor.login fields. Stampede will automatically replicate any index created in MongoDB (no action required on your side). We also wanted to try whether indexes were being used and what impact they had on the performance:

stampede-github100gb-no_idx

From the results we can conclude that: a) PostgreSQL results are almost the same, which is consistent with the assumption that indexes are usually not required for aggregate queries; b) MongoDB worsened the results for query A without indexes… but significantly improved query time for query D, when the index is removed! This may probably an issue with the query planner.

We also benchmarked another data set, based on the flights stats information from Transtats. Similar aggregate queries were written. Data size is smaller (50Gb) which leads to smaller differences:

stampede-transtats

Still, results are consistently faster even when pitched against the three-node MongoDB sharded cluster. And up to 11x faster queries, which is a very significant improvement! While developing Stampede we have performed benchmarks where we have observed more than 2000x faster queries. Of course, this may be a degraded case for MongoDB and surely Stampede does not perform always as well on every single circumstance.

So the recommendation is always the same: please don’t trust our numbers. Do your own. Benchmark Stampede, and please let us know the results.

ToroDB Stampede is fully open source, and it’s already available in our website for download and use. Check the user documentation to learn how to install, configure and run ToroDB Stampede.

If you need more information or you just simply would like to give us your opinion, please feel free to comment below or join the discussion on Hacker News! Thank you.

En 8Kdata buscamos un unicornio

¿Te gusta hackear el protocolo de Mongo? ¿Y traducir de BSON a un lenguaje de clave valor abstracto y de ahí a un modelo relacional? ¿Sientes placer al exprimir hasta el último bit de la maravillosa librería de jOOQ? ¿Eres capaz de escribir más visitors por cada 1000 líneas de código que nadie en el mundo? Si estás asintiendo mientras lees esto, no lo dudes, eres el unicornio que buscamos.

unicorn

Nuestros proyectos estrella ToroDB y BigToro están creciendo a tal ritmo que el equipo de desarrollo de 8Kdata no da abasto y estamos buscando varios desarrolladores para trabajar con nosotros en el Toroplex, nuestra oficina en Alcobendas (Madrid).

¿A quién buscamos?

Tenemos varias plazas vacantes para desarrolladores Java con experiencia profesional anterior y conocimientos de la mejor base de datos software libre (aka PostgreSQL) que quieran volverse igual de locos que nosotros desarrollando la primera base de datos construida 100% en España. Si ACID no es un tipo de música para ti, este es tu sitio.

Además de los requisitos anteriores, se valorará muy positivamente tener conocimientos de sistemas distribuidos, base de datos de Oracle y Amazon Web Services. Y, dada la orientación internacional de la compañía, es importante un nivel mínimo de inglés.

¿Qué harás?

Programar como si no hubiera mañana. Desde hackear el código de PostgreSQL para entender por qué no deja guardar ‘\0’ en el texto, o conseguir lanzar una JVM dentro -sí, DENTRO- de PostgreSQL hasta hacer un backport del código de JSON de PostgreSQL a Greenplum o montar una antena ADS-B en la azotea de nuestra terraza para loggear y procesar en ToroDB los aviones a 360km a la redonda.

¿Qué ofrecemos?

Si quieres unirte a nuestro equipo, te ofrecemos:

  • Salario bruto anual entre 30.000 y 40.000 euros, dependiendo de tu experiencia.
  • Contrato laboral indefinido.
  • Herramientas: portátil a estrenar (PC -vamos, Linux- o Mac)
  • Horario flexible.
  • Posibilidad de teletrabajar algún día a la semana.
  • Flexibilidad en la elección de los días de vacaciones.
  • Libertad y responsabilidad para desarrollar tu trabajo.
  • Amplia y moderna oficina en Alcobendas, con piscina, jacuzzi y cocina siempre provista de bebidas y snacks gratuitos.
  • Además, como compartimos espacio con otogami.com, siempre tendrás una consola o una recreativa para “echar una partidita”.

Si crees que podrías ser uno de nuestros candidatos, por favor, escribe un e-mail a candela@8kdata.com adjuntando tu CV y explicándonos brevemente por qué crees que encajarías perfectamente en los proyectos de la compañía y cuál sería tu disponibilidad de incorporación.

believe

FAQ

¿En qué proyecto participaré?

Actualmente, trabajamos en paralelo en varios proyectos, todos ellos relacionados con las bases de datos y, por eso, hemos abierto varios procesos de selección. Dependiendo de tu CV y disponibilidad, te ofreceremos que participes en uno o en otro.

¿Dónde trabajaría físicamente?

En las oficinas del Grupo 8Kdata, en Alcobendas, con una nevera SMEG siempre llena de cerveza, refrescos, zumos, jamón del bueno, queso y la leche sin lactosa de Matteo. Si quieres conocer nuestra ubicación exacta, pincha aquí.

¿Puedo teletrabajar?

Puntualmente, pero creemos que la cercanía es necesaria para obtener la comunicación y colaboración necesarias para poder cumplir con el ambicioso roadmap de nuestros proyectos.

¿Cómo será el proceso de selección?

  • Primero deberás enviar un correo a candela@8kdata.com con tu CV y un breve resumen de tu perfil y por qué crees que este podría encajar en la actividad de 8Kdata, así como tu disponibilidad para incorporarte a la empresa. Por favor, actualiza el CV para que no se te olvide incluir ningún título oficial que creas que pueda ser relevante. Los títulos oficiales no son indispensables, pero sí se valorarán muy positivamente en alguno de los procesos abiertos.
  • Si tu perfil no se adapta a nuestras necesidades, prometemos contestarte.
  • Si tu perfil cuadra con lo que buscamos, te enviaremos una prueba técnica para hacernos una idea de tu experiencia y habilidades.
  • Si superas la prueba, para conocerte y que nos conozcas, te haremos una entrevista personal.

8 Announcements from 8Kdata

Today is one of those days that mark the history and the future of a startup. At least, that’s what we feel. Too many good news that we want to announce, make public and share with you:

#1. We have acquired Otogami!

Otogami is one of the most renowned startups in the Spanish IT sector. Led by tech gurus David Bonilla and Jerónimo López, this acqui-hiring brings the -much needed- productization and marketing capabilities that 8Kdata and ToroDB need. The whole Otogami staff is now part of 8Kdata’s amazing team.

8kdata-family

#2. We are still on the game!

The two product lines developed and run by Otogami (Otogami itself and Runnics) will continue operating as usual. While departing from 8Kdata’s products and area of expertise, we don’t have any plans to shut them down. No worries!

#3. We have a new office!

To cope with our current team, and our projected growth, we recently moved to Alcobendas (Madrid, Spain), the 3rd largest Spanish city in terms of foreign multinational corporations. Our new Toroplex is a large, cool, modern loft, with two terraces to sun tan while programming 🙂 Our offices are open for you to visit us any time!

#4. Better late than never. We finally have a (new) website!

Even more importantly, now ToroDB has a new home. It will be augmented soon, with more information, documentation and all that you can expect from a database that will reach GA at the end of this year. There’s also dedicated pages to the range of our PostgreSQL’s Professional Services: support, consulting and training.

#5. New Bull on the Block!

Speaking of ToroDB and the roadmap, The next version v0.40 will be out this Q2 2016, and will bring to the table replication support for the MongoDB protocol (as a secondary node) and the Greenplum open source database as a backend, plus significant, really significant, performance improvements. Check it out on our GitHub public repo!

#6. We will be at Percona Live 2016!

If you want to know more about ToroDB, and happen to be in Silicon Valley next week, our CEO Álvaro Hernández will be speaking at the Percona Live 2016 conference about “ToroDB: Supercharging your RDBMS with MongoDB Superpowers”. It’s really cool that we received this invitation, given that we are, initially, a database based on Postgres or Postgres-derived backends!
Hint: maybe, and only maybe, there’s also something about My in that talk 😉

#7. New investors onboard!

Previous Otogami’s investors have joined us. A bunch of well-known Spanish Business Angels and the VC fund Vitamina K are among them. Welcome, and thank you for your trust and support.

#8. One more thing…

Today we’re also announcing Big Toro. Big Toro is a ToroDB-derived product that aims to enable analytics for NoSQL. What do we mean by enabling? Most, if not all, of NoSQL databases, have a hard time doing analytics: they lack native SQL support; and more importantly, they really struggle when doing aggregated queries, due to the unstructured nature of NoSQL.

BigToro, like ToroDB, creates automatic SCHEMAs for you, out of the NoSQL documents, that are replicated in real-time from a MongoDB replica set (no need to ETL!). Then you can use native SQL to make your analytic queries, on top of an analytics database, like Greenplum or CitusDB. Big Toro GA will be announced later this year but the current version is already 100x faster than other solutions.

Back to top