Uploaded image for project: 'Ruby Driver'
  1. Ruby Driver
  2. RUBY-104

Remove dependencies between mongo and mongo_ext

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 12_01_17
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      I started playing with RMongo (ruby mongo driver based on Eventmachine). It was apparently written before the current official ruby driver was made available.

      I noted that it has its own serializer/deserializer for BSON written in straight ruby. With some relatively minor changes it would be possible to use the really fast BSON C parser that is part of the mongo_ext gem. Unfortunately, the C code and its dependent ruby code (in the types subdirectory) are split between the mongo and mongo_ext gems.

      The BSON C code directly requires types/binary, types/code, types/regexp_of_holding, etc but none of these files exist in the mongo_ext gem. The mongo_ext gem only includes the C extension. Therefore, the C extension is dependent upon the main mongo gem in order to work at all. This makes it difficult for other level0 ruby drivers to leverage that existing work.

      Is there any chance we could separate all of the BSON code (ruby too) into two gems mongo_bson and mongo_bson_ext gems? Alternately, the serializer/deserializer code could be broken out to a mongo-ruby-bson project on github and get packaged as a separate gem (or pair of gems).

      This would allow other ruby projects to use and/or contribute to the BSON code without making a big mess of the existing projects by copying code between them.

      Thoughts?

            Assignee:
            kbanker Kyle Banker
            Reporter:
            kbanker Kyle Banker
            Votes:
            3 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: