Alternative databases

With the the release of 1.2 and the introduction of the new SQL-like query language it was mentioned that this opened to door to being able to swap out MongoDB for an alternative database engine (e.g. MySQL, PostgreSQL?).

This is something that is still planned or on the horizon? We don’t run MongoDB in our stack at all but we have to for GenieACS, and we’l like to remove that overhead in the future if at all possible.

Yes! The biggest obstacle right now is the fact that the API is tied to MongoDB in that the objects passed from the API retain their MongoDB JSON structure. So this will probably have to wait until a new API is available. So we’re talking v2.0. I don’t currently have an ETA for that though.

Great! Do you think it might be possible to make it work in a backwards compatible way if the data was stored in the same JSON format by using something like Postgres’ JSONB column?

Don’t know if that’s suitable for large nested JSON data. But either way it sounds like a hack IMO. If we must keep the existing API, a better approach would be to write a converter function to emulate the Mongo format. But whether that’s worth the effort is another question. There may be new features in v2.0 (e.g. support for USP) that forces us to abandon the current API anyway.