All threads / How Do I Update Rails Servers from another Rails Server?

Ask A Question

Notifications

You’re not receiving notifications from this thread.

How Do I Update Rails Servers from another Rails Server?

jundalisay asked in Servers
I have a Rails Server A in Country A, Rails Server B in Country B, and Rails Server C in Country C, all using Devise and Omniauth.

A user can sign up in all 3 servers. But when he logs in to Server A, that server should update Server B and C, updating the user's record there that he is currently logged into Server A. How can I do this in Rails? I've heard that this process requires interprocess communication and RPC and that RabbitMQ could be used for it. 

What do I need to implement this feature?

 
Rather than doing something complicated with RPC and all that, why not just have Server A make a POST request to an API on Server B and C? You could simply POST the same data changed over to those and make the same update. That's what I would probably do.
Join the discussion

Want to stay up-to-date with Ruby on Rails?

Join 33,665+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    logo Created with Sketch.

    Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

    © 2020 GoRails, LLC. All rights reserved.