voltrb / volt

A Ruby web framework where your Ruby runs on both server and client
MIT License
3.22k stars 196 forks source link

Why is mongo a hard dependency? #16

Open postmodern opened 10 years ago

postmodern commented 10 years ago

Volt should be backend agnostic? Shouldn't mongo be added to new project's Gemfiles instead?

thiagofm commented 10 years ago

It should, but from what I've looked it's still early stage and there should be a couple of refactors(like to use adapters instead) in order to make volt database agnostic.

ryanstout commented 10 years ago

@postmodern Yea, the plan is to make it somewhat backend agnostic (as much as possible). Rethinkdb is the next to be added, but for now its early. I'll move mongo out to the default Gemfile though.

jasdeepsingh commented 10 years ago

:+1: for this proposition. I haven't had a chance to dive through the code yet, but will probably start doing so at some point this week to highlight any such areas that can be improved.

bglusman commented 10 years ago

Can probably support Postgres via HStore also, right? That'd be nice for people using volt alongside existing apps and supporting heroku if so... maybe I can work on that, dunno, though wouldn't mind playing with Rethink or Riak perhaps also. Could even try Redis?

ryanstout commented 10 years ago

@bglusman Yea, I think hstore is an option too. Right now a lot of the API's for the model interfaces are changing, so at the moment I think its a bit early to start adding other stores. I want the API's to settle and then I'll start abstracting some of the interface on the backend to make it easier to plug back-end's in.

jdickey commented 10 years ago

@ryanstout from experience, I'd strongly recommend developing with a second similar-but-different-enough-to-matter backend. There are some decisions you've already made; there are other decisions you often don't realise you've already made until you revisit them in the guise of getting another (database/swappable component) to the point where it's actually swappable. Knowing from experience that you haven't inadvertently locked yourself into a tool-X-or-nothing straitjacket can be Handy.

ryanstout commented 10 years ago

@jdickey Definitely. Rethinkdb will probably be next on the list. Once I get a few more mongo features supported, I'll start adding in the second. (I just want to get enough mongo features going that I can build some more impressive demo's and get more interest in volt) I'm trying to abstract for possible future databases as I go, but like you said, it's hard to see until you get there. Hopefully I can start building in the next database asap :-)

jdickey commented 10 years ago

sorry, typing in the wrong window; ignore :P

falti commented 9 years ago

Started with some idea here: https://github.com/voltrb/volt/pull/64

falti commented 9 years ago

I was exploring the options and found this gem https://github.com/minad/moneta

Looks that this provides abstraction layer for the key/value store problem and has support for various back-ends (incl. mongo and relational dbs)

jdickey commented 9 years ago

I've run across Moneta a few times; never read or experienced anything globally negative about it. I'd agree with what @falti seems to be implying, that @ryanstout may well want to consider Moneta in place of/on top of Mongo.

AstonJ commented 9 years ago

:+1: for Postgres with HStore support. Postgres is solid, reliable and trusted - I think using it may help instil confidence in Volt.

There are so many horror stories about Mongo, and I'm not sure if that might negatively impact Volt :/

ryanstout commented 9 years ago

@AstonJ So I've been making some progress with the data provider api. Still working out the details, but I think I'll be able to make fairly easy to wrap existing libraries like sequel and call it from the client. (Then add some extra code to handle automatic updates). I'll keep you posted on the progress.

dsmithco commented 9 years ago

+1 for Postgres/Adapter support

dfl commented 9 years ago

+1 for moneta integration. No need to reinvent the wheel :)

YodaTravis commented 9 years ago

+1 for Postgres support

NikoRoberts commented 9 years ago

+1 postgres support (moneta sounds like a good option to investigate)

ylluminate commented 9 years ago

As I understand it, @ryanstout is close to this. I believe that https://github.com/voltrb/volt-mongo is a testament to that closeness...

whithajess commented 9 years ago

+1 for Postgres support

heri commented 9 years ago

+1 for Postgres

I'm good for mongodb for the apps I have in mind though

jikkujose commented 9 years ago

+1 for postgres

mationai commented 9 years ago

+1 for postgres