The main issues to consider are contention and scalability/performance. Can both apps be updated or just one? If both, what happens if both update the same field on the same record at the same time?
If performance isn't an issue, a simple synchronous js call to a RESTful API should be fine, waiting for a "success" response from the remote server. If you're worried about scaling/performance, I'd consider a messaging architecture where each system passes messages to the other and the other listens to the queue. But of course if you do that, handling contentions becomes harder because you will have transactions that "worked" that conflict and will need to have some kind of eventual consistency resolution strategy. Just to ask the related question, what do people use for message queue's in the Rails world (assuming they're not on JRuby)? Best Wishes, Peter On Mar 30, 2011, at 10:10 AM, Heinz Strunk wrote: > Hey folks, > > I have two different Rails apps and I would like t o sync the user > databases. What's the best way to do that? I thought of whenever someone > registers with one app the user information is posted to the other app > and vice versa. What would you use for that? JSON? Sinatra? > > Thanks for the help! > > -- > Posted via http://www.ruby-forum.com/. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk@googlegroups.com. > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.