Thanks for the reply, but reading from my initial post I don't seem to have 
made my question clear ;(

I was thinking more in terms of how python would find it more efficient in 
retrieving the information, this being:
1) Storing all the user files in one place and then selecting only the files 
with the correct permissions for the user views
 2) Storing the files in the user's folder and then building a list of this 
files on the main views, such as /news/index.html

I guess in the first instance the code will only has to traverse one directory 
and build the dictionary of all the files for that specific user when the user 
wants their files. i.e /users/user/news/list_of_news_items.html

Whereas on the second method the code will have to travererse each user's 
directory and build a dictionary for all the published documents to display for 
the main view i.e /news/index.html

The thing that bothers me is that I ma have 10 users or 100,000 users and 
really wanted to get an opinion as to which option would scale better, leaving 
aside the relational DB approach.

Dave

-------- Original Message --------
From: Kent Johnson <[email protected]>
Apparently from: [email protected]
To: [email protected]
Cc: [email protected]
Subject: Re: [Tutor] design advise
Date: Wed, 26 Aug 2009 13:41:54 -0400

> On Wed, Aug 26, 2009 at 7:52 AM, <[email protected]> wrote:
> > Hello,
> > I would like advise on what method would be better in terms of search and 
> > retrieval.
> >
> > In my application I need to choose how to store data for each user, for 
> > example:
> >
> > /news
> > /articles
> > /games
> >
> > My difficulty now comes in how to store this data in that I will need to 
> > create views of the data depending on where in the directory the viewer is 
> > at for example file:///news/ should contain all the news submitted by all 
> > users and file:///games/ should contain all games ...
> >
> > Also in the file:///users/user/ the user will need access only to their own 
> > items, so for example, file:///users/user_1/news/ will list all news added 
> > by user_1 etc...
> >
> > Which is the more efficient option for storing this data, is it better to 
> > have all in one place and for each users'
> >  view to search by user id and return the filtered down list, or store it 
> > within each users' individual directory and then create a new list by 
> > traversing each users' directory?
> 
> Maybe you should consider storing the data in a database instead of in
> the file system? Then it would be easy to retrieve all news, or just
> the news for a single user.
> 
> Kent
_______________________________________________
Tutor maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/tutor

Reply via email to