List Info

Thread: Re: how to setup Single Application and multiple customers/d




Re: how to setup Single Application and multiple customers/d
user name
2008-01-03 09:42:41
Hello, I don't think it would be that hard to add in the
customer id
application wide if you changed things at the model or
application
level.  The concern I would have is performance/privacy
issues with
all of the data in the same location.

On the other hand, I would just try to lockdown the
application
security wise and use the same db. That way you can take
advantage of
mysql clustering http:
//www.mysql.com/products/database/cluster/ when
your app gets large enough.

It's a scaling issue that rails will have to deal with more
and more,
but I'm confident that it would be mmore manageable for now
to setup a
customer_id key in your fields than to deal with the extra
database
complexity.

-ht

On Jan 2, 2:15 pm, Giridhar Tatavarty
<ruby-forum-incom...andreas-
s.net> wrote:
> Thanks for the reply. The solution seems interesting
but
>
> I already have the tables and the application setup
 without the
> customer_id, so it would take a significant effort to
go change the
> working application. Is there any plug-in / Active
record hacks which
> will do it easily.
> --
> Posted viahttp://www.ruby-forum.com
/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Deploying Rails" group.
To post to this group, send email to
rubyonrails-deploymentgooglegroups.com
To unsubscribe from this group, send email to
rubyonrails-deployment-unsubscribegooglegroups.com
For more options, visit this group at http://groups.google.com/group/rubyonrails-deployment
?hl=en
-~----------~----~----~----~------~----~------~--~---


how to setup Single Application and multiple customers/db
country flaguser name
Germany
2007-12-20 16:19:22
Hi All,

I have an rails application which is designed to connect to
one db and
work at 1 url. Let say i want to host it 10 customers

like

http://customer1.coolapp
.com  ->customer1 db
http://customer2.coolapp
.com  ->customer2 db
http://customer3.coolapp
.com  ->customer3 db
...
http://customer10.coola
pp.com ->customer4 db

What is the best way to deploy the application?
Option 1: have multiple code trees for each customer and
thus each
customer having his own rails app and use apache/lighttpd to
route the
requests much like http://duncand
avidson.com/archives/154

Option 2: have a single code tree and depending upon the
request url,
connect to the appropriate database, much like
http://wiki.r
ubyonrails.org/rails/pages … Databases.

I will have some customer specific datafiles.

Which of the approaches is a scalable and maintainable, for
lets say
100-1000 customers.

Thanks in Advance.
-- 
Posted via http://www.ruby-forum.com
/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Deploying Rails" group.
To post to this group, send email to
rubyonrails-deploymentgooglegroups.com
To unsubscribe from this group, send email to
rubyonrails-deployment-unsubscribegooglegroups.com
For more options, visit this group at http://groups.google.com/group/rubyonrails-deployment
?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: how to setup Single Application and multiple customers/db
user name
2007-12-27 18:51:51
For me, I would add customer_id in the tables, and make sure
that
one "customer" only could see his data. Then you
can easily scale.

Also just let the "customer" login. There
"record" will tell you who
they are,
and you can go from there.

You can also do the different dns names, but dns's are a
pain, and
also take a while to populate.

Also that means you can have a single mongrel_cluster, and a
nginx
proxy to handle the whole mess.
Otherwise you memory usage is going to get interesting.


Did something similar for a network management application
I've done
before.



On Dec 21, 6:19 am, Giridhar Tatavarty
<ruby-forum-incom...andreas-
s.net> wrote:
> Hi All,
>
> I have an rails application which is designed to
connect to one db and
> work at 1 url. Let say i want to host it 10 customers
>
> like
>
> http://customer1.coolapp
.com ->customer1 dbhttp://customer2.coolapp
.com ->customer2 dbhttp://customer3.coolapp
.com ->customer3 db
> ...http://cu
stomer10.coolapp.com->customer4 db
>
> What is the best way to deploy the application?
> Option 1: have multiple code trees for each customer
and thus each
> customer having his own rails app and use
apache/lighttpd to route the
> requests much likehttp://duncand
avidson.com/archives/154
>
> Option 2: have a single code tree and depending upon
the request url,
> connect to the appropriate database, much likehttp://wik
i.rubyonrails.org/rails/pages... Databases.
>
> I will have some customer specific datafiles.
>
> Which of the approaches is a scalable and maintainable,
for lets say
> 100-1000 customers.
>
> Thanks in Advance.
> --
> Posted viahttp://www.ruby-forum.com
/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Deploying Rails" group.
To post to this group, send email to
rubyonrails-deploymentgooglegroups.com
To unsubscribe from this group, send email to
rubyonrails-deployment-unsubscribegooglegroups.com
For more options, visit this group at http://groups.google.com/group/rubyonrails-deployment
?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: how to setup Single Application and multiple customers/d
country flaguser name
Germany
2008-01-02 14:15:14
Thanks for the reply. The solution seems interesting but

I already have the tables and the application setup  without
the 
customer_id, so it would take a significant effort to go
change the 
working application. Is there any plug-in / Active record
hacks which 
will do it easily.
-- 
Posted via http://www.ruby-forum.com
/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Deploying Rails" group.
To post to this group, send email to
rubyonrails-deploymentgooglegroups.com
To unsubscribe from this group, send email to
rubyonrails-deployment-unsubscribegooglegroups.com
For more options, visit this group at http://groups.google.com/group/rubyonrails-deployment
?hl=en
-~----------~----~----~----~------~----~------~--~---


[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )