Multiple Databases w/ RoR 4.2

Hi, all -

I’m prototyping a large application which will eventually have multiple open connections to MySQL and Neo4j data persist stores (aka databases). I would also like to maintain the existing development/test/prod switch behavior.

How can I configure this, or where would I start to patch?

If you want to have separate models for MySQL and Neo4j, look into the Neo4j gem, It provides ActiveRecord-like modules that let you build Neo4j models and work with the database easily. It has a great community and development on the gem is very active.

If you want to make it easy for ActiveRecord models to pull from Neo4j, you can look into writing methods in your AR models that pull from Neo using Neo4j-core, It requires a lot more knowledge of the database, though, it's really just an API wrapper with some helper methods to make certain basic tasks easier.

You can post on StackOverflow, open issues, or email any of the maintainers if you need a hand.

Thanks, Chris, I appreciate the support.

I've gotten further and now have the ActiveNode component from Neo4j installed. I'm still working on getting multiple RDBMS connections going, but I realized that what I can do is to have separate Rails installs on distinct VMs for the portions of the code that need to use distinct databases. I can use Ruby or C++ daemons to transfer data from one RDBMS to another, and I can mash together UI components as needed in the browser.