6.0.0-alpha10
5/18/25

[#6175] Groups SQL driver
Summary Groups SQL driver
Queue Horde Framework Packages
Queue Version HEAD
Type Enhancement
State Resolved
Priority 1. Low
Owners chuck (at) horde (dot) org
Requester duck (at) obala (dot) net
Created 01/30/2008 (6318 days ago)
Due
Updated 04/09/2008 (6248 days ago)
Assigned 04/05/2008 (6252 days ago)
Resolved 04/05/2008 (6252 days ago)
Milestone
Patch Yes

History
04/09/2008 03:06:53 AM 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 09:22:38 AM 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 09:19:07 AM 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 07:07:58 PM Chuck Hagenbuch Comment #7
Assigned to Chuck Hagenbuch
State ⇒ Resolved
Taken from Horde DevelopersHorde Developers
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 05:04:08 AM Chuck Hagenbuch Comment #6
Assigned to Horde DevelopersHorde Developers
State ⇒ Assigned
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/05/2008 02:50:19 AM 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 06:54:05 PM Chuck Hagenbuch State ⇒ Accepted
 
02/25/2008 01:04:31 AM Jan Schneider Patch ⇒ Yes
 
02/25/2008 01:04:16 AM Jan Schneider Deleted Original Message
 
02/24/2008 04:01:44 PM 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 05:33:30 PM 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 05:27:19 PM 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 04:53:31 PM Duck Comment #1
Priority ⇒ 1. Low
State ⇒ New
New Attachment: groups.tgz Download
Queue ⇒ Horde Framework Packages
Summary ⇒ Groups SQL driver
Type ⇒ Enhancement
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.

Saved Queries