I did some research on possibilities to migrate WordPress to MongoDB or other NoSQL database to make it really scalable.
Seams there is quite good way (unfortunatelly not a short one) to achieve this.
For a start I've done little script in PHP which is migrating MySQL tables to Mongo collections doing some aggregations while preserving original relational dependencies:
https://github.com/virtimus/mysql2mongo
Next step which I'm now working on is to make MongoDB understand something which would be "close" to SQL - I've named it "nSQL" - it's json based dialect of SQL operating on hierachical collections
https://github.com/virtimus/nsqlserver
It's a work in progress - nothing yet there committed - however I have already offline w protype version which processes simple nSQL queries of the form:
db.runCommand(
{nsQL:
{
sel:['id','emailUse','emailType','emailSubject'], // properties/colums to return
flt:{emailUse:0,emailType:'test'}, // filter (where phrase equivalent)
ctb:'wp_eshop_emails' // table equivalent (can be agregated in collection as path)
},
cid:ci, //connection id
sid:si //session id
})
It can work on both MySQL, MongoDB or almost any other Relational/non relational backend
It's compilation of two projects:
- a MongoDB fork (slightly extended MongoDB version by some "nSQL" commands)
- a fork of SQLRelay project (relational DB proxy handling many SQL backends)
OK - so above component would be the main part of work. There is a lot of development to make it fully functional (handling of aggregations, sorting, subdocument filters, inserts/updates/deletes, maybe also joins etc)
End effect seems to be very promissing in general - not only for WP.
Imagine for instance SQL to NoSQL migration using several simple "INSERT FROM INTO" commands ...
The rest of work would be to connect it with WordPress - through some sort of SQL2NSQL translator (ie this PDO plugin above)
Is there someone interested ? Help in analysis/development ? Financial investing ?