Skip to Content.
Sympa Menu

grouper-users - how to accelerate to search subject from ldap

Subject: Grouper Users - Open Discussion List

List archive

how to accelerate to search subject from ldap


Chronological Thread 
  • From: "aifei" <>
  • To: "GW Brown, Information Systems and Computing" <>, "Martti Jokipii" <>, <>
  • Subject: how to accelerate to search subject from ldap
  • Date: Fri, 8 Jun 2007 16:51:48 +0800

hi, Gary:
I build grouper-ui-1.1 to manage the group and memberships.there's a
question to help.when i search subject from ldap which has peson entries more
than ten thousand,it becomes very slowly.but not happens in searching subject
from ldap which has thousands of peson entries.the attchment are my
source.xml and ehcache.xml.Could you help me resovle it?
regards!

aifei

<ehcache>

  <!-- Sets the path to the directory where cache .data files are created. -->
  <diskStore path="java.io.tmpdir"/>


  <!--
    Default Cache configuration. These will applied to caches
    programmatically created through the CacheManager.

    The following attributes are required for defaultCache:

    maxInMemory       - Sets the maximum number of objects that
                        will be created in memory
    eternal           - Sets whether elements are eternal. If
                        eternal,  timeouts are ignored and the
                        element is never expired.
    timeToIdleSeconds - Sets the time to idle for an element
                        before it expires. Is only used if the
                        element is not eternal.  Idle time is now -
                        last accessed time
    timeToLiveSeconds - Sets the time to live for an element
                        before it expires. Is only used if the
                        element is not eternal.  TTL is now -
                        creation time
    overflowToDisk    - Sets whether elements can overflow to
                        disk when the in-memory cache has reached
                        the maxInMemory limit.
  -->
  <defaultCache
    maxElementsInMemory="10000"
    eternal="false"
    timeToIdleSeconds="10"
    timeToLiveSeconds="20"
    overflowToDisk="true"
  />

  <!--
    Predefined caches.  Add your cache configuration settings here.
    If you do not have a configuration for your cache a WARNING
    will be issued when the CacheManager starts
  -->

<!--
  Grouper Caches
-->

  <!-- Group Attributes-->
  <cache  name="edu.internet2.middleware.grouper.Attribute"
          maxElementsInMemory="1000"
          eternal="false"
          timeToIdleSeconds="10"
          timeToLiveSeconds="20"
          overflowToDisk="false"  
  />
  <!-- Group Attributes -->

  <!-- Factors-->
  <cache  name="edu.internet2.middleware.grouper.Factor"
          maxElementsInMemory="25"
          eternal="false"
          timeToIdleSeconds="10"
          timeToLiveSeconds="20"
          overflowToDisk="false"  
  />
  <!-- Factor -->

  <!-- Group Field Definitions -->
  <cache  name="edu.internet2.middleware.grouper.Field"
          maxElementsInMemory="25"
          eternal="false"
          timeToIdleSeconds="10"
          timeToLiveSeconds="20"
          overflowToDisk="false"  
  />
  <!-- Group Field Definitions -->

  <!-- Groups -->
  <cache  name="edu.internet2.middleware.grouper.Group"
          maxElementsInMemory="1000"
          eternal="false"
          timeToIdleSeconds="10"
          timeToLiveSeconds="20"
          overflowToDisk="false"  
  />
  <!-- Groups -->

  <!-- Group Type Definitions -->
  <cache  name="edu.internet2.middleware.grouper.GroupType"
          maxElementsInMemory="25"
          eternal="false"
          timeToIdleSeconds="10"
          timeToLiveSeconds="20"
          overflowToDisk="false"  
  />
  <!-- Group Type Definitions -->

  <!-- Grouper Sessions -->
  <cache  name="edu.internet2.middleware.grouper.GrouperSession"
          maxElementsInMemory="100"
          eternal="false"
          timeToIdleSeconds="10"
          timeToLiveSeconds="20"
          overflowToDisk="false"  
  />
  <!-- Grouper Sessions -->

  <!-- Hibernate Subjects -->
  <cache  name="edu.internet2.middleware.grouper.HibernateSubject"
          maxElementsInMemory="1000"
          eternal="false"
          timeToIdleSeconds="10"
          timeToLiveSeconds="20"
          overflowToDisk="false"  
  />
  <!-- Hibernate Subjects -->

  <!-- Hibernate Subject Attributess -->
  <cache name="edu.internet2.middleware.grouper.HibernateSubjectAttribute"
          maxElementsInMemory="1000"
          eternal="false"
          timeToIdleSeconds="10"
          timeToLiveSeconds="20"
          overflowToDisk="false"  
  />
  <!-- Hibernate Subject Attributes -->

  <!-- Members -->
  <cache  name="edu.internet2.middleware.grouper.Member"
          maxElementsInMemory="10000"
          eternal="false"
          timeToIdleSeconds="10"
          timeToLiveSeconds="20"
          overflowToDisk="false"  
  />
  <!-- Members -->

  <!-- Memberships-->
  <cache  name="edu.internet2.middleware.grouper.Membership"
          maxElementsInMemory="5000"
          eternal="false"
          timeToIdleSeconds="10"
          timeToLiveSeconds="20"
          overflowToDisk="false"  
  />
  <!-- Memberships -->

  <!-- Stems-->
  <cache  name="edu.internet2.middleware.grouper.Stem"
          maxElementsInMemory="1000"
          eternal="false"
          timeToIdleSeconds="10"
          timeToLiveSeconds="20"
          overflowToDisk="false"  
  />
  <!-- Stems -->

  <!-- Queries -->

  <cache  name="edu.internet2.middleware.grouper.CompositeFinder.IsFactor"
          maxElementsInMemory="100"
          eternal="false"
          timeToIdleSeconds="10"
          timeToLiveSeconds="20"
          overflowToDisk="false"
  />
        
  <cache  name="edu.internet2.middleware.grouper.CompositeFinder.IsOwner"
          maxElementsInMemory="100"
          eternal="false"
          timeToIdleSeconds="10"
          timeToLiveSeconds="20"
          overflowToDisk="false"
  />
        
  <cache  name="edu.internet2.middleware.grouper.FieldFinder.FindAll"
          maxElementsInMemory="100"
          eternal="false"
          timeToIdleSeconds="10"
          timeToLiveSeconds="20"
          overflowToDisk="false"
  />
        
  <cache  name="edu.internet2.middleware.grouper.FieldFinder.FindAllByType"
          maxElementsInMemory="100"
          eternal="false"
          timeToIdleSeconds="10"
          timeToLiveSeconds="20"
          overflowToDisk="false"
  />
        
  <cache  name="edu.internet2.middleware.grouper.GroupFinder.FindByApproximateAttr"
          maxElementsInMemory="1000"
          eternal="false"
          timeToIdleSeconds="10"
          timeToLiveSeconds="20"
          overflowToDisk="false"
  />
        
  <cache  name="edu.internet2.middleware.grouper.GroupFinder.FindByApproximateName"
          maxElementsInMemory="1000"
          eternal="false"
          timeToIdleSeconds="10"
          timeToLiveSeconds="20"
          overflowToDisk="false"
  />
        
  <cache  name="edu.internet2.middleware.grouper.GroupFinder.FindByAnyApproximateAttr"
          maxElementsInMemory="1000"
          eternal="false"
          timeToIdleSeconds="10"
          timeToLiveSeconds="20"
          overflowToDisk="false"
  />
        
  <cache  name="edu.internet2.middleware.grouper.GroupFinder.FindByCreatedAfter"
          maxElementsInMemory="1000"
          eternal="false"
          timeToIdleSeconds="10"
          timeToLiveSeconds="20"
          overflowToDisk="false"
  />
        
  <cache  name="edu.internet2.middleware.grouper.GroupFinder.FindByCreatedBefore"
          maxElementsInMemory="1000"
          eternal="false"
          timeToIdleSeconds="10"
          timeToLiveSeconds="20"
          overflowToDisk="false"
  />
        
  <cache  name="edu.internet2.middleware.grouper.GroupFinder.FindByModifiedAfter"
          maxElementsInMemory="1000"
          eternal="false"
          timeToIdleSeconds="10"
          timeToLiveSeconds="20"
          overflowToDisk="false"
  />
        
  <cache  name="edu.internet2.middleware.grouper.GroupFinder.FindByModifiedBefore"
          maxElementsInMemory="1000"
          eternal="false"
          timeToIdleSeconds="10"
          timeToLiveSeconds="20"
          overflowToDisk="false"
  />
        
  <cache  name="edu.internet2.middleware.grouper.GroupFinder.FindByName"
          maxElementsInMemory="1000"
          eternal="false"
          timeToIdleSeconds="10"
          timeToLiveSeconds="20"
          overflowToDisk="false"
  />
        
  <cache  name="edu.internet2.middleware.grouper.GroupFinder.FindByUuid"
          maxElementsInMemory="1000"
          eternal="false"
          timeToIdleSeconds="10"
          timeToLiveSeconds="20"
          overflowToDisk="false"
  />
        
  <cache  name="edu.internet2.middleware.grouper.GroupTypeFinder.FindAll"
          maxElementsInMemory="10000"
          eternal="false"
          timeToIdleSeconds="10"
          timeToLiveSeconds="20"
          overflowToDisk="false"
  />
        
  <cache  name="edu.internet2.middleware.grouper.MemberFinder.FindBySubject"
          maxElementsInMemory="10000"
          eternal="false"
          timeToIdleSeconds="10"
          timeToLiveSeconds="20"
          overflowToDisk="false"
  />
        
  <cache  name="edu.internet2.middleware.grouper.MemberFinder.FindByUuid"
          maxElementsInMemory="10000"
          eternal="false"
          timeToIdleSeconds="10"
          timeToLiveSeconds="20"
          overflowToDisk="false"
  />
       
  <cache  name="edu.internet2.middleware.grouper.MembershipFinder.FindAllMemberships"
          maxElementsInMemory="10000"
          eternal="false"
          timeToIdleSeconds="10"
          timeToLiveSeconds="20"
          overflowToDisk="false"
  />
       
  <cache  name="edu.internet2.middleware.grouper.MembershipFinder.FindByUuid"
          maxElementsInMemory="10000"
          eternal="false"
          timeToIdleSeconds="10"
          timeToLiveSeconds="20"
          overflowToDisk="false"
  />
       
  <cache  name="edu.internet2.middleware.grouper.MembershipFinder.FindByCreatedAfter"
          maxElementsInMemory="5000"
          eternal="false"
          timeToIdleSeconds="10"
          timeToLiveSeconds="20"
          overflowToDisk="false"
  />
        
  <cache  name="edu.internet2.middleware.grouper.MembershipFinder.FindByCreatedBefore"
          maxElementsInMemory="5000"
          eternal="false"
          timeToIdleSeconds="10"
          timeToLiveSeconds="20"
          overflowToDisk="false"
  />
        
  <cache  name="edu.internet2.middleware.grouper.MembershipFinder.FindChildMemberships"
          maxElementsInMemory="5000"
          eternal="false"
          timeToIdleSeconds="10"
          timeToLiveSeconds="20"
          overflowToDisk="false"
  />
       
  <cache  name="edu.internet2.middleware.grouper.MembershipFinder.FindEffectiveMemberships"
          maxElementsInMemory="5000"
          eternal="false"
          timeToIdleSeconds="10"
          timeToLiveSeconds="20"
          overflowToDisk="false"
  />
       
  <cache  name="edu.internet2.middleware.grouper.MembershipFinder.FindEffectiveMembershipsMember"
          maxElementsInMemory="5000"
          eternal="false"
          timeToIdleSeconds="10"
          timeToLiveSeconds="20"
          overflowToDisk="false"
  />
       
  <cache  name="edu.internet2.middleware.grouper.MembershipFinder.FindEffectiveMembershipsOwnerMember"
          maxElementsInMemory="5000"
          eternal="false"
          timeToIdleSeconds="10"
          timeToLiveSeconds="20"
          overflowToDisk="false"
  />
      
  <cache  name="edu.internet2.middleware.grouper.MembershipFinder.FindImmediateMembershipsMember"
          maxElementsInMemory="5000"
          eternal="false"
          timeToIdleSeconds="10"
          timeToLiveSeconds="20"
          overflowToDisk="false"
  />
      
  <cache  name="edu.internet2.middleware.grouper.MembershipFinder.FindImmediateMembershipsOwner"
          maxElementsInMemory="5000"
          eternal="false"
          timeToIdleSeconds="10"
          timeToLiveSeconds="20"
          overflowToDisk="false"
  />
      
  <cache  name="edu.internet2.middleware.grouper.MembershipFinder.FindMembershipByType"
          maxElementsInMemory="5000"
          eternal="false"
          timeToIdleSeconds="10"
          timeToLiveSeconds="20"
          overflowToDisk="false"
  />
      
  <cache  name="edu.internet2.middleware.grouper.MembershipFinder.FindMembershipsByType"
          maxElementsInMemory="5000"
          eternal="false"
          timeToIdleSeconds="10"
          timeToLiveSeconds="20"
          overflowToDisk="false"
  />
      
  <cache  name="edu.internet2.middleware.grouper.MembershipFinder.FindMemberships"
          maxElementsInMemory="5000"
          eternal="false"
          timeToIdleSeconds="10"
          timeToLiveSeconds="20"
          overflowToDisk="false"
  />
      
  <cache  name="edu.internet2.middleware.grouper.MembershipFinder.FindMembershipsOwner"
          maxElementsInMemory="5000"
          eternal="false"
          timeToIdleSeconds="10"
          timeToLiveSeconds="20"
          overflowToDisk="false"
  />
      
  <cache  name="edu.internet2.middleware.grouper.MembershipFinder.FindMembershipsOwnerMember"
          maxElementsInMemory="5000"
          eternal="false"
          timeToIdleSeconds="10"
          timeToLiveSeconds="20"
          overflowToDisk="false"
  />
 
  <cache name="edu.internet2.middleware.grouper.StemFinder.FindByApproximateDisplayExtension"
          maxElementsInMemory="1000"
          eternal="false"
          timeToIdleSeconds="10"
          timeToLiveSeconds="20"
          overflowToDisk="false"
  />
        
  <cache name="edu.internet2.middleware.grouper.StemFinder.FindByApproximateDisplayName"
          maxElementsInMemory="1000"
          eternal="false"
          timeToIdleSeconds="10"
          timeToLiveSeconds="20"
          overflowToDisk="false"
  />
        
  <cache name="edu.internet2.middleware.grouper.StemFinder.FindByApproximateExtension"
          maxElementsInMemory="1000"
          eternal="false"
          timeToIdleSeconds="10"
          timeToLiveSeconds="20"
          overflowToDisk="false"
  />
        
  <cache  name="edu.internet2.middleware.grouper.StemFinder.FindByApproximateName"
          maxElementsInMemory="1000"
          eternal="false"
          timeToIdleSeconds="10"
          timeToLiveSeconds="20"
          overflowToDisk="false"
  />
        
  <cache name="edu.internet2.middleware.grouper.StemFinder.FindByApproximateNameAny"
          maxElementsInMemory="1000"
          eternal="false"
          timeToIdleSeconds="10"
          timeToLiveSeconds="20"
          overflowToDisk="false"
  />
        
  <cache  name="edu.internet2.middleware.grouper.StemFinder.FindByCreatedAfter"
          maxElementsInMemory="1000"
          eternal="false"
          timeToIdleSeconds="10"
          timeToLiveSeconds="20"
          overflowToDisk="false"
  />
        
  <cache  name="edu.internet2.middleware.grouper.StemFinder.FindByCreatedBefore"
          maxElementsInMemory="1000"
          eternal="false"
          timeToIdleSeconds="10"
          timeToLiveSeconds="20"
          overflowToDisk="false"
  />
        
  <cache  name="edu.internet2.middleware.grouper.StemFinder.FindByName"
          maxElementsInMemory="1000"
          eternal="false"
          timeToIdleSeconds="10"
          timeToLiveSeconds="20"
          overflowToDisk="false"
  />
        
  <cache  name="edu.internet2.middleware.grouper.StemFinder.FindByUuid"
          maxElementsInMemory="1000"
          eternal="false"
          timeToIdleSeconds="10"
          timeToLiveSeconds="20"
          overflowToDisk="false"
  />
        

  <!-- Queries -->

<!--
  Hibernate Query Caches
-->

  <cache name="net.sf.hibernate.cache.StandardQueryCache"
    maxElementsInMemory="500"
    eternal="false"
    timeToIdleSeconds="10"
    timeToLiveSeconds="20"
    overflowToDisk="false"
  />

  <cache name="net.sf.hibernate.cache.UpdateTimestampsCache"
    maxElementsInMemory="5000"
    eternal="true"
    overflowToDisk="true"
  />

</ehcache>
<?xml version="1.0" encoding="utf-8"?>

<!--
Grouper's subject resolver configuration
$Id: sources.xml,v 1.6 2006/07/10 15:18:34 blair Exp $
-->

<sources>

  <!-- Group Subject Resolver -->
  <!-- 
    NOTE: It is recommended that you **not** change the default
          values for this source adapter.
  -->
  <source adapterClass="edu.internet2.middleware.grouper.GrouperSourceAdapter">
    <id>g:gsa</id>
    <name>Grouper: Group Source Adapter</name>
    <type>group</type>
  </source>

 <source adapterClass="edu.internet2.middleware.subject.provider.JNDISourceAdapter">
    <id>example</id>
    <name>SCUT Edu</name>
    <type>person</type>
    <init-param>
      <param-name>INITIAL_CONTEXT_FACTORY</param-name>
      <param-value>com.sun.jndi.ldap.LdapCtxFactory</param-value>
    </init-param>
    <init-param>
      <param-name>PROVIDER_URL</param-name>
      <param-value>ldap://192.168.78.12:389</param-value>
    </init-param>
    <init-param>
      <param-name>SECURITY_AUTHENTICATION</param-name>
      <param-value>simple</param-value>
    </init-param>
    <init-param>
      <param-name>SECURITY_PRINCIPAL</param-name>
      <param-value>cn=Directory Manager</param-value>
    </init-param>
    <init-param>
      <param-name>SECURITY_CREDENTIALS</param-name>
      <param-value>aaaaa</param-value>
    </init-param>
     <init-param>
      <param-name>SubjectID_AttributeType</param-name>
      <param-value>cn</param-value>
    </init-param>
    <init-param>
      <param-name>Name_AttributeType</param-name>
      <param-value>cn</param-value>
    </init-param>
    <init-param>
      <param-name>Description_AttributeType</param-name>
      <param-value>sn</param-value>
    </init-param>
    
    /// Scope Values can be: OBJECT_SCOPE, ONELEVEL_SCOPE, SUBTREE_SCOPE 
    /// For filter use 
    
    <search>
        <searchType>searchSubject</searchType>
        <param>
            <param-name>filter</param-name>
            <param-value>
                (&amp; (cn=%TERM%) (objectclass=person))
            </param-value>
        </param>
        <param>
            <param-name>scope</param-name>
            <param-value>
                SUBTREE_SCOPE            
            </param-value>
        </param>
        <param>
            <param-name>base</param-name>
            <param-value>
                ou=people,dc=scut,dc=edu,dc=cn
            </param-value>
        </param>
         
    </search>
    <search>
        <searchType>searchSubjectByIdentifier</searchType>
        <param>
            <param-name>filter</param-name>
            <param-value>
                (&amp; (cn=%TERM%) (objectclass=person))
            </param-value>
        </param>
        <param>
            <param-name>scope</param-name>
            <param-value>
                SUBTREE_SCOPE            
            </param-value>
        </param>
        <param>
            <param-name>base</param-name>
            <param-value>
                ou=people,dc=scut,dc=edu,dc=cn
            </param-value>
        </param>
    </search>
    
    <search>
       <searchType>search</searchType>
         <param>
            <param-name>filter</param-name>
            <param-value>
                (&amp; (|(uid=*%TERM%*)(cn=*%TERM%*)(sn=*%TERM%*))(objectclass=person))
            </param-value>
        </param>
        <param>
            <param-name>scope</param-name>
            <param-value>
                SUBTREE_SCOPE            
            </param-value>
        </param>
         <param>
            <param-name>base</param-name>
            <param-value>
                ou=people,dc=scut,dc=edu,dc=cn
            </param-value>
        </param>
    </search>
    ///Attributes you would like to display when doing a search 
    <attribute>cn</attribute>
    <attribute>ou</attribute>
   
  </source>


</sources>




Archive powered by MHonArc 2.6.16.

Top of Page