Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rails 6 migration / compatibility #532

Open
babelian opened this issue Jul 25, 2019 · 3 comments
Open

Rails 6 migration / compatibility #532

babelian opened this issue Jul 25, 2019 · 3 comments

Comments

@babelian
Copy link

I'm familiar with Octopus for a previous project, but opted to try the new Rails 6 connection switching per the note in the README.md.

However, I can't seem to get it to reproduce a using(:tenant1) / using(:tenant2) approach, it seems setup for a role-based read/write strategy, rather than sharding. (Can go into detail on challenges if needed, but seemed like I was going against the grain with various approaches).

Is the plan still to create a migration guide and depreciate Octopus, or are features like sharding/using_group/extended migration features etc still an Octopus only feature (to be continued).

Thanks

@xipgroc
Copy link

xipgroc commented Aug 21, 2019

I was also looking into this, seems Rails 6 doesn't yet support sharding / more than one replica per database:
https://guides.rubyonrails.org/active_record_multiple_databases.html

@sekiyama58
Copy link
Contributor

Just for who are interested in ...

I am developing the Octoball gem to make it easier to upgrade Octopus-based applications to Rails 6.1.
This gem provides Ocotpus-like sharding methods like Model.using(:shard_name) and shard tracking features, implemented on Rails 6.1 native multi-shard connection handling mechanism. Some of Octopus' features like round-robin scheduler of replicas are omitted for now.

Currently Rails 6.1 is still rc1, so I'm going to release this after the official release.
So far, it passes the specs derrived from Octopus with Rails6.1-rc1. Any tests, comments are welcome.

@thiagopradi
Copy link
Owner

Hey @babelian @sekiyama58 ,

Sorry for the delay to answer - this year has been quite busy for me. I've decided to not maintain compatibility between Rails 6 & Octopus because I haven't been using it in production for a few years. However - since I've had a dozen requests to support Rails 6 - I will do my best to try to make the gem compatible with Rails 6.

With that said - I would love some help with the work. I've setup this branch: rails6-support to start the work. Feel free to follow or send PRs to that branch.

Thiago

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants