TryGhost / Ghost

Independent technology for modern publishing, memberships, subscriptions and newsletters.
https://ghost.org
MIT License
46.27k stars 10.11k forks source link

Database Options #6264

Closed xorander00 closed 8 years ago

xorander00 commented 8 years ago

I was looking into supported databases, and was led to this page: http://support.ghost.org/config/#database

Looks like SQLite or MySQL are the primary options, while PostgreSQL is a distant 3rd option. Recently, I've been exploring the usage of PostgreSQL for most (if not all) data storage. It supports relational very well, along with document (JSON/JSONB). Key-Value (HSTORE) storage can be done too.

I noticed that Knex is being used as the ORM of choice. While not bad, I've been playing with Massive.js recently and it's quite nice. It's thinner than Knex/Bookshelf, while also having support for KV stores via JSONB.

Is there any interest in this? (Massive.js access layer + PostgreSQL storage)

If so, I might be willing to work on it over the coming few months bit-by-bit and submitting pull requests.

ErisDS commented 8 years ago

Hi @xorander00, I'm really not sure what to say here. I see you only recently signed up on GitHub and this issue is the first one you've raised. I'm honestly not sure if you're new to open source or if this is some sort of Christmas Day prank?!

You're proposing a re-write of an enormous part of our codebase, and dropping support for the two main databases used with only a single sentence of reasoning and a dash of opinion. Furthermore, Ghost is a pretty organised project. We have a slack community and regular meetings - plenty of ways to get involved and to get to know the team. All of this is explained in the readme and contributing guidelines.

If you're looking to contribute, please join in and start with something realistic.

xorander00 commented 8 years ago

No, not a prank. I don't use Github, as I self-host GitLab for my own projects.

This wasn't really meant to be a proposal for a group effort or a feature request from current contributors. Sorry if it came off that way. I just wanted to gauge feedback and see if there's any interest in something like this. I also wanted to see if there's any active discussion in regards to this topic that I might have missed somewhere. It would be a wasteful duplicate of me to do this before seeing if there's a work-in-progress somewhere that I might have missed. The project roadmap I looked at hadn't been updated in a while.

What I'm looking at doing wouldn't drop support for SQLite and MySQL, it would add deeper support for PostgreSQL. I spent some time & looked through the source a bit. Yes, it would require ripping out a not-so-trivial chunk of code, and so would probably take a few months at my pace and schedule.

I'm pretty experienced though (20+ years now), and while a bulk of my code is not open source, I have contributed to projects before, although not in quite a long time. I'll see what I can do in the meantime, and if it's good enough, I'll submit a pull request for you guys to review.

halfdan commented 8 years ago

@xorander00 I think it's a great idea to improve database/feature support for Ghost - but instead of working on integrating a completely new framework (which the core devs then would have to maintain/support/fix issues for) it would be preferable if you directed your work at improving knex.js (which we already know and use). This way both knex.js and Ghost benefit.