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

Add Rails Integration #161

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

IlyaChizhanov
Copy link

What? Why?

Hi. I added integration with Rails(since 6.1) based on AnyCable.
Now there is no need to call bundle exec gruf.
I had to change the structure of the startup logic a lot, but I hope I didn't break anything.

How was it tested?

For testing, I used a demo project and tests.

@IlyaChizhanov IlyaChizhanov force-pushed the rails_integration branch 2 times, most recently from 89d16bd to 7f96b94 Compare July 10, 2022 07:09
@splittingred
Copy link
Member

@IlyaChizhanov Thanks for the suggestion! I'm a bit concerned with doing this, as this changes the core operating model of gruf, and runs it in a way separate from its original intent. This would be a breaking (major) change, and I'd rather keep gruf separate from the runtime model of rails.

That said, this sounds like an excellent candidate for a gruf-rails gem, which could offer an alternative operating model, one more embedded like ActionCable or other systems. I'd take that path instead.

@@ -89,31 +86,55 @@ def server
# Start the gRPC server
#
# :nocov:
def start!
update_proc_title(:starting)
def start
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@splittingred I can try to create this gem, but in any case, I need changes in this part so as not to cause blocking of the main thread.

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

Successfully merging this pull request may close these issues.

None yet

2 participants