[Nitro] [Og] RFC DBI and SQLRelay URI

Mark Van De Vyver mvyver at gmail.com
Thu Nov 8 17:17:49 EST 2007


On Nov 9, 2007 2:10 AM, Trans <transfire at gmail.com> wrote:
>
>
>
> On Nov 8, 12:42 am, "Mark Van De Vyver" <mvy... at gmail.com> wrote:
> > Hi Devs,
> > Would appreciate thoughts, discussion of the following issues.
> >
> > At the moment the proposed uri for the dbi adapter for the SQLStore is:
> > "dbi-<vendor>://username:pass at localhost:9876/dbname#other-stuff"
> >
> > >From this details about the backend are parsed and added to the @options hash.
> >
> > We'd then have options
> > :adapter => :dbi
> > :dbd      => :<vendor>
> >
> > For non-dbi adapter cases @options[:adapter] and @options[:dbd]
> > contain the same data.
> >
> > Now for the SQLRelay dbd we still need to know the backend the relay
> > connects to, as well as that it is the sqlrelay dbd.
> > Some options:
> >
> > A) have sqlrelay take the place of dbi in the uri, effectively meaning
> > that the dbi is only used for sqlrelay mediated connections. The case
> > for this is that there are already <vendor> adapters, and for example
> > dbi-mysql doesn't (immediately) add anything (in terms of
> > features/functionality).  Case against is that this makes it difficult
> > to ever fully move all sql adapters to the DBI adapter.  Assuming that
> > is every intended, here is where a roadmap would be handy.
> >
> > B) extend the uri to:   "dbi-sqlrelay-<vendor>://etc.".  This would
> > introduce another configuration element: @options[:sqlrelay] =>
> > :<vendor>.  There would also need to be some logic specific to the
> > sqlrelay - but not too tricky.  In this case @options[:sqlrelay] would
> > be nil unless @options[dbd] => :sqlrelay
> >
> > Thoughts, comments?
> > I imagine B) would be the more popular/consensus choice?
>
> Do you have write-up of what it is you're working on? I can't offer
> any advice b/c I've not exactly sure what you are doing.

No write up yet - mainly thoughts at the moment.
I've not started coding anything of SQLRelay yet still 'reflecting' on
the SQLRelay docs.

What exactly do you mean by write up - i.e what would you expect to see?
At the moment I'm just thinking some interesting use cases I might hit.

Cheers
Mark

> Thanks,
> T.
>
> _______________________________________________
> Nitro-general mailing list
> Nitro-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/nitro-general
>


More information about the Nitro-general mailing list