Ok the situation is that I have an App, where to user can sign in and can use the app save some data like customers and orders to the db. Since I''m using devise for authentication, I realised the multitenenacy with current_user in the controller. So every user has his own data. like def index @customers = current_user.customers end etc This works fine right now. But yesterday I watched some railscast. http://railscasts.com/episodes/389-multitenancy-with-postgresql http://railscasts.com/episodes/388-multitenancy-with-scopes As you can see the first one uses pg schemas and the second one works with scopes. Both have the same effect like my way. But what could be the advantages or disadvantages to these 3 ways? Dont want to build further on my app and realise in the end that I picked the wrong way. Maybe in the end of the app there will be a function user can team up and have shared data... but this is just a nice to have. Any experince, hints or suggestion on that? best regards denym_ -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/610ad09f-92c4-435c-bd76-c075ca85ad37%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Tamara Temple
2013-Sep-23 04:29 UTC
Re: Multitenancy and the options to realise it in rails4
On Sep 21, 2013, at 6:55 AM, Denny Mueller <macdankk-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> Ok the situation is that I have an App, where to user can sign in and can use the app save some data like customers and orders to the db. > Since I''m using devise for authentication, I realised the multitenenacy with current_user in the controller. So every user has his own data. > > like > > def index > @customers = current_user.customers > end > > etc > > This works fine right now. But yesterday I watched some railscast. > http://railscasts.com/episodes/389-multitenancy-with-postgresql > http://railscasts.com/episodes/388-multitenancy-with-scopes > > As you can see the first one uses pg schemas and the second one works with scopes. Both have the same effect like my way. But what could be the advantages or disadvantages to these 3 ways? Dont want to build further on my app and realise in the end that I picked the wrong way. Maybe in the end of the app there will be a function user can team up and have shared data... but this is just a nice to have. > > Any experince, hints or suggestion on that? > > best regards > denym_Best suggestion here I can make is pick up Radar''s book: http://www.goodreads.com/book/show/18333875-multitenancy-with-rails really a great read, very helpful in this. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/AE5675D1-9FD6-48CD-8BF8-6CCA71F3B6DF%40gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
Denny Mueller
2013-Sep-23 16:28 UTC
Re: Multitenancy and the options to realise it in rails4
Yeah I already found this, but I dont want to digg a complete book about this topic, a kind of summary or a discussion about it would be nice. regards denym_ Am Montag, 23. September 2013 06:29:37 UTC+2 schrieb tamouse:> > > On Sep 21, 2013, at 6:55 AM, Denny Mueller <macd...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org<javascript:>> > wrote: > > > Ok the situation is that I have an App, where to user can sign in and > can use the app save some data like customers and orders to the db. > > Since I''m using devise for authentication, I realised the multitenenacy > with current_user in the controller. So every user has his own data. > > > > like > > > > def index > > @customers = current_user.customers > > end > > > > etc > > > > This works fine right now. But yesterday I watched some railscast. > > http://railscasts.com/episodes/389-multitenancy-with-postgresql > > http://railscasts.com/episodes/388-multitenancy-with-scopes > > > > As you can see the first one uses pg schemas and the second one works > with scopes. Both have the same effect like my way. But what could be the > advantages or disadvantages to these 3 ways? Dont want to build further on > my app and realise in the end that I picked the wrong way. Maybe in the end > of the app there will be a function user can team up and have shared > data... but this is just a nice to have. > > > > Any experince, hints or suggestion on that? > > > > best regards > > denym_ > > Best suggestion here I can make is pick up Radar''s book: > > http://www.goodreads.com/book/show/18333875-multitenancy-with-rails > > really a great read, very helpful in this. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/7413f6ec-9933-45a9-b73f-5b556a908520%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
andreo-FdlSlcb4kYpknbxzx/v8hQ@public.gmane.org
2013-Sep-25 11:59 UTC
Re: Multitenancy and the options to realise it in rails4
basically you want somebody to do your reading work for you and summarize it for you? come on... -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/e30c4f8e-a502-42be-99e4-94ae41a67698%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.