On Oct 11, 2013, at 11:03 AM, Rafael Fernández López wrote:

>       I find it great the idea of creating an external gem and integrate it 
> to the core later on. I understand that not everything can go inside the 
> core, but multiple database support (master-slaves) looks like something 
> really important the core could have without installing external gems.
> 
>       I have been reading on this matter, and octopus looks nice, but what I 
> actually want to avoid is this kind of API:
> 
>       User.where(:name => "Thiago").limit(3).using(:slave_one)
> 
>       I'd love to map internally to one or another database (master or any 
> read-only replication) depending _on what the query will be_. This way you 
> don't have to mess with this kind of calls and everything happens in a 
> transparent way. So, the final sql query involves read only queries, then we 
> can safely access any of the replicas, however, if it involves any creation, 
> deletion or modification, it will connect to the master one.


That's pretty much exactly what replication in octupus does:

https://github.com/tchandy/octopus/wiki/replication

:)

--Matt Jones

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/rubyonrails-core.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to