Recently I noticed the site www.isdocumentdbreallymongodb.com. The page headline is:


In short, MongoDB is saying that AWS DocumentDB, one of its DB-as-a-service competitors, is not even half-compatible for existing users of its DBAAS MongoDB Atlas.
I think the claim above is terrible, for two reasons:
Given the vectors/sets: Available features FA; Necessary features FN; Feature Popularity Weights W
(FN ⨯ FA) == FN Compatible; Migration is possible.
Set algebra expression FN ⊆ FA is an easier way to say it of course, but for the sake of weighting features by popularity later I suggest a vector of 0, 1 values and this cross-product statement.
FAA ⨯ FAB Feature compatibility vector between products A and B
There is set algebra way to express this too: FAA ∩ FAB, but again for the sake of weighting features by popularity, I suggest vectors of 0, 1 values cross-product’ed to a new vector of 0, 1 values.
count(FAA⨯FAB) / count(FAA) Simple score of B’s compatibility in A’s feature set.
sum(W ⨯ (FAA⨯FAB)) / sum(W ⨯ FAA) Weighted feature compatibility of B in A’s feature set (to recognize some features are more popular than others)
Count(Apps where (FN⨯FA) == FN) / Count(Apps) App population compatibility
Columns in red are less commonly used features that the new DBAAS ‘B’ doesn’t yet have compared to the older DBAAS ‘A’.
|
Company, App |
Core CRUD |
Normal Indexes |
Geo Index |
Aggregation $group |
Aggregation $graphLookup |
|
| Acme Inc. | App P | ● | ● | ● | ||
| App Q | ● | ● | ● | ● | ||
BetterAppsRUs |
AlphaWow | ● | ● | |||
| BetaWow | ● | ● | ● | ● | ||
| GammaWow | ● | ● | ● | |||
| FAA ⨯ FAB | = [ Core CRUD: true, normal index: true, geo index: false, etc. ] = [ 1, 1, 0, 1, 0 ] |
| count(FAA⨯FAB) / count(FAA) | = sum([ 1, 1, 0, 1, 0 ]) / sum([ 1, 1, 1, 1, 1 ]) = 0.60 |
| W (popularity, across apps) | = [ 5/5, 5/5, 1/5, 4/5, 1/5 ] = [ 1.0, 1.0, 0.2, 0.8, 0.2 ] |
| sum(W ⨯ (FAA⨯FAB)) / sum(W ⨯ FAA) | = sum([ 1.0, 1.0, 0.2, 0.8, 0.2 ] ⨯ [ 1, 1, 0, 1, 0 ]) / sum( [ 1.0, 1.0, 0.2, 0.8, 0.2 ] ) = 2.8 / 3.2 = 0.875 |
| Compatible for App P | = true |
| Compatible for App Q | = false |
| Compatible for Acme Inc | = false |
| Compatible customers | = 0 / 2 = 0 |
To put it into English: DBAAS B is only 60% compatible with DBAAS A by a count of features. But weighted by the popularity of the features people actually used, it ticks 87.5% of the boxes potential users would look for. In the end, though, probably neither company would migrate. Both have apps that could migrate but also ones that couldn’t.
The “1182 [tests]” mentioned in www.isdocumentdbreallymongodb.com sound as though they should be the FAA boolean vector of features that I want. But they aren’t.
The tests (Jan 2019 results download link) are a subset of the mongo javascript shell resmoke tests included in the core MongoDB server code. The five dbaas_*.yml test suites used are sensible-for-DBAAS subsets of the same core, aggregation, change_streams, decimal, and json_schema test suites in the normal v3.6.9 repo source.
Every single script is a valid part of continuous integration testing – none of it is cruft, or junk, for that purpose. Running them myself I ended up with exactly the same numbers shown in the table in this competition-comparison page at mongodb.com.
But the scripts are not 1-to-1 tests of features. There are more than twice as many test scripts as features. Most features have a single script, but a minority have up to 5 or even 10 scripts.
Secondly, many tests end up with a “fail” result because of entanglement with another feature unrelated to the one nominally being tested. Examples:
Over 100 tests that neither failed nor passed cleanly (status was ‘further investigation needed’) were also marked “fail”.
Based on what I sampled, I estimate that in truth 65% +/- 15% of MongoDB v3.6 features are covered by AWS DocumentDB. And, as is natural in software evolution, the as-of-yet unsupported features tend to be the least-used ones.
This is the compatibility equation that evaluates to a boolean.
If you can’t live without anything in the list below then, as of Dec 2019, AWS DocumentDB compatibility is false for you.
AWS DocumentDB grants a fixed, high level of privilege (dbAdminAnyDatabase + readWriteAnyDatabase + clusterAdmin) to any user-created for the cluster (doc link). There is no grantRolesToUser command that would afford you the ability to reduce the privileges, e.g. to make a read-only role.
N.b. The popularity weights above are only my own estimates, based on what I’ve seen of several hundred MongoDB deployments.
For a DBA being asked ‘Do we currently use any of the features on the incompatible list?‘ is probably a mini-nightmare; more often than not you feel no more than 95% confident that you know everything the application developers decided to use, and that 5% risk isn’t really small enough to look over.
Feature sets are huge and it’s tempting to reduce them to a single score value, but that is without professionally-applicable value to any given reader. A server software product is compatible or it isn’t, 0 or 1, for any given app that would interact with it.
If you haven’t got a list of feature compatibility you can cut and paste neatly into a 2- or 3-column table you’re not being given what you need. MongoDB Inc.’s marketing did provide a spreadsheet but misleadingly the rows do not represent features 1-to-1.
My estimation is the current release of DocumentDB covers 2/3rd of all features in MongoDB Atlas v3.6. The unsupported features are weighted towards those least-widely used in MongoDB-verse.
If you are considering a move to AWS DocumentDB:
If you would like a feature audit in your existing MongoDB deployment, Percona can help with MongoDB or Percona Cloud Cover consulting services.
Resources
RELATED POSTS