[esb-issues] [JBoss JIRA] Commented: (JBESB-1675) Possible Juddi Performance problems

Kevin Conner (JIRA) jira-events at lists.jboss.org
Tue Jul 29 10:04:05 EDT 2008


    [ https://jira.jboss.org/jira/browse/JBESB-1675?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12422893#action_12422893 ] 

Kevin Conner commented on JBESB-1675:
-------------------------------------

There are currently eight services created at startup, a summary of the DB accesses will be shown after the commentary.
The following sequences are generated when a service has *already been registered* with jUDDI, other operations will
be invoked on the first occassion.

public void registerEPR(String category, String serviceName, String serviceDescription, EPR epr, String eprDescription)

        protected Service findService(String category, String serviceName) throws JAXRException


The first step when registering an EPR is to locate the service.  In order to do this our code searches for the
classification we are using to register the services, the SQL being invoked is

        sql is: SELECT M.TMODEL_KEY,M.LAST_UPDATE,M.NAME,M.DELETED FROM TMODEL M WHERE M.DELETED IS NULL AND M.NAME = ? ORDER BY M.NAME DESC,M.LAST_UPDATE DESC
        param[1] = 'org.jboss.soa.esb.:category'

        This returns a single row representing the model definition.

        The next query is to ascertain the correct authorised user of the model.

        sql is: SELECT AUTHORIZED_NAME,OPERATOR,NAME,LANG_CODE,OVERVIEW_URL,DELETED FROM TMODEL WHERE TMODEL_KEY=? AND DELETED IS NULL
        param[1] = 'uuid:C7536010-F786-11DB-A010-E6245C4E79A1'

Once we have this information we can query the registry to locate the services
                        BulkResponse response = bqm.findServices(null, findQualifiers,
                                        namePatterns, classifications, null);


        sql is: SELECT S.SERVICE_KEY,S.LAST_UPDATE FROM BUSINESS_SERVICE S,SERVICE_CATEGORY C WHERE C.SERVICE_KEY = S.SERVICE_KEY AND ((C.TMODEL_KEY_REF = ? AND C.KEY_VALUE = ?)) ORDER BY S.LAST_UPDATE DESC
        param[1] = 'uuid:C7536010-F786-11DB-A010-E6245C4E79A1'
        param[2] = 'JBossESB-Internal'

        Find all services with the correct category, returning a row for each service within that category (eight in a normal deployment)

        The next step is to narrow down this list to the right service.

        sql is: SELECT S.SERVICE_KEY,S.LAST_UPDATE,N.NAME FROM BUSINESS_SERVICE S,SERVICE_NAME N WHERE N.SERVICE_KEY = S.SERVICE_KEY AND ((UPPER(NAME) = ?)) AND S.SERVICE_KEY IN (?,?,?,?,?,?,?,?) ORDER BY N.NAME DESC,S.LAST_UPDATE DESC
        param[1] = 'INVOKERSERVICE'
        param[2] = 'B5C14C50-5CAB-11DD-ADED-96C4460C4C9A'
        param[3] = 'B5A55FE0-5CAB-11DD-ADED-A5C22D903D36'
        param[4] = 'B56E2340-5CAB-11DD-ADED-EFD604928108'
        param[5] = 'AD3C0DE0-5CAB-11DD-ADED-81D73D5DC0EE'
        param[6] = 'AA23D160-5CAB-11DD-ADED-A273F824BE84'
        param[7] = 'AA0F37F0-5CAB-11DD-ADED-E2928732C77E'
        param[8] = 'A9FC2520-5CAB-11DD-ADED-FD755562266D'
        param[9] = 'A9CC6290-5CAB-11DD-ADED-C7C43FE3D3A4'

        This will return a single row for the service in question.

        Following this jUDDI then obtains the Business Key and service name

        sql is: SELECT BUSINESS_KEY FROM BUSINESS_SERVICE WHERE SERVICE_KEY=?
        param[1] = 'A9CC6290-5CAB-11DD-ADED-C7C43FE3D3A4'

        sql is: SELECT LANG_CODE,NAME, SERVICE_NAME_ID FROM SERVICE_NAME WHERE SERVICE_KEY=? ORDER BY SERVICE_NAME_ID
        param[1] = 'A9CC6290-5CAB-11DD-ADED-C7C43FE3D3A4'

Having found the services we then make yet another query to obtain the classification and authorised user
                ClassificationScheme cScheme = bqm.findClassificationSchemeByName(findQualifiers, "org.jboss.soa.esb.:category");

        sql is: SELECT M.TMODEL_KEY,M.LAST_UPDATE,M.NAME,M.DELETED FROM TMODEL M WHERE M.DELETED IS NULL AND M.NAME LIKE ? ORDER BY M.NAME DESC,M.LAST_UPDATE DESC
        param[1] = 'org.jboss.soa.esb.:category%'


        sql is: SELECT AUTHORIZED_NAME,OPERATOR,NAME,LANG_CODE,OVERVIEW_URL,DELETED FROM TMODEL WHERE TMODEL_KEY=? AND DELETED IS NULL
        param[1] = 'uuid:C7536010-F786-11DB-A010-E6245C4E79A1'


We are now in a position of saving the new EPR by adding a service binding.

        Obtain the publisher

        sql is: SELECT PUBLISHER_NAME,EMAIL_ADDRESS,IS_ADMIN,IS_ENABLED,MAX_BUSINESSES,MAX_SERVICES_PER_BUSINESS,MAX_BINDINGS_PER_SERVICE,MAX_TMODELS FROM PUBLISHER WHERE PUBLISHER_ID=?
        param[1] = 'jbossesb'

        Create an authentication token
        sql is: INSERT INTO AUTH_TOKEN (AUTH_TOKEN,PUBLISHER_ID,PUBLISHER_NAME,CREATED,LAST_USED,NUMBER_OF_USES,TOKEN_STATE) VALUES (?,?,?,?,?,0,1)
        param[1] = 'authToken:8309CCC0-5D4F-11DD-8CC0-C698BD83BA6D'
        param[2] = 'jbossesb'
        param[3] = 'JBoss ESB User'
        param[4] = '2008-07-29 10:19:57.357'
        param[5] = '2008-07-29 10:19:57.357'

        Retrieve the publisher for the authentication token we have just created (?)
        sql is: SELECT PUBLISHER_ID,PUBLISHER_NAME FROM AUTH_TOKEN WHERE AUTH_TOKEN=?
        param[1] = 'authToken:8309CCC0-5D4F-11DD-8CC0-C698BD83BA6D'

        Retrieve the state of the authentication token (?)
        sql is: SELECT TOKEN_STATE FROM AUTH_TOKEN WHERE AUTH_TOKEN=?
        param[1] = 'authToken:8309CCC0-5D4F-11DD-8CC0-C698BD83BA6D'

        Retrieve the 'last used' timestamp for the authentication token
        sql is: SELECT LAST_USED FROM AUTH_TOKEN WHERE AUTH_TOKEN=?
        param[1] = 'authToken:8309CCC0-5D4F-11DD-8CC0-C698BD83BA6D'

        Update the 'last used' token
        sql is: UPDATE AUTH_TOKEN SET LAST_USED=?,NUMBER_OF_USES=NUMBER_OF_USES+1 WHERE AUTH_TOKEN=?
        param[1] = '2008-07-29 10:19:57.475'
        param[2] = 'authToken:8309CCC0-5D4F-11DD-8CC0-C698BD83BA6D'

        Obtain the business key associated with the service
        sql is: SELECT BUSINESS_KEY FROM BUSINESS_SERVICE WHERE SERVICE_KEY=?
        param[1] = 'A9CC6290-5CAB-11DD-ADED-C7C43FE3D3A4'

        Obtain the business entity/service information (although it does not appear to be used subsequently)
        sql is: SELECT * FROM BUSINESS_ENTITY e, BUSINESS_SERVICE s WHERE e.BUSINESS_KEY = s.BUSINESS_KEY AND s.SERVICE_KEY=? AND e.PUBLISHER_ID=?
        param[1] = 'A9CC6290-5CAB-11DD-ADED-C7C43FE3D3A4'
        param[2] = 'jbossesb'

        Finally, add the binding
        sql is: INSERT INTO BINDING_TEMPLATE (SERVICE_KEY,BINDING_KEY,ACCESS_POINT_TYPE,ACCESS_POINT_URL,HOSTING_REDIRECTOR,LAST_UPDATE) VALUES (?,?,?,?,?,?)
        param[1] = 'A9CC6290-5CAB-11DD-ADED-C7C43FE3D3A4'
        param[2] = '83214C60-5D4F-11DD-8C60-D2901B2101B5'
        param[3] = 'other'
        param[4] = '<wsa:From xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"><wsa:Address>jms://127.0.0.1:1099/queue/OperationsResultCollectorQueue</wsa:Address><wsa:ReferenceProperties><jbossesb:java.naming.factory.initial xmlns:jbossesb="http://schemas.jboss.com/ws/2007/01/jbossesb">org.jnp.interfaces.NamingContextFactory</jbossesb:java.naming.factory.initial><jbossesb:java.naming.provider.url xmlns:jbossesb="http://schemas.jboss.com/ws/2007/01/jbossesb">127.0.0.1:1099</jbossesb:java.naming.provider.url><jbossesb:java.naming.factory.url.pkgs xmlns:jbossesb="http://schemas.jboss.com/ws/2007/01/jbossesb">org.jnp.interfaces</jbossesb:java.naming.factory.url.pkgs><jbossesb:destination-type xmlns:jbossesb="http://schemas.jboss.com/ws/2007/01/jbossesb">queue</jbossesb:destination-type><jbossesb:specification-version xmlns:jbossesb="http://schemas.jboss.com/ws/2007/01/jbossesb">1.1</jbossesb:specification-version><jbossesb:connection-factory xmlns:jbossesb="http://schemas.jboss.com/ws/2007/01/jbossesb">ConnectionFactory</jbossesb:connection-factory><jbossesb:persistent xmlns:jbossesb="http://schemas.jboss.com/ws/2007/01/jbossesb">true</jbossesb:persistent><jbossesb:acknowledge-mode xmlns:jbossesb="http://schemas.jboss.com/ws/2007/01/jbossesb">AUTO_ACKNOWLEDGE</jbossesb:acknowledge-mode><jbossesb:transacted xmlns:jbossesb="http://schemas.jboss.com/ws/2007/01/jbossesb">false</jbossesb:transacted><jbossesb:type xmlns:jbossesb="http://schemas.jboss.com/ws/2007/01/jbossesb">urn:jboss/esb/epr/type/jms</jbossesb:type></wsa:ReferenceProperties></wsa:From>'
        param[5] = 'null'
        param[6] = '2008-07-29 10:19:57.487'


In total, registering eight EPRs (without defining the services) creates the following access

      8 sql is: INSERT INTO AUTH_TOKEN (AUTH_TOKEN,PUBLISHER_ID,PUBLISHER_NAME,CREATED,LAST_USED,NUMBER_OF_USES,TOKEN_STATE) VALUES (?,?,?,?,?,0,1)
      8 sql is: INSERT INTO BINDING_TEMPLATE (SERVICE_KEY,BINDING_KEY,ACCESS_POINT_TYPE,ACCESS_POINT_URL,HOSTING_REDIRECTOR,LAST_UPDATE) VALUES (?,?,?,?,?,?)
     16 sql is: SELECT AUTHORIZED_NAME,OPERATOR,NAME,LANG_CODE,OVERVIEW_URL,DELETED FROM TMODEL WHERE TMODEL_KEY=? AND DELETED IS NULL
     16 sql is: SELECT BUSINESS_KEY FROM BUSINESS_SERVICE WHERE SERVICE_KEY=?
      8 sql is: SELECT * FROM BUSINESS_ENTITY e, BUSINESS_SERVICE s WHERE e.BUSINESS_KEY = s.BUSINESS_KEY AND s.SERVICE_KEY=? AND e.PUBLISHER_ID=?
      8 sql is: SELECT LANG_CODE,NAME, SERVICE_NAME_ID FROM SERVICE_NAME WHERE SERVICE_KEY=? ORDER BY SERVICE_NAME_ID
      8 sql is: SELECT LAST_USED FROM AUTH_TOKEN WHERE AUTH_TOKEN=?
      8 sql is: SELECT M.TMODEL_KEY,M.LAST_UPDATE,M.NAME,M.DELETED FROM TMODEL M WHERE M.DELETED IS NULL AND M.NAME LIKE ? ORDER BY M.NAME DESC,M.LAST_UPDATE DESC
      8 sql is: SELECT M.TMODEL_KEY,M.LAST_UPDATE,M.NAME,M.DELETED FROM TMODEL M WHERE M.DELETED IS NULL AND M.NAME = ? ORDER BY M.NAME DESC,M.LAST_UPDATE DESC
      8 sql is: SELECT PUBLISHER_ID,PUBLISHER_NAME FROM AUTH_TOKEN WHERE AUTH_TOKEN=?
      8 sql is: SELECT PUBLISHER_NAME,EMAIL_ADDRESS,IS_ADMIN,IS_ENABLED,MAX_BUSINESSES,MAX_SERVICES_PER_BUSINESS,MAX_BINDINGS_PER_SERVICE,MAX_TMODELS FROM PUBLISHER WHERE PUBLISHER_ID=?
      8 sql is: SELECT S.SERVICE_KEY,S.LAST_UPDATE FROM BUSINESS_SERVICE S,SERVICE_CATEGORY C WHERE C.SERVICE_KEY = S.SERVICE_KEY AND ((C.TMODEL_KEY_REF = ? AND C.KEY_VALUE = ?)) ORDER BY S.LAST_UPDATE DESC
      8 sql is: SELECT S.SERVICE_KEY,S.LAST_UPDATE,N.NAME FROM BUSINESS_SERVICE S,SERVICE_NAME N WHERE N.SERVICE_KEY = S.SERVICE_KEY AND ((UPPER(NAME) = ?)) AND S.SERVICE_KEY IN (?,?,?,?,?,?,?,?) ORDER BY N.NAME DESC,S.LAST_UPDATE DESC
      8 sql is: SELECT TOKEN_STATE FROM AUTH_TOKEN WHERE AUTH_TOKEN=?
      8 sql is: UPDATE AUTH_TOKEN SET LAST_USED=?,NUMBER_OF_USES=NUMBER_OF_USES+1 WHERE AUTH_TOKEN=?


The unregister will follow later, although that is much worse than registering

> Possible Juddi Performance problems
> -----------------------------------
>
>                 Key: JBESB-1675
>                 URL: https://jira.jboss.org/jira/browse/JBESB-1675
>             Project: JBoss ESB
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: Registry and Repository
>    Affects Versions: 4.2.1
>            Reporter: Tom Cunningham
>            Assignee: Kevin Conner
>             Fix For: 4.4
>
>         Attachments: esb-util-cache-src.jar, esb-util-cache.sar, server.rar
>
>
> From forum post :
> We are not using juddi directly, I do not know if it is a core required component of ESB. After a few runs, we are having performance problems that seems to be related to juddi. It happens only on shutdow/startup operations. The time spent to create the auth tokens (sorry, what are they used for anyway??) are taking longer and longer. JBoss takes over 2 minutes (in a 8 processor machine??) just to delete the template bindings for juddi on the shutdown process. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       




More information about the esb-issues mailing list