[#6175] Groups SQL driver
Summary Groups SQL driver
Queue Horde Framework Packages
Queue Version HEAD
Type Enhancement
State Resolved
Priority 1. Low
Owners Chuck Hagenbuch <chuck (at) horde (dot) org>
Requester Duck <duck (at) obala (dot) net>
Created 01/30/2008 (103 days ago)
Due
Updated 04/08/2008 (34 days ago)
Assigned 04/05/2008 (37 days ago)
Resolved 04/05/2008 (37 days ago)
Attachments groups.tgz Download
sql.php Download
Milestone
Patch 1

History
04/08/2008 Chuck Hagenbuch Comment #10 Reply to this comment
Added a migration script similar to the perms one; also added sequence setting to both migration scripts so that nextId() doesn't result in collisions with the (probably pretty high) datatree ids that are preserved this way.

Works For Me (tm).

Thanks again.
04/06/2008 Duck Comment #9 Reply to this comment
> Works for me so far. It's all committed and merged - thanks! If you
> happen to have a migration script that'd be great, but it'd have to
> automatically update group ids in permissions also - tricky.

Unfortunately I don't have it.

By migrating even the DT id, updating permission would not be necessary.
04/06/2008 Duck Comment #8 Reply to this comment
> I'm changing group_uid in horde_groups_members to be an int, not a
> varchar - is that right?

yes
04/05/2008 Chuck Hagenbuch Comment #7
State ⇒ Resolved
Taken from Horde DevelopersHorde Developers
Assigned to Chuck Hagenbuch
Reply to this comment
Works for me so far. It's all committed and merged - thanks! If you happen to have a migration script that'd be great, but it'd have to automatically update group ids in permissions also - tricky.
04/05/2008 Chuck Hagenbuch Comment #6
State ⇒ Assigned
Assigned to Horde DevelopersHorde Developers
Reply to this comment
This is committed, with some changes for params and such; everything but conf.xml. I'm hoping to work on this and the other SQL drivers tomorrow.
04/04/2008 Chuck Hagenbuch Comment #5 Reply to this comment
I'm changing group_uid in horde_groups_members to be an int, not a varchar - is that right?
02/25/2008 Chuck Hagenbuch State ⇒ Accepted
 
02/24/2008 Jan Schneider Patch ⇒ 1
 
02/24/2008 Jan Schneider Deleted Attachment: sql2.php
 
02/24/2008 Duck Comment #4
New Attachment: sql.php Download
Reply to this comment
Fix adding member and removing group.
Now I am running it on my public server.
01/30/2008 Duck Comment #3 Reply to this comment
And a short test: Having 5 groups, each child of another, two users per group, groups cache enabled. Average of after 1000 runs.

Memory usage:
----
3,932,160 current data tree
3,407,872 sql2
----
500k less

Time in seconds
---
0,0060 dt
0,0041 sql
0,0035 sql2

script:
----
define('HORDE_BASE', dirname(__FILE__) . '/../');
require_once HORDE_BASE . '/lib/base.php';
require_once 'Horde/Group.php';
$s = &Group::factory('sql2');
$s->listGroups());
$s->getGroupMemberships('duck');
$s->getGroupMemberships('duck', true);
$s->userIsInGroup('duck', 85780, false);
$s->userIsInGroup('duck', 85780, true);
01/30/2008 Duck Comment #2
New Attachment: sql2.php
Reply to this comment
A little bit more optimized. It don't store  all object in session objects but only the results as normal session indexed array and it not needs parents column as parents are already stored in group name.
01/30/2008 Duck Comment #1
New Attachment: groups.tgz Download
Queue ⇒ Horde Framework Packages
Summary ⇒ Groups SQL driver
Type ⇒ Enhancement
Priority ⇒ 1. Low
State ⇒ New
Reply to this comment
Another attempt to move data out of DT to reduce time/memory usage. Acts the same as current DT groups driver just stores the data in two small dedicated tables.