CouchDB and app with many branches on Rails3

11 views
Skip to first unread message

PEpe

unread,
Oct 12, 2010, 12:39:07 PM10/12/10
to eco_apps
Hi,

I would by happy to know your opinion.

I'm stop development of big monolithic app on Rails2, which can be
split to 16 smaller apps follow your great guide. I'm develop app that
will used by many companies, something like Basecamp. Now I decided to
start again follow your guide and with CouchDB and Rails3.

First I am not sure how to decide with db architecture:
a) One big CouchDB database for all apps - each apps one collection
(table)
b) Separate databases for each app how you advice in guide (finally 16
CouchDB databases)
c) Separate databases for each customer (finally customer_count
CouchDB databases)
d) Separate databases for each app and for each customer (finally 16 *
customers_count CouchDB databases)
Option a) seems most easy for develop, database can grow to gigantic
size, but with CouchDB I don't care very much.
Option b) follow your advice have separate databases for each app, but
I thing it can works well also with one database and setup database
user access for each app.
Option c) seems best for security reasons, but when I will add new app
to ecosystem, I need create new collection (table) in each customer
database... And similar issues sure also come.
Option d) is join c) and your advice of separate databases, but so
many database instances seems for me unmaintainable...

Second I would like ask if is possible to run eco_apps on Rails3, or
I'll need make some updates of gems...

Thank you very much for replay,

Josef

Lei Guo

unread,
Oct 13, 2010, 3:06:25 AM10/13/10
to eco_...@googlegroups.com
Hi, Josef

In my opinion, there's no way to choose option c) or d). The database should be split based on business logic, not data. I bet it's very easy to avoid security problems, like limiting user's access to the data created by himself. On the other hand, for c) or d), it will be a nightmare when your customers grow to a big number, say 1000.

There's no big difference between a) and b). However, b) has several benefits over a) as follows:
1) It's easier to maintain migration.
2) Different apps can have models with same name (and same table name)
3) For small database, it's easier to backup and manage.

To be honest, We don't have much experience with CouchDB and haven't test eco_apps with it. We'd like to get your response and suggestion.

We will upgrade eco_apps to work with Rails3 very soon. This may takes 1 or 2 weeks. Will let you know once it's done.

PEpe

unread,
Oct 16, 2010, 10:08:50 AM10/16/10
to eco_apps
Thanks for very helpful reply and smartly explain why B is better
choice than A. It is great you are going to upgrade for Rails3, I'll
wait for it. I'll not use ActiveRecord in my app based on CouchDB. So
I wonder how gets it works with eco_apps (edits in eco_apps will sure
need for me)... I'll let you know.

PEpe

unread,
Nov 9, 2010, 6:57:53 AM11/9/10
to eco_apps
Hi, what about Rails 3 version of eco_apps? :) Thank you, Josef

Lei Guo

unread,
Nov 9, 2010, 12:07:53 PM11/9/10
to eco_...@googlegroups.com
Hi, Josef

I'm really sorry for the delay. In our initial plan, we'd like to make eco_apps more powerful for rails3, like support for message queue. However, when we come to the half road, some big events happen to our company. As a result, the daily works explode suddenly so that I don't have much time on this.

Anyhow, I'll try to find some time this week to move existing features of eco_apps to rails3.

Josef Hovad

unread,
Nov 10, 2010, 5:03:57 PM11/10/10
to eco_...@googlegroups.com
Don't worry and be in no hurry. I am just curious about it. I'll have time to work on my project with eco_apps on the end of month maybe... I look forward on it :)

2010/11/9 Lei Guo <guo...@idapted.com>

Lei Guo

unread,
Nov 30, 2010, 1:18:01 AM11/30/10
to eco_...@googlegroups.com
Hi, Josef

I'm glad to say that eco_apps for rails3 is ready.

https://github.com/eleutian/eco_apps
https://github.com/eleutian/eco_apps_master

As we have not tested it out, I believe there's bugs or things to be improved. I will appreciate it if you can try it and give me feedback. Thanks.

Sorry for the delay. :)

PEpe

unread,
Dec 4, 2010, 8:43:18 AM12/4/10
to eco_apps
Wow, thanks a lot :) I hope I'll try it asap, but now I'm still under
tons of other work... I look forward, bye, J

On Nov 30, 7:18 am, Lei Guo <guo...@idapted.com> wrote:
> Hi, Josef
>
> I'm glad to say that eco_apps for rails3 is ready.
>
> https://github.com/eleutian/eco_appshttps://github.com/eleutian/eco_apps_master
>
> As we have not tested it out, I believe there's bugs or things to be
> improved. I will appreciate it if you can try it and give me feedback.
> Thanks.
>
> Sorry for the delay. :)
>
>
>
> On Thu, Nov 11, 2010 at 6:03 AM, Josef Hovad <j.ho...@gmail.com> wrote:
> > Don't worry and be in no hurry. I am just curious about it. I'll have time
> > to work on my project with eco_apps on the end of month maybe... I look
> > forward on it :)
>
> > 2010/11/9 Lei Guo <guo...@idapted.com>
>
> > Hi, Josef
>
> >> I'm really sorry for the delay. In our initial plan, we'd like to make
> >> eco_apps more powerful for rails3, like support for message queue. However,
> >> when we come to the half road, some big events happen to our company. As a
> >> result, the daily works explode suddenly so that I don't have much time on
> >> this.
>
> >> Anyhow, I'll try to find some time this week to move existing features of
> >> eco_apps to rails3.
>
Reply all
Reply to author
Forward
0 new messages