Wikipedia has a good definition of multi-tenant architecture:

http://en.wikipedia.org/wiki/Multitenancy
With a multitenant architecture, a 
<http://en.wikipedia.org/wiki/Application_software>software 
application is designed to virtually 
<http://en.wikipedia.org/wiki/Partition_%28mainframe%29>partition its 
data and configuration so that each client organization works with a 
customized virtual application instance.

Adam, it doesn't sound to me like you are looking for this, you just 
want, as you say, account management. I also have not built any large 
applications, but I've worked on several existing rails sites that 
have user accounts, and something like what you describe is in all of 
them. I'm now building an app using Authlogic, and like other 
authentication solutions it gives you a current_user object that you 
can use to point to your user's data with something 
like  current_user.posts  if you have the model associations set up correctly.

You may want to look at http://railskits.com/saas/ for code to do 
recurrent billing and such. I have it for a client who plans to use 
it, but we haven't gotten there yet. Still, I've looked through it 
and it looks like a big timesaver.

Scott

P.S. I find myself referring often to http://guides.rubyonrails.org 
for help on all sorts of Rails pieces that I'm not very familiar with 
or need a reminder about. Between it and Google, I almost don't need 
all these books on my shelf.


At 11:30 AM 10/21/2009, you wrote:
>Hi everyone,
>
>I wanted to get some ideas/links/references from you concerning the 
>building of account management into a new site of ours. Essentially, 
>people will sign up for our web service for $$$/month and should 
>only see their data. Now, in previous simple projects, we've just 
>put in each database table that held user-specific data an 
>"account_id" column, and depending on the user's session info, would 
>only do ActiveRecord searches filtered with {:conditions => 
>["account_id = ?", current_user.account_id]}. Is there a better way 
>to do this? I haven't worked on any large web sites, and the 
>technical web resources (aka. other programmers) I have available to 
>me at my current position are nil (see Lead Web Engineer at the 
>bottom...). Are there more secure ways to go about this, or is this 
>a pretty straightforward approach to a simple problem?
>
>PS: I don't even know what to search for on Google to read up on 
>this abstraction level of web architecture! Does it have a name?
>
>Thanks,
>Adam
>
>--
>Adam Grant
>Lead Web Engineer
>Telaeris, Inc.
><mailto:[email protected]>[email protected]
>(858) 627-9710
>
>
--~--~---------~--~----~------------~-------~--~----~
SD Ruby mailing list
[email protected]
http://groups.google.com/group/sdruby
-~----------~----~----~----~------~----~------~--~---

Reply via email to