Re: troll performance questions

Thierry Thomas <[email protected]> Sat, 11 Jan 2003 18:21:00 +0100
Newsgroups gmane.comp.horde.troll
Organization Kabbale Eros
Message-ID <[email protected]>
Le Sam 11 jan 03 à  6:47:57 +0100,
 Eric Rostetter <[email protected]> écrivait :

> My original idea would solve this.  Create the array of what the user
> thinks is there.  Retrieve the server's list (via nntp list command)
> into another array.  Compare the arrays to find groups to add and
> delete.
> 
> Of course, we could just wait for the user to access the group, find it
> missing, remove it from their list, and report the error.  No problem.
> And would still be needed for groups which are removed while you are already
> in troll.  But if we wanted to make sure the initial list is correct at
> the time of building, we'd need to add/delete at that time.

The usual way is:

- first time / first user: get the list from the server (may be quite
long...); store this list (with description and moderated status in
database - a kind of system wide newsgroups.dsc); then propose this list
to subscribe to some groups.

- next time / other users: check new groups, and for each subscribed
group of this user, check deleted groups (only among subscribed groups);
update the databases if needed, and propose to subscribe to new groups,
remove deleted ones from .newsrc [one might warn and propose to archive];

- the user may search in the list (from database) when he wants to
update his subscriptions; his .newsrc is actually stored into another
table in the database.

Remark about new and deleted groups:
Sometimes, groups status are modified (usually from un-moderated to
moderated); in this case, the group is actually deleted, and then
another one is created with the same name => we have to check for groups
creations and deletion at the beginning of the session.
-- 
Th. Thomas.

-- 
Troll mailing list
Frequently Asked Questions: http://horde.org/faq/
To unsubscribe, mail: [email protected]