You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Jon Hermes (JIRA)" <ji...@apache.org> on 2011/04/18 22:49:06 UTC

[jira] [Created] (CASSANDRA-2500) Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter

Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter
---------------------------------------------------------------

                 Key: CASSANDRA-2500
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2500
             Project: Cassandra
          Issue Type: Task
            Reporter: Jon Hermes
            Assignee: Jon Hermes


Create a ruby driver for CQL.
Lacking something standard (such as py-dbapi), going with something common instead -- RoR ActiveRecord Connection Adapter (http://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/AbstractAdapter.html).


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CASSANDRA-2500) Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter

Posted by "Kelley Reynolds (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13085100#comment-13085100 ] 

Kelley Reynolds commented on CASSANDRA-2500:
--------------------------------------------

DBI-like driver is located at https://github.com/kreynolds/cassandra-cql.

One thing to note is that using this driver is incompatible (mostly) with using fauna/cassandra because the thrift bindings use the same namespace and will redeclare constants. This should be solved with a dedicated gem such as located at https://github.com/kreynolds/cassandra-thrift. Would it be possible to automate generation and deployment of the shared gem with the cassandra release process or is that to be left as an exercise for the client developers?

> Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter
> ---------------------------------------------------------------
>
>                 Key: CASSANDRA-2500
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2500
>             Project: Cassandra
>          Issue Type: Task
>          Components: API
>            Reporter: Jon Hermes
>            Assignee: Kelley Reynolds
>              Labels: cql
>             Fix For: 0.8.5
>
>         Attachments: 2500.txt, genthriftrb.txt, rbcql-0.0.0.tgz
>
>
> Create a ruby driver for CQL.
> Lacking something standard (such as py-dbapi), going with something common instead -- RoR ActiveRecord Connection Adapter (http://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/AbstractAdapter.html).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CASSANDRA-2500) Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter

Posted by "Robert Jackson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13043875#comment-13043875 ] 

Robert Jackson commented on CASSANDRA-2500:
-------------------------------------------

I am interested in merging the CQL functionality into the cassandra gem (and this work looks great), but I would hate to duplicate work or have to maintain this in both the gem and in cassandra itself.

Would anyone object to having this maintained in the gem specifically?

Gem source is located at: https://github.com/fauna/cassandra

Robert Jackson

> Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter
> ---------------------------------------------------------------
>
>                 Key: CASSANDRA-2500
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2500
>             Project: Cassandra
>          Issue Type: Task
>            Reporter: Jon Hermes
>            Assignee: Jon Hermes
>         Attachments: 2500.txt, genthriftrb.txt
>
>
> Create a ruby driver for CQL.
> Lacking something standard (such as py-dbapi), going with something common instead -- RoR ActiveRecord Connection Adapter (http://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/AbstractAdapter.html).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CASSANDRA-2500) Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter

Posted by "Jon Hermes (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13034269#comment-13034269 ] 

Jon Hermes commented on CASSANDRA-2500:
---------------------------------------

Ah, no. Hadn't seen that ticket yet. Rolling a v2 after some cogitation.

> Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter
> ---------------------------------------------------------------
>
>                 Key: CASSANDRA-2500
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2500
>             Project: Cassandra
>          Issue Type: Task
>            Reporter: Jon Hermes
>            Assignee: Jon Hermes
>         Attachments: 2500.txt, genthriftrb.txt
>
>
> Create a ruby driver for CQL.
> Lacking something standard (such as py-dbapi), going with something common instead -- RoR ActiveRecord Connection Adapter (http://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/AbstractAdapter.html).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CASSANDRA-2500) Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter

Posted by "Kelley Reynolds (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13070087#comment-13070087 ] 

Kelley Reynolds commented on CASSANDRA-2500:
--------------------------------------------

This may not be the way to have code reviewed but as it's convenient to me, I've made two new repos on github. https://github.com/kreynolds/cassandra-thrift is a gem that contains the generated thrift bindings that are located in the vendor directory in the fauna gem and https://github.com/kreynolds/dbd-cassandra is for the dbd driver that depends on them. I know there has been some discussion about replication of code between projects and it makes sense to me to have all of the vendor (thrift) stuff in it's own gem updated independently from the client/idiomatic implementations such as fauna/dbd/activerecord/whatever.

This is written against 0.8.1-SNAPSHOT so YMMV with 0.8.0. I didn't do a complete refactoring so some things are still suboptimal and the column_info still needs to pull types out for casting but it appears otherwise functional.

> Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter
> ---------------------------------------------------------------
>
>                 Key: CASSANDRA-2500
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2500
>             Project: Cassandra
>          Issue Type: Task
>          Components: API
>            Reporter: Jon Hermes
>            Assignee: Pavel Yaskevich
>              Labels: cql
>             Fix For: 0.8.3
>
>         Attachments: 2500.txt, genthriftrb.txt, rbcql-0.0.0.tgz
>
>
> Create a ruby driver for CQL.
> Lacking something standard (such as py-dbapi), going with something common instead -- RoR ActiveRecord Connection Adapter (http://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/AbstractAdapter.html).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CASSANDRA-2500) Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2500?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Ellis updated CASSANDRA-2500:
--------------------------------------

         Reviewer: codekitchen  (was: xedin)
      Component/s: API
    Fix Version/s: 0.8.2
         Assignee: Pavel Yaskevich  (was: Jon Hermes)
           Labels: cql  (was: )

> Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter
> ---------------------------------------------------------------
>
>                 Key: CASSANDRA-2500
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2500
>             Project: Cassandra
>          Issue Type: Task
>          Components: API
>            Reporter: Jon Hermes
>            Assignee: Pavel Yaskevich
>              Labels: cql
>             Fix For: 0.8.2
>
>         Attachments: 2500.txt, genthriftrb.txt, rbcql-0.0.0.tgz
>
>
> Create a ruby driver for CQL.
> Lacking something standard (such as py-dbapi), going with something common instead -- RoR ActiveRecord Connection Adapter (http://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/AbstractAdapter.html).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CASSANDRA-2500) Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13088887#comment-13088887 ] 

Jonathan Ellis commented on CASSANDRA-2500:
-------------------------------------------

bq. It would be fairly easy to update the fauna/cassandra gem to use an external thrift binding source

That feels like oversolving the problem to me.  Can't we just have cql name its thrift package as cql.cassandra-thrift or whatever so it doesn't conflict with fauna's?

> Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter
> ---------------------------------------------------------------
>
>                 Key: CASSANDRA-2500
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2500
>             Project: Cassandra
>          Issue Type: Task
>          Components: API
>            Reporter: Jon Hermes
>            Assignee: Kelley Reynolds
>              Labels: cql
>             Fix For: 0.8.5
>
>         Attachments: 2500.txt, genthriftrb.txt, rbcql-0.0.0.tgz
>
>
> Create a ruby driver for CQL.
> Lacking something standard (such as py-dbapi), going with something common instead -- RoR ActiveRecord Connection Adapter (http://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/AbstractAdapter.html).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CASSANDRA-2500) Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter

Posted by "Jon Hermes (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2500?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jon Hermes updated CASSANDRA-2500:
----------------------------------

    Attachment: rbcql-0.0.0.tgz

Oops, left some comments in.

> Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter
> ---------------------------------------------------------------
>
>                 Key: CASSANDRA-2500
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2500
>             Project: Cassandra
>          Issue Type: Task
>            Reporter: Jon Hermes
>            Assignee: Jon Hermes
>         Attachments: 2500.txt, genthriftrb.txt, rbcql-0.0.0.tgz
>
>
> Create a ruby driver for CQL.
> Lacking something standard (such as py-dbapi), going with something common instead -- RoR ActiveRecord Connection Adapter (http://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/AbstractAdapter.html).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CASSANDRA-2500) Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13043953#comment-13043953 ] 

Jonathan Ellis commented on CASSANDRA-2500:
-------------------------------------------

(a) I don't think it makes sense to have both APIs in the same module
(b) We're planning to maintain CQL drivers in-tree to avoid the mess we caused by NOT doing this with the Thrift clients

> Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter
> ---------------------------------------------------------------
>
>                 Key: CASSANDRA-2500
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2500
>             Project: Cassandra
>          Issue Type: Task
>            Reporter: Jon Hermes
>            Assignee: Jon Hermes
>         Attachments: 2500.txt, genthriftrb.txt
>
>
> Create a ruby driver for CQL.
> Lacking something standard (such as py-dbapi), going with something common instead -- RoR ActiveRecord Connection Adapter (http://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/AbstractAdapter.html).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CASSANDRA-2500) Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13034253#comment-13034253 ] 

Jonathan Ellis commented on CASSANDRA-2500:
-------------------------------------------

does this support using KEY in a select clause? That was tricky for java and python (CASSANDRA-2622)

> Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter
> ---------------------------------------------------------------
>
>                 Key: CASSANDRA-2500
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2500
>             Project: Cassandra
>          Issue Type: Task
>            Reporter: Jon Hermes
>            Assignee: Jon Hermes
>         Attachments: 2500.txt, genthriftrb.txt
>
>
> Create a ruby driver for CQL.
> Lacking something standard (such as py-dbapi), going with something common instead -- RoR ActiveRecord Connection Adapter (http://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/AbstractAdapter.html).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CASSANDRA-2500) Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter

Posted by "Jon Hermes (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13046015#comment-13046015 ] 

Jon Hermes commented on CASSANDRA-2500:
---------------------------------------

The drivers should be tested functionally the same as the cli is currently. Ideally all the drivers, client libs, etc. should be hooked into a distributed testing framework, but for now it should be valid to just make sure it does the right thing on a single node system.

Regarding packaging and mixing in with the ruby cassandra gem (in this case), I see good reasons to both combine the gems and to keep them seperate:

In the latter case, it's as jbellis pointed out, we don't want to confuse people about which gem they need for a certain feature set (there's little overlap in the usage between this and the ruby cassandra gem). Also, it's possible to commit this to trunk, whereas client libs have historically been kept out of the repo.

In the former, and from a dev perspective, there is a TON of reused code between the ruby cassandra gem and this driver, as there is likewise a TON of reused code between pycassa and the python cql driver. It would be nice to combine them/depend on them just for sanity purposes, and because it would force both gems/libs to be kept up to date and to be generally better.


Overall I'd call it an executive call, and it appears one has already been made.

> Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter
> ---------------------------------------------------------------
>
>                 Key: CASSANDRA-2500
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2500
>             Project: Cassandra
>          Issue Type: Task
>            Reporter: Jon Hermes
>            Assignee: Jon Hermes
>         Attachments: 2500.txt, genthriftrb.txt
>
>
> Create a ruby driver for CQL.
> Lacking something standard (such as py-dbapi), going with something common instead -- RoR ActiveRecord Connection Adapter (http://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/AbstractAdapter.html).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CASSANDRA-2500) Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter

Posted by "Kelley Reynolds (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13070176#comment-13070176 ] 

Kelley Reynolds commented on CASSANDRA-2500:
--------------------------------------------

cassandra-thrift *does* do the same thing as fauna .. that's the point. Right now, there is no canonical source for the generated thrift bindings for Cassandra, it just so happens that the Twitter guys keep them up to date in their gem. To somebody's point earlier, those raw bindings should be maintained within and released when there is a Cassandra release. Here is a pseudo-outline of dependencies

-> cassandra-thrift (the raw gen-rb bindings only, no more, no less)
---> thrift_client (optional wrapper around *any* thrift client)
-----> dbd-cassandra (for the DBI framework)
-----> fauna/cassandra (would no longer be required to gen-rb in this scenario, no duplication)
-----> activerecord adapter (Ruby on Rails crowd)
-----> dm-cassandra (datamapper for that crowd)
-----> whatever

It's not quite accurate in that thrift_client doesn't depend on cassandra-thrift specifically, but pretend it does. The high level clients like dbd-cassandra, fauna/cassandra, etc don't *need* to use thrift_client but could (and some do). In this scenario there is no duplication of code, the client APIs can evolve independently of the thrift bindings, the thrift bindings don't require a re-release of the high level client, and thrift_client is completely optional as it's just sugar on top of the raw thrift client and has nothing specifically to do with anything. Hopefully that helped.



> Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter
> ---------------------------------------------------------------
>
>                 Key: CASSANDRA-2500
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2500
>             Project: Cassandra
>          Issue Type: Task
>          Components: API
>            Reporter: Jon Hermes
>            Assignee: Pavel Yaskevich
>              Labels: cql
>             Fix For: 0.8.3
>
>         Attachments: 2500.txt, genthriftrb.txt, rbcql-0.0.0.tgz
>
>
> Create a ruby driver for CQL.
> Lacking something standard (such as py-dbapi), going with something common instead -- RoR ActiveRecord Connection Adapter (http://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/AbstractAdapter.html).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CASSANDRA-2500) Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter

Posted by "Kelley Reynolds (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13082523#comment-13082523 ] 

Kelley Reynolds commented on CASSANDRA-2500:
--------------------------------------------

As an update, I'm 80% finished completely redoing this outside of an existing ruby DBI framework. The reason for this is that it is a bad fit for ruby-dbi in that not all semantics would be supported and RDBI has not picked up a lot of momentum. Expect a beta version in the next day or two.

> Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter
> ---------------------------------------------------------------
>
>                 Key: CASSANDRA-2500
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2500
>             Project: Cassandra
>          Issue Type: Task
>          Components: API
>            Reporter: Jon Hermes
>            Assignee: Pavel Yaskevich
>              Labels: cql
>             Fix For: 0.8.5
>
>         Attachments: 2500.txt, genthriftrb.txt, rbcql-0.0.0.tgz
>
>
> Create a ruby driver for CQL.
> Lacking something standard (such as py-dbapi), going with something common instead -- RoR ActiveRecord Connection Adapter (http://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/AbstractAdapter.html).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CASSANDRA-2500) Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter

Posted by "Pavel Yaskevich (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2500?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pavel Yaskevich updated CASSANDRA-2500:
---------------------------------------

    Reviewer: xedin  (was: rwjblue)

> Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter
> ---------------------------------------------------------------
>
>                 Key: CASSANDRA-2500
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2500
>             Project: Cassandra
>          Issue Type: Task
>            Reporter: Jon Hermes
>            Assignee: Jon Hermes
>         Attachments: 2500.txt, genthriftrb.txt, rbcql-0.0.0.tgz
>
>
> Create a ruby driver for CQL.
> Lacking something standard (such as py-dbapi), going with something common instead -- RoR ActiveRecord Connection Adapter (http://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/AbstractAdapter.html).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CASSANDRA-2500) Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter

Posted by "Robert Jackson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13044005#comment-13044005 ] 

Robert Jackson commented on CASSANDRA-2500:
-------------------------------------------

As is now (even if this were pulled into trunk for 0.8.1) to have CQL support in any meaningful way we would need to follow the exact same steps as with the thrift interface.  I'm not sure how that would be better.

I'm not sure, but it seems to me that the desired result of keeping the CQL drivers in-tree would be to make sure that they are functional at release time.  If that is correct, but the only way to use the in-tree driver is by "vendoring" the code into a third party library what is the point? The end user/developer would be in a very similar situation as with the thrift interface. (Just copying in these ruby files instead of generating new ones via "thrift --gen rb".)

If we want the driver to be in-tree (which I definitely understand) then it would seem to make sense to push out an updated gem when the API changes with each release.  Similar to how an updated pom is pushed to Maven for the java cql driver.  If that were the case then to have a fully functional CQL api we would simply have to require a cassandra_cql gem (or something).  Then we could build support into our project/gem that would be able to take advantage of the fact that this is kept in tree.

I apologize if all of this has already been hashed out, and I definitely appreciate your position of wanting to have some degree of control over the client library interface.  I also clearly see CQL as an AWESOME step forward. It will certainly be the main mechanism for communicating with Cassandra once the API is fully implemented.

> Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter
> ---------------------------------------------------------------
>
>                 Key: CASSANDRA-2500
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2500
>             Project: Cassandra
>          Issue Type: Task
>            Reporter: Jon Hermes
>            Assignee: Jon Hermes
>         Attachments: 2500.txt, genthriftrb.txt
>
>
> Create a ruby driver for CQL.
> Lacking something standard (such as py-dbapi), going with something common instead -- RoR ActiveRecord Connection Adapter (http://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/AbstractAdapter.html).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CASSANDRA-2500) Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter

Posted by "Jonathan Ellis (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13119577#comment-13119577 ] 

Jonathan Ellis commented on CASSANDRA-2500:
-------------------------------------------

bq. The datatypes tested are the ones listed here

Where should I be looking, at "Specifying Column Type?"

Those need to be updated for CQL 2.0, btw.
                
> Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter
> ---------------------------------------------------------------
>
>                 Key: CASSANDRA-2500
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2500
>             Project: Cassandra
>          Issue Type: Task
>          Components: API
>            Reporter: Jon Hermes
>            Assignee: Kelley Reynolds
>              Labels: cql
>             Fix For: 0.8.7
>
>         Attachments: 2500.txt, genthriftrb.txt, rbcql-0.0.0.tgz
>
>
> Create a ruby driver for CQL.
> Lacking something standard (such as py-dbapi), going with something common instead -- RoR ActiveRecord Connection Adapter (http://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/AbstractAdapter.html).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CASSANDRA-2500) Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter

Posted by "Peter Sanford (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13098241#comment-13098241 ] 

Peter Sanford commented on CASSANDRA-2500:
------------------------------------------

Currently all of the tests run against mock objects (no round trip tests against C*). It seems like the tests that Jonathan mentioned would benefit from actually hitting a C* instance. Any thoughts on this?

> Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter
> ---------------------------------------------------------------
>
>                 Key: CASSANDRA-2500
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2500
>             Project: Cassandra
>          Issue Type: Task
>          Components: API
>            Reporter: Jon Hermes
>            Assignee: Kelley Reynolds
>              Labels: cql
>             Fix For: 0.8.6
>
>         Attachments: 2500.txt, genthriftrb.txt, rbcql-0.0.0.tgz
>
>
> Create a ruby driver for CQL.
> Lacking something standard (such as py-dbapi), going with something common instead -- RoR ActiveRecord Connection Adapter (http://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/AbstractAdapter.html).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CASSANDRA-2500) Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2500?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Ellis updated CASSANDRA-2500:
--------------------------------------

    Assignee: Kelley Reynolds  (was: Pavel Yaskevich)

> Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter
> ---------------------------------------------------------------
>
>                 Key: CASSANDRA-2500
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2500
>             Project: Cassandra
>          Issue Type: Task
>          Components: API
>            Reporter: Jon Hermes
>            Assignee: Kelley Reynolds
>              Labels: cql
>             Fix For: 0.8.5
>
>         Attachments: 2500.txt, genthriftrb.txt, rbcql-0.0.0.tgz
>
>
> Create a ruby driver for CQL.
> Lacking something standard (such as py-dbapi), going with something common instead -- RoR ActiveRecord Connection Adapter (http://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/AbstractAdapter.html).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CASSANDRA-2500) Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter

Posted by "Kelley Reynolds (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13079333#comment-13079333 ] 

Kelley Reynolds commented on CASSANDRA-2500:
--------------------------------------------

Upon further investigation, I think that writing a straight DBI driver as the premier ruby CQL implementation is a bad idea. The largest problem comes from a mismatch in the assumptions the DBI code makes that does not hold true with one of Cassandra's most powerful features, column slicing. DBI assumes that the column metadata does not change with each row but with Cassandra it does with some frequency. Altering DBI to not make those assumptions is non-trivial and it's unlikely they'd be accepted back into the tree anyway. I think at this point the best course of action is to write something that behaves just like DBI but doesn't use that framework at all to get the full capability of CQL and then for a DBI driver, use that thing but disallow slicing or any other operations that break fundamental DBI assumptions.

> Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter
> ---------------------------------------------------------------
>
>                 Key: CASSANDRA-2500
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2500
>             Project: Cassandra
>          Issue Type: Task
>          Components: API
>            Reporter: Jon Hermes
>            Assignee: Pavel Yaskevich
>              Labels: cql
>             Fix For: 0.8.4
>
>         Attachments: 2500.txt, genthriftrb.txt, rbcql-0.0.0.tgz
>
>
> Create a ruby driver for CQL.
> Lacking something standard (such as py-dbapi), going with something common instead -- RoR ActiveRecord Connection Adapter (http://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/AbstractAdapter.html).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CASSANDRA-2500) Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter

Posted by "Eric Evans (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13112692#comment-13112692 ] 

Eric Evans commented on CASSANDRA-2500:
---------------------------------------

I created a project at http://code.google.com/a/apache-extras.org/p/cassandra-ruby, (Kelley, you've been added).

My suggestion would be to get the code all pushed the Apache Extras repo, and when the reviewer(s) is satisfied, this issue can be closed (and subsequent issues opened there).





> Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter
> ---------------------------------------------------------------
>
>                 Key: CASSANDRA-2500
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2500
>             Project: Cassandra
>          Issue Type: Task
>          Components: API
>            Reporter: Jon Hermes
>            Assignee: Kelley Reynolds
>              Labels: cql
>             Fix For: 0.8.7
>
>         Attachments: 2500.txt, genthriftrb.txt, rbcql-0.0.0.tgz
>
>
> Create a ruby driver for CQL.
> Lacking something standard (such as py-dbapi), going with something common instead -- RoR ActiveRecord Connection Adapter (http://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/AbstractAdapter.html).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CASSANDRA-2500) Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2500?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Ellis updated CASSANDRA-2500:
--------------------------------------

    Reviewer: rwjblue

Robert, would you like to take a stab at reviewing this?

> Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter
> ---------------------------------------------------------------
>
>                 Key: CASSANDRA-2500
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2500
>             Project: Cassandra
>          Issue Type: Task
>            Reporter: Jon Hermes
>            Assignee: Jon Hermes
>         Attachments: 2500.txt, genthriftrb.txt, rbcql-0.0.0.tgz
>
>
> Create a ruby driver for CQL.
> Lacking something standard (such as py-dbapi), going with something common instead -- RoR ActiveRecord Connection Adapter (http://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/AbstractAdapter.html).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CASSANDRA-2500) Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13098217#comment-13098217 ] 

Jonathan Ellis commented on CASSANDRA-2500:
-------------------------------------------

Some tests that I'd like to see:

- a query against rows whose values are determined by default_validation_class
- a query demonstrating sparse columns across rows in a single resultset (e.g. row 1 has columns A, B, row 2 has columns A, C)
- queries using UUID and long column names (these tend to be tricky)
- a test of Counter support
- a test showing all the CQL 1.1 data types in resultset values (Ascii, Boolean, Bytes, Date, Double, Float, Long, UUID, UTF8)

Also, something is weird in https://github.com/kreynolds/cassandra-cql/blob/master/spec/fixtures/standard_with_validations.yaml because mixing counters and noncounter data in a single CF is illegal (see CASSANDRA-2614):

{noformat}
  - !ruby/object:CassandraCQL::Thrift::ColumnDef
    name: votes
    validation_class: org.apache.cassandra.db.marshal.CounterColumnType
{noformat}

> Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter
> ---------------------------------------------------------------
>
>                 Key: CASSANDRA-2500
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2500
>             Project: Cassandra
>          Issue Type: Task
>          Components: API
>            Reporter: Jon Hermes
>            Assignee: Kelley Reynolds
>              Labels: cql
>             Fix For: 0.8.6
>
>         Attachments: 2500.txt, genthriftrb.txt, rbcql-0.0.0.tgz
>
>
> Create a ruby driver for CQL.
> Lacking something standard (such as py-dbapi), going with something common instead -- RoR ActiveRecord Connection Adapter (http://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/AbstractAdapter.html).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CASSANDRA-2500) Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter

Posted by "Kelley Reynolds (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13109127#comment-13109127 ] 

Kelley Reynolds commented on CASSANDRA-2500:
--------------------------------------------

All of the issues that jbellis mentioned in the Sept 6th comment have been addressed with the exception of testing some of the datatypes. The datatypes tested are the ones listed here: https://github.com/apache/cassandra/blob/336476f88d107d54ef9534be1e6c0bd81e148484/doc/cql/CQL.textile#columntypes

A few other people have now reviewed the code and made some minor changes along with the excellent addition of a minimal live testing framework which I did not do initially as I had thought that some other common framework was going to be set up for the various CQL drivers. I believe this to be sufficiently done.

I don't know at what point this is actually going to move to the Apache Extras and who all is going to handle that but I do know that there is now a fair amount of demand for this to be released into rubygems and somebody else has already taken the trouble to release a version. Shall I go ahead and begin publishing this or shall I leave it to Cassandra Project?

> Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter
> ---------------------------------------------------------------
>
>                 Key: CASSANDRA-2500
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2500
>             Project: Cassandra
>          Issue Type: Task
>          Components: API
>            Reporter: Jon Hermes
>            Assignee: Kelley Reynolds
>              Labels: cql
>             Fix For: 0.8.7
>
>         Attachments: 2500.txt, genthriftrb.txt, rbcql-0.0.0.tgz
>
>
> Create a ruby driver for CQL.
> Lacking something standard (such as py-dbapi), going with something common instead -- RoR ActiveRecord Connection Adapter (http://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/AbstractAdapter.html).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CASSANDRA-2500) Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter

Posted by "Robert Jackson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13094987#comment-13094987 ] 

Robert Jackson commented on CASSANDRA-2500:
-------------------------------------------

I have been using the repo from GitHub[1] quite a bit locally and things work quite well at this point.

At this point the tests pass, and a simple comparison against the fauna/cassandra gem shows that the performance is at least on par with the fauna client(in most cases it is better)[2].

Also, note that it is possible to require both cassandra-cql and fauna/cassandra at the same time without conflict.

[1] https://github.com/kreynolds/cassandra-cql
[2] https://gist.github.com/1185026


> Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter
> ---------------------------------------------------------------
>
>                 Key: CASSANDRA-2500
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2500
>             Project: Cassandra
>          Issue Type: Task
>          Components: API
>            Reporter: Jon Hermes
>            Assignee: Kelley Reynolds
>              Labels: cql
>             Fix For: 0.8.5
>
>         Attachments: 2500.txt, genthriftrb.txt, rbcql-0.0.0.tgz
>
>
> Create a ruby driver for CQL.
> Lacking something standard (such as py-dbapi), going with something common instead -- RoR ActiveRecord Connection Adapter (http://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/AbstractAdapter.html).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CASSANDRA-2500) Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter

Posted by "Brian Palmer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13053365#comment-13053365 ] 

Brian Palmer commented on CASSANDRA-2500:
-----------------------------------------

Jon,

jbellis asked me to take a quick look at this, but I haven't had much luck so far getting this to work with DBI 0.4.3, ruby 1.8.7, cassandra 0.8.0 on OS X. The short list:

 * ruby syntax error in DBI::DBD::Cass::Database#execute_prepared (missing comma)
 * Cass::Driver calls super with VERSION which is "0.0.0", but DBI is expecting the DBI API version ("0.4.0"), so an exception is thrown on init
 * initializing a new DBI connection fails due to DBI::DBD::Cass::Database#active? not checking if @tconn is nil before calling @tconn.current_server
 * DBI::DBD::Cass::Statement#execute references db, which isn't defined, it probably means to use @db local var
 * After working around the above errors, I get an exception when running a select query like `dbh.execute("select * from users;")` : NoMethodError: undefined method `size' for #<CassandraThrift::CqlRow:0x102badf58>

I'm not entirely sure if any of these last four are issues specific to my environment, but it seems unlikely that they all are. The require statements in Cass.rb definitely need cleaning up as well, but it sounds like that's still an open question. Also, I'd suggest changing all those define_method calls in Cass.rb to normal method definitions just using def, that's very unidiomatic ruby.

> Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter
> ---------------------------------------------------------------
>
>                 Key: CASSANDRA-2500
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2500
>             Project: Cassandra
>          Issue Type: Task
>            Reporter: Jon Hermes
>            Assignee: Jon Hermes
>         Attachments: 2500.txt, genthriftrb.txt, rbcql-0.0.0.tgz
>
>
> Create a ruby driver for CQL.
> Lacking something standard (such as py-dbapi), going with something common instead -- RoR ActiveRecord Connection Adapter (http://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/AbstractAdapter.html).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CASSANDRA-2500) Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13079392#comment-13079392 ] 

Jonathan Ellis commented on CASSANDRA-2500:
-------------------------------------------

did you have a look at how the python dbapi2 driver does this?

basically cursor.description will change as the columns in the row does.  for a "normal" db this would be fixed for the entire resultset but it's not much of a stretch to make it row-dependent.

> Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter
> ---------------------------------------------------------------
>
>                 Key: CASSANDRA-2500
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2500
>             Project: Cassandra
>          Issue Type: Task
>          Components: API
>            Reporter: Jon Hermes
>            Assignee: Pavel Yaskevich
>              Labels: cql
>             Fix For: 0.8.4
>
>         Attachments: 2500.txt, genthriftrb.txt, rbcql-0.0.0.tgz
>
>
> Create a ruby driver for CQL.
> Lacking something standard (such as py-dbapi), going with something common instead -- RoR ActiveRecord Connection Adapter (http://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/AbstractAdapter.html).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CASSANDRA-2500) Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter

Posted by "Robert Jackson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13044097#comment-13044097 ] 

Robert Jackson commented on CASSANDRA-2500:
-------------------------------------------

After speaking with jbellis on IRC I generally understand that the base CQL driver should be supported in trunk, and then pushed out into it's own gem when the various CQL versions are released.

That way the various third party libraries and projects can be updated to use the new gem as it's base layer instead of thrift, thrift_client, or the fauna/cassandra gem directly.

That said, how will the drivers be tested? Will the CI server be capable of running a ruby test suite based on Test::Unit/MiniTest?

> Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter
> ---------------------------------------------------------------
>
>                 Key: CASSANDRA-2500
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2500
>             Project: Cassandra
>          Issue Type: Task
>            Reporter: Jon Hermes
>            Assignee: Jon Hermes
>         Attachments: 2500.txt, genthriftrb.txt
>
>
> Create a ruby driver for CQL.
> Lacking something standard (such as py-dbapi), going with something common instead -- RoR ActiveRecord Connection Adapter (http://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/AbstractAdapter.html).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (CASSANDRA-2500) Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter

Posted by "Jonathan Ellis (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2500?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Ellis resolved CASSANDRA-2500.
---------------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 0.8.7)

Kelley confirms on IRC that I am looking in the right place.  Resolving issue as Fixed.
                
> Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter
> ---------------------------------------------------------------
>
>                 Key: CASSANDRA-2500
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2500
>             Project: Cassandra
>          Issue Type: Task
>          Components: API
>            Reporter: Jon Hermes
>            Assignee: Kelley Reynolds
>              Labels: cql
>         Attachments: 2500.txt, genthriftrb.txt, rbcql-0.0.0.tgz
>
>
> Create a ruby driver for CQL.
> Lacking something standard (such as py-dbapi), going with something common instead -- RoR ActiveRecord Connection Adapter (http://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/AbstractAdapter.html).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Issue Comment Edited] (CASSANDRA-2500) Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter

Posted by "Brian Palmer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13053365#comment-13053365 ] 

Brian Palmer edited comment on CASSANDRA-2500 at 6/22/11 9:50 PM:
------------------------------------------------------------------

Jon,

jbellis asked me to take a quick look at this, but I haven't had much luck so far getting this to work with DBI 0.4.3, ruby 1.8.7, cassandra 0.8.0 on OS X. The short list:

 * ruby syntax error in DBI::DBD::Cass::Database#execute_prepared (missing comma)
 * Cass::Driver calls super with VERSION which is "0.0.0", but DBI is expecting the DBI API version ("0.4.0"), so an exception is thrown on init
 * initializing a new DBI connection fails due to DBI::DBD::Cass::Database#active? not checking if @tconn is nil before calling @tconn.current_server
 * DBI::DBD::Cass::Statement#execute references db, which isn't defined, it probably means to use @db local var
 * After working around the above errors, I get an exception when running a select query like `dbh.execute("select * from users;").fetch` : NoMethodError: undefined method `size' for #<CassandraThrift::CqlRow:0x102badf58>

I'm not entirely sure if any of these last four are issues specific to my environment, but it seems unlikely that they all are. The require statements in Cass.rb definitely need cleaning up as well, but it sounds like that's still an open question. Also, I'd suggest changing all those define_method calls in Cass.rb to normal method definitions just using def, that's very unidiomatic ruby.

      was (Author: codekitchen):
    Jon,

jbellis asked me to take a quick look at this, but I haven't had much luck so far getting this to work with DBI 0.4.3, ruby 1.8.7, cassandra 0.8.0 on OS X. The short list:

 * ruby syntax error in DBI::DBD::Cass::Database#execute_prepared (missing comma)
 * Cass::Driver calls super with VERSION which is "0.0.0", but DBI is expecting the DBI API version ("0.4.0"), so an exception is thrown on init
 * initializing a new DBI connection fails due to DBI::DBD::Cass::Database#active? not checking if @tconn is nil before calling @tconn.current_server
 * DBI::DBD::Cass::Statement#execute references db, which isn't defined, it probably means to use @db local var
 * After working around the above errors, I get an exception when running a select query like `dbh.execute("select * from users;")` : NoMethodError: undefined method `size' for #<CassandraThrift::CqlRow:0x102badf58>

I'm not entirely sure if any of these last four are issues specific to my environment, but it seems unlikely that they all are. The require statements in Cass.rb definitely need cleaning up as well, but it sounds like that's still an open question. Also, I'd suggest changing all those define_method calls in Cass.rb to normal method definitions just using def, that's very unidiomatic ruby.
  
> Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter
> ---------------------------------------------------------------
>
>                 Key: CASSANDRA-2500
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2500
>             Project: Cassandra
>          Issue Type: Task
>          Components: API
>            Reporter: Jon Hermes
>            Assignee: Pavel Yaskevich
>              Labels: cql
>             Fix For: 0.8.2
>
>         Attachments: 2500.txt, genthriftrb.txt, rbcql-0.0.0.tgz
>
>
> Create a ruby driver for CQL.
> Lacking something standard (such as py-dbapi), going with something common instead -- RoR ActiveRecord Connection Adapter (http://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/AbstractAdapter.html).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CASSANDRA-2500) Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter

Posted by "Hartog C. de Mik (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13057707#comment-13057707 ] 

Hartog C. de Mik commented on CASSANDRA-2500:
---------------------------------------------

Is this code available under version-control somewhere? Would love to review/collaborate (when time permits)

> Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter
> ---------------------------------------------------------------
>
>                 Key: CASSANDRA-2500
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2500
>             Project: Cassandra
>          Issue Type: Task
>          Components: API
>            Reporter: Jon Hermes
>            Assignee: Pavel Yaskevich
>              Labels: cql
>             Fix For: 0.8.2
>
>         Attachments: 2500.txt, genthriftrb.txt, rbcql-0.0.0.tgz
>
>
> Create a ruby driver for CQL.
> Lacking something standard (such as py-dbapi), going with something common instead -- RoR ActiveRecord Connection Adapter (http://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/AbstractAdapter.html).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CASSANDRA-2500) Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter

Posted by "Brian Palmer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13088794#comment-13088794 ] 

Brian Palmer commented on CASSANDRA-2500:
-----------------------------------------

This is +2 from me, kreynolds/cassandra-cql looks great. I didn't have any problems getting it installed and running various CQL queries against 0.8.4

> Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter
> ---------------------------------------------------------------
>
>                 Key: CASSANDRA-2500
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2500
>             Project: Cassandra
>          Issue Type: Task
>          Components: API
>            Reporter: Jon Hermes
>            Assignee: Kelley Reynolds
>              Labels: cql
>             Fix For: 0.8.5
>
>         Attachments: 2500.txt, genthriftrb.txt, rbcql-0.0.0.tgz
>
>
> Create a ruby driver for CQL.
> Lacking something standard (such as py-dbapi), going with something common instead -- RoR ActiveRecord Connection Adapter (http://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/AbstractAdapter.html).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CASSANDRA-2500) Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13057811#comment-13057811 ] 

Jonathan Ellis commented on CASSANDRA-2500:
-------------------------------------------

No, it's available in the patch attached to this ticket.

> Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter
> ---------------------------------------------------------------
>
>                 Key: CASSANDRA-2500
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2500
>             Project: Cassandra
>          Issue Type: Task
>          Components: API
>            Reporter: Jon Hermes
>            Assignee: Pavel Yaskevich
>              Labels: cql
>             Fix For: 0.8.2
>
>         Attachments: 2500.txt, genthriftrb.txt, rbcql-0.0.0.tgz
>
>
> Create a ruby driver for CQL.
> Lacking something standard (such as py-dbapi), going with something common instead -- RoR ActiveRecord Connection Adapter (http://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/AbstractAdapter.html).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CASSANDRA-2500) Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter

Posted by "Robert Jackson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13087445#comment-13087445 ] 

Robert Jackson commented on CASSANDRA-2500:
-------------------------------------------

It would be fairly easy to update the fauna/cassandra gem to use an external thrift binding source.  The cassandra-thrift repository looks good, and I could get the fauna gem updated to use it pretty easily. 

We just need to figure out the specifics of where this would be managed, and how would the updates get pushed out.




> Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter
> ---------------------------------------------------------------
>
>                 Key: CASSANDRA-2500
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2500
>             Project: Cassandra
>          Issue Type: Task
>          Components: API
>            Reporter: Jon Hermes
>            Assignee: Kelley Reynolds
>              Labels: cql
>             Fix For: 0.8.5
>
>         Attachments: 2500.txt, genthriftrb.txt, rbcql-0.0.0.tgz
>
>
> Create a ruby driver for CQL.
> Lacking something standard (such as py-dbapi), going with something common instead -- RoR ActiveRecord Connection Adapter (http://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/AbstractAdapter.html).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CASSANDRA-2500) Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter

Posted by "Ryan King (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13085176#comment-13085176 ] 

Ryan King commented on CASSANDRA-2500:
--------------------------------------

What would we need to change in fauna/cassandra?

> Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter
> ---------------------------------------------------------------
>
>                 Key: CASSANDRA-2500
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2500
>             Project: Cassandra
>          Issue Type: Task
>          Components: API
>            Reporter: Jon Hermes
>            Assignee: Kelley Reynolds
>              Labels: cql
>             Fix For: 0.8.5
>
>         Attachments: 2500.txt, genthriftrb.txt, rbcql-0.0.0.tgz
>
>
> Create a ruby driver for CQL.
> Lacking something standard (such as py-dbapi), going with something common instead -- RoR ActiveRecord Connection Adapter (http://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/AbstractAdapter.html).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CASSANDRA-2500) Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter

Posted by "Kelley Reynolds (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13089420#comment-13089420 ] 

Kelley Reynolds commented on CASSANDRA-2500:
--------------------------------------------

It's not quite as easy as a one-liner but I have manually modified the generated thrift bindings to put them in a unique namespace so they will not conflict with fauna. Good news: Compatibility! Bad news: You get to do that for every release since it's no longer automatic. (could almost certainly be made automatic but I wouldn't call that an improvement from an automated standalone thrift binding release)

> Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter
> ---------------------------------------------------------------
>
>                 Key: CASSANDRA-2500
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2500
>             Project: Cassandra
>          Issue Type: Task
>          Components: API
>            Reporter: Jon Hermes
>            Assignee: Kelley Reynolds
>              Labels: cql
>             Fix For: 0.8.5
>
>         Attachments: 2500.txt, genthriftrb.txt, rbcql-0.0.0.tgz
>
>
> Create a ruby driver for CQL.
> Lacking something standard (such as py-dbapi), going with something common instead -- RoR ActiveRecord Connection Adapter (http://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/AbstractAdapter.html).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CASSANDRA-2500) Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter

Posted by "Jon Hermes (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13034250#comment-13034250 ] 

Jon Hermes commented on CASSANDRA-2500:
---------------------------------------

As a side note, this needs to be rolled into ruby-cassandra to avoid even more duplicate work. By the same token, pycassa and the py-cql driver need to be mashed up as well.

> Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter
> ---------------------------------------------------------------
>
>                 Key: CASSANDRA-2500
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2500
>             Project: Cassandra
>          Issue Type: Task
>            Reporter: Jon Hermes
>            Assignee: Jon Hermes
>         Attachments: 2500.txt, genthriftrb.txt
>
>
> Create a ruby driver for CQL.
> Lacking something standard (such as py-dbapi), going with something common instead -- RoR ActiveRecord Connection Adapter (http://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/AbstractAdapter.html).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Issue Comment Edited] (CASSANDRA-2500) Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter

Posted by "Kelley Reynolds (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13089420#comment-13089420 ] 

Kelley Reynolds edited comment on CASSANDRA-2500 at 8/23/11 12:33 PM:
----------------------------------------------------------------------

It's not quite as easy as a one-liner but I have manually modified the generated thrift bindings to put them in a unique namespace so they will not conflict with fauna. Good news: Compatibility! Bad news: You get to do that for every release since it's no longer automatic. (could almost certainly be made automatic but I wouldn't call that an improvement from an automated standalone thrift binding release which also solves other problems at the same time)

      was (Author: kreynolds):
    It's not quite as easy as a one-liner but I have manually modified the generated thrift bindings to put them in a unique namespace so they will not conflict with fauna. Good news: Compatibility! Bad news: You get to do that for every release since it's no longer automatic. (could almost certainly be made automatic but I wouldn't call that an improvement from an automated standalone thrift binding release)
  
> Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter
> ---------------------------------------------------------------
>
>                 Key: CASSANDRA-2500
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2500
>             Project: Cassandra
>          Issue Type: Task
>          Components: API
>            Reporter: Jon Hermes
>            Assignee: Kelley Reynolds
>              Labels: cql
>             Fix For: 0.8.5
>
>         Attachments: 2500.txt, genthriftrb.txt, rbcql-0.0.0.tgz
>
>
> Create a ruby driver for CQL.
> Lacking something standard (such as py-dbapi), going with something common instead -- RoR ActiveRecord Connection Adapter (http://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/AbstractAdapter.html).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CASSANDRA-2500) Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter

Posted by "Eric Evans (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13098852#comment-13098852 ] 

Eric Evans commented on CASSANDRA-2500:
---------------------------------------

{quote}
Now that we are moving the drivers out of tree and into Apache Extras on Google Code, will this issue continue to be worked here or should a new repo be created for this in Apache Extras with the current version so that any issues can be worked from the Google Code repo's issue tracker?
{quote}

That's a good question.  It seems best to let this issue run it's course either way, but when the mailing list discussion (http://thread.gmane.org/gmane.comp.db.cassandra.devel/4132) has settled, we could probably go ahead with repo setup and submit any subsequent issues there.

> Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter
> ---------------------------------------------------------------
>
>                 Key: CASSANDRA-2500
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2500
>             Project: Cassandra
>          Issue Type: Task
>          Components: API
>            Reporter: Jon Hermes
>            Assignee: Kelley Reynolds
>              Labels: cql
>             Fix For: 0.8.6
>
>         Attachments: 2500.txt, genthriftrb.txt, rbcql-0.0.0.tgz
>
>
> Create a ruby driver for CQL.
> Lacking something standard (such as py-dbapi), going with something common instead -- RoR ActiveRecord Connection Adapter (http://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/AbstractAdapter.html).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CASSANDRA-2500) Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter

Posted by "Robert Jackson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13098214#comment-13098214 ] 

Robert Jackson commented on CASSANDRA-2500:
-------------------------------------------

Now that we are moving the drivers out of tree and into Apache Extras on Google Code, will this issue continue to be worked here or should a new repo be created for this in Apache Extras with the current version so that any issues can be worked from the Google Code repo's issue tracker?


> Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter
> ---------------------------------------------------------------
>
>                 Key: CASSANDRA-2500
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2500
>             Project: Cassandra
>          Issue Type: Task
>          Components: API
>            Reporter: Jon Hermes
>            Assignee: Kelley Reynolds
>              Labels: cql
>             Fix For: 0.8.6
>
>         Attachments: 2500.txt, genthriftrb.txt, rbcql-0.0.0.tgz
>
>
> Create a ruby driver for CQL.
> Lacking something standard (such as py-dbapi), going with something common instead -- RoR ActiveRecord Connection Adapter (http://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/AbstractAdapter.html).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CASSANDRA-2500) Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter

Posted by "Eric Evans (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13070481#comment-13070481 ] 

Eric Evans commented on CASSANDRA-2500:
---------------------------------------

{quote}
This is written against 0.8.1-SNAPSHOT so YMMV with 0.8.0. I didn't do a complete refactoring so some things are still suboptimal and the column_info still needs to pull types out for casting but it appears otherwise functional.
{quote}

0.8.1 corresponds to CQL version 1.1.0, and 0.8.0 corresponds to CQL 1.0.0.  When listing support for your driver, be sure to use the language version as opposed the Cassandra version.  If there are any 1.0.0 features that do not work in a 1.1.0 driver, that would be considered a bug.

> Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter
> ---------------------------------------------------------------
>
>                 Key: CASSANDRA-2500
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2500
>             Project: Cassandra
>          Issue Type: Task
>          Components: API
>            Reporter: Jon Hermes
>            Assignee: Pavel Yaskevich
>              Labels: cql
>             Fix For: 0.8.3
>
>         Attachments: 2500.txt, genthriftrb.txt, rbcql-0.0.0.tgz
>
>
> Create a ruby driver for CQL.
> Lacking something standard (such as py-dbapi), going with something common instead -- RoR ActiveRecord Connection Adapter (http://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/AbstractAdapter.html).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CASSANDRA-2500) Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter

Posted by "Kelley Reynolds (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13085183#comment-13085183 ] 

Kelley Reynolds commented on CASSANDRA-2500:
--------------------------------------------

As you know there are several ways to solve that but a common cassandra-thrift gem (maintained by .. somebody) is one way. Fauna has the marketshare so I'm open to suggestions :)

> Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter
> ---------------------------------------------------------------
>
>                 Key: CASSANDRA-2500
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2500
>             Project: Cassandra
>          Issue Type: Task
>          Components: API
>            Reporter: Jon Hermes
>            Assignee: Kelley Reynolds
>              Labels: cql
>             Fix For: 0.8.5
>
>         Attachments: 2500.txt, genthriftrb.txt, rbcql-0.0.0.tgz
>
>
> Create a ruby driver for CQL.
> Lacking something standard (such as py-dbapi), going with something common instead -- RoR ActiveRecord Connection Adapter (http://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/AbstractAdapter.html).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CASSANDRA-2500) Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter

Posted by "Kelley Reynolds (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13118882#comment-13118882 ] 

Kelley Reynolds commented on CASSANDRA-2500:
--------------------------------------------

The code has been pushed to the cassandra-ruby repo and I populated an initial wiki page with the README. I think this ticket is done. Reviewer?
                
> Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter
> ---------------------------------------------------------------
>
>                 Key: CASSANDRA-2500
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2500
>             Project: Cassandra
>          Issue Type: Task
>          Components: API
>            Reporter: Jon Hermes
>            Assignee: Kelley Reynolds
>              Labels: cql
>             Fix For: 0.8.7
>
>         Attachments: 2500.txt, genthriftrb.txt, rbcql-0.0.0.tgz
>
>
> Create a ruby driver for CQL.
> Lacking something standard (such as py-dbapi), going with something common instead -- RoR ActiveRecord Connection Adapter (http://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/AbstractAdapter.html).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CASSANDRA-2500) Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter

Posted by "Jon Hermes (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2500?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jon Hermes updated CASSANDRA-2500:
----------------------------------

    Attachment: rbcql-0.0.0.tgz

v2.

Attaching rbcql ("CassDBD" in DBI parlance). No longer takes the `old JDBC` approach of returning thrift objects, conforms to DBI return standards of array of values and a matching array of column_info containing type info and column names, the marshalling etc. is handled by DBI.

Now also correctly tracks schema changes by REing queries as they come in (what pycql does). Should drop into a Rails system by including the package, changing the DBI-URLs to prefix with "Cass", and making sure the input code is CQL, not SQL.

Still not sure how best to require ruby c* bindings. (Looking at the cassandra-rubygem, they include the bindings in a vendor dir and keep them up to date.) Right now this expects interface/thrift/gen-rb/ to be in the same directory.

2622 problem is fixed by including key_alias info in the internal metadata (rubycql's copy of the schema).

> Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter
> ---------------------------------------------------------------
>
>                 Key: CASSANDRA-2500
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2500
>             Project: Cassandra
>          Issue Type: Task
>            Reporter: Jon Hermes
>            Assignee: Jon Hermes
>         Attachments: 2500.txt, genthriftrb.txt, rbcql-0.0.0.tgz
>
>
> Create a ruby driver for CQL.
> Lacking something standard (such as py-dbapi), going with something common instead -- RoR ActiveRecord Connection Adapter (http://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/AbstractAdapter.html).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CASSANDRA-2500) Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter

Posted by "Jon Hermes (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2500?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jon Hermes updated CASSANDRA-2500:
----------------------------------

    Attachment: 2500.txt
                genthriftrb.txt

genthriftrb just adds a gen-thrift-rb target to the build file. Not sure if it has general use, but I've written it >1 time now, so including.

The patch adds drivers/rb/cass-dbd/*. It's heavily reliant on ruby DBI (0.4.3), so most of the hard work was abstracted out. That being said, it's still a rough fit because DBI expects SQL-systems.

It's also Adapter compliant for use in RoR systems.

> Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter
> ---------------------------------------------------------------
>
>                 Key: CASSANDRA-2500
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2500
>             Project: Cassandra
>          Issue Type: Task
>            Reporter: Jon Hermes
>            Assignee: Jon Hermes
>         Attachments: 2500.txt, genthriftrb.txt
>
>
> Create a ruby driver for CQL.
> Lacking something standard (such as py-dbapi), going with something common instead -- RoR ActiveRecord Connection Adapter (http://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/AbstractAdapter.html).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CASSANDRA-2500) Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter

Posted by "Jonathan Ellis (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13119592#comment-13119592 ] 

Jonathan Ellis commented on CASSANDRA-2500:
-------------------------------------------

bq. Those need to be updated for CQL 2.0, btw.

We can call this the CQL 1.1 driver (for C* 0.8) and update for 2.0/1.0 elsewhere.

Still curious what the actual list of "certified tested" types is.
                
> Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter
> ---------------------------------------------------------------
>
>                 Key: CASSANDRA-2500
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2500
>             Project: Cassandra
>          Issue Type: Task
>          Components: API
>            Reporter: Jon Hermes
>            Assignee: Kelley Reynolds
>              Labels: cql
>             Fix For: 0.8.7
>
>         Attachments: 2500.txt, genthriftrb.txt, rbcql-0.0.0.tgz
>
>
> Create a ruby driver for CQL.
> Lacking something standard (such as py-dbapi), going with something common instead -- RoR ActiveRecord Connection Adapter (http://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/AbstractAdapter.html).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CASSANDRA-2500) Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter

Posted by "Jon Hermes (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2500?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jon Hermes updated CASSANDRA-2500:
----------------------------------

    Attachment:     (was: rbcql-0.0.0.tgz)

> Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter
> ---------------------------------------------------------------
>
>                 Key: CASSANDRA-2500
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2500
>             Project: Cassandra
>          Issue Type: Task
>            Reporter: Jon Hermes
>            Assignee: Jon Hermes
>         Attachments: 2500.txt, genthriftrb.txt, rbcql-0.0.0.tgz
>
>
> Create a ruby driver for CQL.
> Lacking something standard (such as py-dbapi), going with something common instead -- RoR ActiveRecord Connection Adapter (http://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/AbstractAdapter.html).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CASSANDRA-2500) Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter

Posted by "Hartog C. de Mik (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13070122#comment-13070122 ] 

Hartog C. de Mik commented on CASSANDRA-2500:
---------------------------------------------

Why not use https://github.com/fauna/thrift_client or even https://github.com/fauna/cassandra for the thrift client? They are both pretty solid repo's and provide the same functionality as cassandra-thrift.

Furthermore it would provide better integration with already established gems based on fauna/cassandra (there are a few)

> Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter
> ---------------------------------------------------------------
>
>                 Key: CASSANDRA-2500
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2500
>             Project: Cassandra
>          Issue Type: Task
>          Components: API
>            Reporter: Jon Hermes
>            Assignee: Pavel Yaskevich
>              Labels: cql
>             Fix For: 0.8.3
>
>         Attachments: 2500.txt, genthriftrb.txt, rbcql-0.0.0.tgz
>
>
> Create a ruby driver for CQL.
> Lacking something standard (such as py-dbapi), going with something common instead -- RoR ActiveRecord Connection Adapter (http://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/AbstractAdapter.html).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CASSANDRA-2500) Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13044069#comment-13044069 ] 

Jonathan Ellis commented on CASSANDRA-2500:
-------------------------------------------

The point of having different modules is to make it clear what each is supposed to do. To a novice, mixing the old gem API into a CQL driver would be extremely confusing.

The main goal of having them in-tree is to (1) make clear what the "official" client is for a given language and (2) by so doing prevent the proliferation that is causing so much confusion with the old Thrift api. (See: http://stackoverflow.com/questions/6157760/rails-orm-for-cassandra)

> Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter
> ---------------------------------------------------------------
>
>                 Key: CASSANDRA-2500
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2500
>             Project: Cassandra
>          Issue Type: Task
>            Reporter: Jon Hermes
>            Assignee: Jon Hermes
>         Attachments: 2500.txt, genthriftrb.txt
>
>
> Create a ruby driver for CQL.
> Lacking something standard (such as py-dbapi), going with something common instead -- RoR ActiveRecord Connection Adapter (http://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/AbstractAdapter.html).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CASSANDRA-2500) Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter

Posted by "Pavel Yaskevich (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13053494#comment-13053494 ] 

Pavel Yaskevich commented on CASSANDRA-2500:
--------------------------------------------

Another good thing will be to change Cass to Cassandra. Thanks for your review Brian! I will take it from Jon from now on.

> Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter
> ---------------------------------------------------------------
>
>                 Key: CASSANDRA-2500
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2500
>             Project: Cassandra
>          Issue Type: Task
>          Components: API
>            Reporter: Jon Hermes
>            Assignee: Pavel Yaskevich
>              Labels: cql
>             Fix For: 0.8.2
>
>         Attachments: 2500.txt, genthriftrb.txt, rbcql-0.0.0.tgz
>
>
> Create a ruby driver for CQL.
> Lacking something standard (such as py-dbapi), going with something common instead -- RoR ActiveRecord Connection Adapter (http://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/AbstractAdapter.html).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira