cloudfoundry / diego-notes

Diego Notes
Apache License 2.0
23 stars 7 forks source link

Relational BBS DB #32

Closed emalm closed 8 years ago

emalm commented 8 years ago

I've just added https://github.com/cloudfoundry-incubator/diego-dev-notes/blob/master/proposals/relational-bbs-db.md as an initial high-level proposal for having the BBS support and then switch over to a relational datastore. Please look through it and comment on it here! I've also pointed out a few aspects of operating the CF MySQL release that I'm not clear on, and on which we might want to consult the Core Services team.

emalm commented 8 years ago

We'll also want to have metrics coming from the datastore to assess its health and stability, as we do for etcd today.

TODO: add a section about that.

andrew-edgar commented 8 years ago

the initial schema generation and ongoing modifications would need to be addressed long term. in CC they use that migration tool for the ccmdb to change the schema, add indices etc. how are we planning to do that in GO (using our existing migration type of mechanism)? or have a set of scripts for each DB flavour? are we going to allow a plugin model to support people using their own DB (ie OracleDB, DB2, etc) if they want? If we allow that we would need some sort mechanism to deploy the schema to the target DB

emalm commented 8 years ago

@andrew-edgar: I would assume we can build on the existing migration mechanism in the BBS. Is there some particular reason that wouldn't work?

For the DB dialects, some golang packages such as https://github.com/go-gorp/gorp apparently support certain dialects automatically. https://github.com/golang/go/wiki/SQLDrivers mentions a list of various known drivers that conform to the database/sql/driver interfaces, but it looks like individual drivers have to be compiled into the codebase. I don't think it's unreasonable to start first with MySQL compatibility, especially since there's an active OSS BOSH release for MySQL, and add other drivers later as needed. It's also worth keeping in mind that it's infeasible to run CI against all DB backends (even CC struggles with this across only MySQL and postgres).

emalm commented 8 years ago

@menicosia: we will likely have some questions for you and your team in the coming days. Also, please tell us how we're idiots.

emalm commented 8 years ago

Relational data stores fully supported in Diego v0.1480.0.