Topic
  • 15 replies
  • Latest Post - ‏2015-02-03T18:43:03Z by infyrsp
dave_mo
dave_mo
18 Posts

Pinned topic Checking XML cache to see if an XML document exists or not

‏2012-10-02T12:39:07Z |
Does anyone know a way to check the XML cache to see if an xml document exists in cache or not without using SOMA?
Updated on 2012-10-09T18:37:46Z at 2012-10-09T18:37:46Z by swlinn
  • dave_mo
    dave_mo
    18 Posts

    Re: Checking XML cache to see if an XML document exists or not

    ‏2012-10-02T12:55:08Z  
    Also, same question for checking Stylesheet cache for an xsl? Any ideas for checking both caches for a specific cached entry without using SOMA?
  • dave_mo
    dave_mo
    18 Posts

    Re: Checking XML cache to see if an XML document exists or not

    ‏2012-10-02T13:11:25Z  
    • dave_mo
    • ‏2012-10-02T12:55:08Z
    Also, same question for checking Stylesheet cache for an xsl? Any ideas for checking both caches for a specific cached entry without using SOMA?
    Sorry, I should be a bit more descriptive with how I want to check the cache. I'm not referring to using the Web GUI or CLI, I'm only interested in doing it at runtime via a stylesheet. We're planning to use WSRR as a remote repository for certain artifacts, like XML config files, stylesheets, etc that our used by an MPG gateway. The artifacts are retrieved at runtime and used by MPG. The artifacts, once retrieved, will exist in the appropriate Datapower caches and this works quite nicely. What we wanted to do next though is setup an http push notification in WSRR that will publish to DP when an artifact in WSRR changes. I want to receive that http notification, check cache to see if a matching artifact exists in cache and if it does, refresh that artifact in cache so that we pull the newer artifact from WSRR. I realize that I need to use SOMA to do the doc or style sheet refresh, but I wanted to keep my SOMA calls to a minimum at runtime so I'd like to somehow check if an artifact exists in either caches without using SOMA and looping through the results, finding a match, then using SOMA again to refresh. Hoping that makes sense.
  • irazabal
    irazabal
    218 Posts

    Re: Checking XML cache to see if an XML document exists or not

    ‏2012-10-02T13:11:37Z  
    not that I am aware of
  • Liv2luv
    Liv2luv
    573 Posts

    Re: Checking XML cache to see if an XML document exists or not

    ‏2012-10-02T13:50:20Z  
    • dave_mo
    • ‏2012-10-02T13:11:25Z
    Sorry, I should be a bit more descriptive with how I want to check the cache. I'm not referring to using the Web GUI or CLI, I'm only interested in doing it at runtime via a stylesheet. We're planning to use WSRR as a remote repository for certain artifacts, like XML config files, stylesheets, etc that our used by an MPG gateway. The artifacts are retrieved at runtime and used by MPG. The artifacts, once retrieved, will exist in the appropriate Datapower caches and this works quite nicely. What we wanted to do next though is setup an http push notification in WSRR that will publish to DP when an artifact in WSRR changes. I want to receive that http notification, check cache to see if a matching artifact exists in cache and if it does, refresh that artifact in cache so that we pull the newer artifact from WSRR. I realize that I need to use SOMA to do the doc or style sheet refresh, but I wanted to keep my SOMA calls to a minimum at runtime so I'd like to somehow check if an artifact exists in either caches without using SOMA and looping through the results, finding a match, then using SOMA again to refresh. Hoping that makes sense.
    You can list what ALL documents / stylesheets cached at a given instance using:

    xi50[my-domain](config)# show document-status
     
     XML Manager Identifier URL               Expiry
     ----------- ---------- ---               ------
     default        1          local:///xyz/some.xml Tue Oct 2 10:30:17 2012
     default        2          local:///xyz/other.xml Tue Oct 2 10:30:37 2012
     default        3          local:///xyz/data.xml Tue Oct 2 10:30:21 2012
     default        4          local:///xyz/file.xml Tue Oct 2 10:41:49 2012
     
    xi50[my-domain](config)# show stylesheet-status
     xslt-f-M-X://local:///xyz/stylesheets/some.xsl, general output mode
             Manager: default
          Identifier: 108
     Compile Options: XSLT 1.0
              status: ready
        Compile Time: 9 msec
    Refresh Interval: n/a
           Flushable: on
        Last Refresh: Tue Oct  2 08:29:06 2012
    XML hardware acceleration: off
    XML acceleration resources used: 0
    
    Updated on 2014-03-25T02:48:31Z at 2014-03-25T02:48:31Z by iron-man
  • swlinn
    swlinn
    1348 Posts

    Re: Checking XML cache to see if an XML document exists or not

    ‏2012-10-02T14:14:32Z  
    • irazabal
    • ‏2012-10-02T13:11:37Z
    not that I am aware of
    You should be able to use the system status enumeration service variable. In testing this, I may have found a bug in that one of the enumerations is giving me an empty result, but for example ...

    
    <dp:dump-nodes file=
    "'DocumentStatus.xml'" nodes=
    "dp:variable('var://service/system/status/DocumentStatus')"/> <dp:dump-nodes file=
    "'DocumentStatusSimpleIndex.xml'" nodes=
    "dp:variable('var://service/system/status/DocumentStatusSimpleIndex')"/> <dp:dump-nodes file=
    "'StylesheetStatus.xml'" nodes=
    "dp:variable('var://service/system/status/StylesheetStatus')"/> <dp:dump-nodes file=
    "'StylesheetStatusSimpleIndex.xml'" nodes=
    "dp:variable('var://service/system/status/StylesheetStatusSimpleIndex')"/>
    


    The StyleSheetStatus variable is giving the empty result, but the StylesheetStatusSimpleIndex variable is providing valid data, with the only difference being the latter is also providing an index number into the cache. Here's my result in DocumentStatusSimpleIndex.xml (formatted for readability):

    
    <statistics build=
    "214635" timestamp=
    "Tue Oct 2 10:04:11 2012"> <DocumentStatusSimpleIndex> <XMLManager class=
    "XMLManager">DP_Responder_XMLMgr</XMLManager> <ID>41</ID> <URL>local:
    ///DP_Responder_Response.xml</URL> <Expiry>expired</Expiry> </DocumentStatusSimpleIndex> <DocumentStatusSimpleIndex> <XMLManager class=
    "XMLManager">Test-MPGW-XMLMgr</XMLManager> <ID>42</ID> <URL>aaa:
    //Test-MPGW-AAA/Test-MPGW-XMLMgr/qKsclIHO4hTYsS2aTThZqWbjk6c=</URL> <Expiry>expired</Expiry> </DocumentStatusSimpleIndex> <DocumentStatusSimpleIndex> <XMLManager class=
    "XMLManager">Test-MPGW-XMLMgr</XMLManager> <ID>43</ID> <URL>aaa:
    //ForumTest/Test-MPGW-XMLMgr/2E29eOoVaZAMXxB2SMexrBEE9Pg=</URL> <Expiry>expired</Expiry> </DocumentStatusSimpleIndex> <DocumentStatusSimpleIndex> <XMLManager class=
    "XMLManager">Test-MPGW-XMLMgr</XMLManager> <ID>44</ID> <URL>aaa:
    //ForumTest/Test-MPGW-XMLMgr/yO8yOeKL+N+oC39mOerenPoY3vc=</URL> <Expiry>expired</Expiry> </DocumentStatusSimpleIndex> <DocumentStatusSimpleIndex> <XMLManager class=
    "XMLManager">Test-MPGW-XMLMgr</XMLManager> <ID>45</ID> <URL>aaa:
    //Test-MPGW-AAA/Test-MPGW-XMLMgr/g4WjXsWnmb5qPLM5TQi8V2oUW4w=</URL> <Expiry>expired</Expiry> </DocumentStatusSimpleIndex> <DocumentStatusSimpleIndex> <XMLManager class=
    "XMLManager">Test-MPGW-XMLMgr</XMLManager> <ID>46</ID> <URL>store:
    ///AAAInfo.xml</URL> <Expiry>expired</Expiry> </DocumentStatusSimpleIndex> <DocumentStatusSimpleIndex> <XMLManager class=
    "XMLManager">Test-MPGW-XMLMgr</XMLManager> <ID>47</ID> <URL>aaa:
    //ForumTest/Test-MPGW-XMLMgr/GJ962KhQZBXD2ejDwibrp1UaV4U=</URL> <Expiry>expired</Expiry> </DocumentStatusSimpleIndex> <DocumentStatusSimpleIndex> <XMLManager class=
    "XMLManager">Test-MPGW-XMLMgr</XMLManager> <ID>48</ID> <URL>aaa:
    //ForumTest/Test-MPGW-XMLMgr/ALQSeogJ5L3ToHmFH/D+ypRWdR4=</URL> <Expiry>expired</Expiry> </DocumentStatusSimpleIndex> </statistics>
    


    In my case, all my docs are expired, but if they were still valid in the cache you'd have a valid timestamp. You can xpath through these in your code to determine if the file is in the cache or not and if so if it is not expired. The StylesheetStatusSimpleIndex provides similar results:

    
    <statistics build=
    "214635" timestamp=
    "Tue Oct 2 10:04:11 2012 
    "> <StylesheetStatusSimpleIndex> <XMLManager class=
    "XMLManager">default</XMLManager> <ID>7</ID> <OutputMode>general</OutputMode> <URL>xslt-f-M-X:
    //webgui:///msdebug-client.xsl</URL> <CompileOptions>XSLT 1.0</CompileOptions> <Status>ready</Status> <CompileSpeed>6</CompileSpeed> <RefreshInterval>0</RefreshInterval> <Flushable>on</Flushable> <LastRefresh>Thu Jul 26 15:19:56 2012</LastRefresh> <Message /> <Log /> <MemSize>169</MemSize> </StylesheetStatusSimpleIndex> <!-- deleted many nodes in my output 
    
    for brevity --> <StylesheetStatusSimpleIndex> <XMLManager class=
    "XMLManager">Test-MPGW-XMLMgr</XMLManager> <ID>53</ID> <OutputMode>general</OutputMode> <URL>xslt-f-M-X:
    //local:///GetCertDetails.xsl</URL> <CompileOptions>XSLT 1.0</CompileOptions> <Status>ready</Status> <CompileSpeed>1</CompileSpeed> <RefreshInterval>0</RefreshInterval> <Flushable>on</Flushable> <LastRefresh>Tue Sep 25 18:45:03 2012</LastRefresh> <Message /> <Log /> <MemSize>109</MemSize> </StylesheetStatusSimpleIndex> </statistics>
    


    Regards,
    Steve
  • dave_mo
    dave_mo
    18 Posts

    Re: Checking XML cache to see if an XML document exists or not

    ‏2012-10-02T14:18:29Z  
    • Liv2luv
    • ‏2012-10-02T13:50:20Z
    You can list what ALL documents / stylesheets cached at a given instance using:

    <pre class="java dw" data-editor-lang="java" data-pbcklang="java" dir="ltr">xi50[my-domain](config)# show document-status XML Manager Identifier URL Expiry ----------- ---------- --- ------ default 1 local:///xyz/some.xml Tue Oct 2 10:30:17 2012 default 2 local:///xyz/other.xml Tue Oct 2 10:30:37 2012 default 3 local:///xyz/data.xml Tue Oct 2 10:30:21 2012 default 4 local:///xyz/file.xml Tue Oct 2 10:41:49 2012 xi50[my-domain](config)# show stylesheet-status xslt-f-M-X://local:///xyz/stylesheets/some.xsl, general output mode Manager: default Identifier: 108 Compile Options: XSLT 1.0 status: ready Compile Time: 9 msec Refresh Interval: n/a Flushable: on Last Refresh: Tue Oct 2 08:29:06 2012 XML hardware acceleration: off XML acceleration resources used: 0 </pre>
    Thanks for the reply Suresh, but I want to check the status at runtime, not via the CLI or Web GUI. The process will be initiated via an http push notification from WSRR to our http listener gateway on Datapower. I want the gateway to parse the http notification, look for the artifact(s) names in the notification from WSRR, go through the Document and Stylsheet cache and see if there are any artifact name matches, then and only then use SOMA to refresh an artifact in the corresponding cache if a match exists. I know that I can use SOMA to get a list of artifacts in cache, but I really want to keep the SOMA calls to a minimum for a given notification and just use SOMA for the refresh when a match is found.
  • dave_mo
    dave_mo
    18 Posts

    Re: Checking XML cache to see if an XML document exists or not

    ‏2012-10-02T14:26:44Z  
    • swlinn
    • ‏2012-10-02T14:14:32Z
    You should be able to use the system status enumeration service variable. In testing this, I may have found a bug in that one of the enumerations is giving me an empty result, but for example ...

    <pre class="jive-pre"> <dp:dump-nodes file= "'DocumentStatus.xml'" nodes= "dp:variable('var://service/system/status/DocumentStatus')"/> <dp:dump-nodes file= "'DocumentStatusSimpleIndex.xml'" nodes= "dp:variable('var://service/system/status/DocumentStatusSimpleIndex')"/> <dp:dump-nodes file= "'StylesheetStatus.xml'" nodes= "dp:variable('var://service/system/status/StylesheetStatus')"/> <dp:dump-nodes file= "'StylesheetStatusSimpleIndex.xml'" nodes= "dp:variable('var://service/system/status/StylesheetStatusSimpleIndex')"/> </pre>

    The StyleSheetStatus variable is giving the empty result, but the StylesheetStatusSimpleIndex variable is providing valid data, with the only difference being the latter is also providing an index number into the cache. Here's my result in DocumentStatusSimpleIndex.xml (formatted for readability):

    <pre class="jive-pre"> <statistics build= "214635" timestamp= "Tue Oct 2 10:04:11 2012"> <DocumentStatusSimpleIndex> <XMLManager class= "XMLManager">DP_Responder_XMLMgr</XMLManager> <ID>41</ID> <URL>local: ///DP_Responder_Response.xml</URL> <Expiry>expired</Expiry> </DocumentStatusSimpleIndex> <DocumentStatusSimpleIndex> <XMLManager class= "XMLManager">Test-MPGW-XMLMgr</XMLManager> <ID>42</ID> <URL>aaa: //Test-MPGW-AAA/Test-MPGW-XMLMgr/qKsclIHO4hTYsS2aTThZqWbjk6c=</URL> <Expiry>expired</Expiry> </DocumentStatusSimpleIndex> <DocumentStatusSimpleIndex> <XMLManager class= "XMLManager">Test-MPGW-XMLMgr</XMLManager> <ID>43</ID> <URL>aaa: //ForumTest/Test-MPGW-XMLMgr/2E29eOoVaZAMXxB2SMexrBEE9Pg=</URL> <Expiry>expired</Expiry> </DocumentStatusSimpleIndex> <DocumentStatusSimpleIndex> <XMLManager class= "XMLManager">Test-MPGW-XMLMgr</XMLManager> <ID>44</ID> <URL>aaa: //ForumTest/Test-MPGW-XMLMgr/yO8yOeKL+N+oC39mOerenPoY3vc=</URL> <Expiry>expired</Expiry> </DocumentStatusSimpleIndex> <DocumentStatusSimpleIndex> <XMLManager class= "XMLManager">Test-MPGW-XMLMgr</XMLManager> <ID>45</ID> <URL>aaa: //Test-MPGW-AAA/Test-MPGW-XMLMgr/g4WjXsWnmb5qPLM5TQi8V2oUW4w=</URL> <Expiry>expired</Expiry> </DocumentStatusSimpleIndex> <DocumentStatusSimpleIndex> <XMLManager class= "XMLManager">Test-MPGW-XMLMgr</XMLManager> <ID>46</ID> <URL>store: ///AAAInfo.xml</URL> <Expiry>expired</Expiry> </DocumentStatusSimpleIndex> <DocumentStatusSimpleIndex> <XMLManager class= "XMLManager">Test-MPGW-XMLMgr</XMLManager> <ID>47</ID> <URL>aaa: //ForumTest/Test-MPGW-XMLMgr/GJ962KhQZBXD2ejDwibrp1UaV4U=</URL> <Expiry>expired</Expiry> </DocumentStatusSimpleIndex> <DocumentStatusSimpleIndex> <XMLManager class= "XMLManager">Test-MPGW-XMLMgr</XMLManager> <ID>48</ID> <URL>aaa: //ForumTest/Test-MPGW-XMLMgr/ALQSeogJ5L3ToHmFH/D+ypRWdR4=</URL> <Expiry>expired</Expiry> </DocumentStatusSimpleIndex> </statistics> </pre>

    In my case, all my docs are expired, but if they were still valid in the cache you'd have a valid timestamp. You can xpath through these in your code to determine if the file is in the cache or not and if so if it is not expired. The StylesheetStatusSimpleIndex provides similar results:

    <pre class="jive-pre"> <statistics build= "214635" timestamp= "Tue Oct 2 10:04:11 2012 "> <StylesheetStatusSimpleIndex> <XMLManager class= "XMLManager">default</XMLManager> <ID>7</ID> <OutputMode>general</OutputMode> <URL>xslt-f-M-X: //webgui:///msdebug-client.xsl</URL> <CompileOptions>XSLT 1.0</CompileOptions> <Status>ready</Status> <CompileSpeed>6</CompileSpeed> <RefreshInterval>0</RefreshInterval> <Flushable>on</Flushable> <LastRefresh>Thu Jul 26 15:19:56 2012</LastRefresh> <Message /> <Log /> <MemSize>169</MemSize> </StylesheetStatusSimpleIndex> <!-- deleted many nodes in my output for brevity --> <StylesheetStatusSimpleIndex> <XMLManager class= "XMLManager">Test-MPGW-XMLMgr</XMLManager> <ID>53</ID> <OutputMode>general</OutputMode> <URL>xslt-f-M-X: //local:///GetCertDetails.xsl</URL> <CompileOptions>XSLT 1.0</CompileOptions> <Status>ready</Status> <CompileSpeed>1</CompileSpeed> <RefreshInterval>0</RefreshInterval> <Flushable>on</Flushable> <LastRefresh>Tue Sep 25 18:45:03 2012</LastRefresh> <Message /> <Log /> <MemSize>109</MemSize> </StylesheetStatusSimpleIndex> </statistics> </pre>

    Regards,
    Steve
    Steve,

    Thank you for the feedback. I replied to Suresh before I got a chance to see your response. What you proposed should work really nice and was exactly the kind of feedback I was hoping to receive since I couldn't quite visualize it before. The variables should really do the trick. I'll give it a shot and update the thread when I'm done.

    FYI - I'm not actually interested if an artifact is expired, only that I've received a notification from WSRR for a changed artifact and refreshing a matching artifact regardless if its expired or not.

    Thanks again.

    Dave
  • dave_mo
    dave_mo
    18 Posts

    Re: Checking XML cache to see if an XML document exists or not

    ‏2012-10-02T16:41:28Z  
    • dave_mo
    • ‏2012-10-02T14:26:44Z
    Steve,

    Thank you for the feedback. I replied to Suresh before I got a chance to see your response. What you proposed should work really nice and was exactly the kind of feedback I was hoping to receive since I couldn't quite visualize it before. The variables should really do the trick. I'll give it a shot and update the thread when I'm done.

    FYI - I'm not actually interested if an artifact is expired, only that I've received a notification from WSRR for a changed artifact and refreshing a matching artifact regardless if its expired or not.

    Thanks again.

    Dave
    I did a simple test and its just what I needed Steve. Thanks again.

    Are these variables documented anywhere? I didn't see them in the DP info center. Can I assume that any status enumeration listed in the xml-mgmt.xsd is available via a corresponding service var?
  • swlinn
    swlinn
    1348 Posts

    Re: Checking XML cache to see if an XML document exists or not

    ‏2012-10-02T18:26:39Z  
    • dave_mo
    • ‏2012-10-02T16:41:28Z
    I did a simple test and its just what I needed Steve. Thanks again.

    Are these variables documented anywhere? I didn't see them in the DP info center. Can I assume that any status enumeration listed in the xml-mgmt.xsd is available via a corresponding service var?
    Hi Dave,

    These status "enumeration" variables are documented in the InfoCenter at http://pic.dhe.ibm.com/infocenter/wsdatap/v5r0m0/index.jsp?topic=%2Fcom.ibm.dp.doc%2Fvar-service-system-status_reference.html. The specific enumeration values are not documented, but the documentation says "See the StatusEnum type in the store:///xml-mgmt.xsd schema for the list of status providers.", which is how I found the right values to try in my prototype.

    Regards,
    Steve
  • dave_mo
    dave_mo
    18 Posts

    Re: Checking XML cache to see if an XML document exists or not

    ‏2012-10-02T20:03:41Z  
    • swlinn
    • ‏2012-10-02T18:26:39Z
    Hi Dave,

    These status "enumeration" variables are documented in the InfoCenter at http://pic.dhe.ibm.com/infocenter/wsdatap/v5r0m0/index.jsp?topic=%2Fcom.ibm.dp.doc%2Fvar-service-system-status_reference.html. The specific enumeration values are not documented, but the documentation says "See the StatusEnum type in the store:///xml-mgmt.xsd schema for the list of status providers.", which is how I found the right values to try in my prototype.

    Regards,
    Steve
    Thanks Steve. I was searching the infocenter down to the enum value, which is why I didn't get any results. Even while perusing the list of variables, my eye was looking based on the enum value and I completely missed var://service/system/status/. Thankfully it points out that the list of enumerations can be found in the xsd under StatusEnum, so that answers my other question in the prior post.
  • dave_mo
    dave_mo
    18 Posts

    Re: Checking XML cache to see if an XML document exists or not

    ‏2012-10-09T14:01:27Z  
    • dave_mo
    • ‏2012-10-02T20:03:41Z
    Thanks Steve. I was searching the infocenter down to the enum value, which is why I didn't get any results. Even while perusing the list of variables, my eye was looking based on the enum value and I completely missed var://service/system/status/. Thankfully it points out that the list of enumerations can be found in the xsd under StatusEnum, so that answers my other question in the prior post.
    Steve,

    I have 2 questions.

    1. Is there a size limit on DP variables?
    2. If Document Cache is 10mb, would checking for a cached doc (see xslt below) in dp:variable('var://service/system/status/DocumentStatus') at runtime (for each inbound request) have any considerable performance implications for a high volume gateway?

    
    <xsl:variable name="docStatus" select="dp:variable('var://service/system/status/DocumentStatus')"/>
    <xsl:variable name="rootURL" select="'http://127.0.0.1:2000/'"/>
    <xsl:variable name="namespace" select="'namespace'"/>
    <xsl:variable name="extension" select="'.xml'"/>
    <xsl:variable name="resourceInCache" select="concat($rootURL,$namespace,$extension)"/>
    <xsl:variable name="endpointInCache" select="$docStatus/statistics/DocumentStatus/URL=$resourceInCache"/>

    Thanks,
    Dave
  • swlinn
    swlinn
    1348 Posts

    Re: Checking XML cache to see if an XML document exists or not

    ‏2012-10-09T14:49:43Z  
    • dave_mo
    • ‏2012-10-09T14:01:27Z
    Steve,

    I have 2 questions.

    1. Is there a size limit on DP variables?
    2. If Document Cache is 10mb, would checking for a cached doc (see xslt below) in dp:variable('var://service/system/status/DocumentStatus') at runtime (for each inbound request) have any considerable performance implications for a high volume gateway?

    
    <xsl:variable name="docStatus" select="dp:variable('var://service/system/status/DocumentStatus')"/>
    <xsl:variable name="rootURL" select="'http://127.0.0.1:2000/'"/>
    <xsl:variable name="namespace" select="'namespace'"/>
    <xsl:variable name="extension" select="'.xml'"/>
    <xsl:variable name="resourceInCache" select="concat($rootURL,$namespace,$extension)"/>
    <xsl:variable name="endpointInCache" select="$docStatus/statistics/DocumentStatus/URL=$resourceInCache"/>

    Thanks,
    Dave
    Hi Dave,
    This data is not cached in the document cache, but since it is XML you would be bound by the XML parser limitations specified in the XML Manager. This would be true for any content or variable this is parsed as XML. The only way to cache this particular enumeration variable would be to have a side call to a XML FW for example that retrieved this data. Your calling service would cache based on the url of the HTTP GET to this chained service.

    Regards,
    Steve
  • dave_mo
    dave_mo
    18 Posts

    Re: Checking XML cache to see if an XML document exists or not

    ‏2012-10-09T18:01:18Z  
    • swlinn
    • ‏2012-10-09T14:49:43Z
    Hi Dave,
    This data is not cached in the document cache, but since it is XML you would be bound by the XML parser limitations specified in the XML Manager. This would be true for any content or variable this is parsed as XML. The only way to cache this particular enumeration variable would be to have a side call to a XML FW for example that retrieved this data. Your calling service would cache based on the url of the HTTP GET to this chained service.

    Regards,
    Steve
    Hi Steve,

    I certainly do not want to cache the call to get the list of cached artifact names since it would be ever changing and growing. As described earlier, I only wanted to check whether the name of an xml doc was in cache already. As I started to think about it further though, I could see some real benefits in several areas including logging cached hits vs calls to WSRR if I did that check real time and each time I received a service request. I then started thinking about performance and whether checking dp:variable('var://service/system/status/DocumentStatus')/statistics/DocumentStatus/URL=$resource would cause any adverse performance issues if the XML returned by the variable was large due to a huge number of docs in doc cache. Hence the reason for both questions. Obviously, the size of document cache would not equal the size of the xml returned from the variable since the variable does not contain the actual xml of the docs in cache, just a listing of whats in cache and their status. So perhaps, my second question was not very well though out. I always appreciate the responses.

    Thanks,
    Dave
  • swlinn
    swlinn
    1348 Posts

    Re: Checking XML cache to see if an XML document exists or not

    ‏2012-10-09T18:37:46Z  
    • dave_mo
    • ‏2012-10-09T18:01:18Z
    Hi Steve,

    I certainly do not want to cache the call to get the list of cached artifact names since it would be ever changing and growing. As described earlier, I only wanted to check whether the name of an xml doc was in cache already. As I started to think about it further though, I could see some real benefits in several areas including logging cached hits vs calls to WSRR if I did that check real time and each time I received a service request. I then started thinking about performance and whether checking dp:variable('var://service/system/status/DocumentStatus')/statistics/DocumentStatus/URL=$resource would cause any adverse performance issues if the XML returned by the variable was large due to a huge number of docs in doc cache. Hence the reason for both questions. Obviously, the size of document cache would not equal the size of the xml returned from the variable since the variable does not contain the actual xml of the docs in cache, just a listing of whats in cache and their status. So perhaps, my second question was not very well though out. I always appreciate the responses.

    Thanks,
    Dave
    Hi Dave,
    I don't think you will see a performance issue from querying the enumeration variable on a transactional basis. I would need to get some development feedback to confirm my opinion, but if you have an appliance under load (many transactions per second) my assumption would be that the variable content is cached, most probably based on the statistics load interval, which defaults at one second. As for off box calls to WSRR, absolutely this is a use case to use the document cache to minimize the latency of the off box call out. The size of the document cache would need to be large enough to handle some number of documents, and if you don't have enough space in the cache for a new document to be placed in the cache, the doc cache policy will determine the document priority, TTL and perhaps protocol cache times if a fixed policy is not specified, to determine which document in the cache is removed to make room for the new entry.

    Regards,
    Steve
  • infyrsp
    infyrsp
    26 Posts

    Re: Checking XML cache to see if an XML document exists or not

    ‏2015-02-03T18:43:03Z  
    • swlinn
    • ‏2012-10-09T18:37:46Z
    Hi Dave,
    I don't think you will see a performance issue from querying the enumeration variable on a transactional basis. I would need to get some development feedback to confirm my opinion, but if you have an appliance under load (many transactions per second) my assumption would be that the variable content is cached, most probably based on the statistics load interval, which defaults at one second. As for off box calls to WSRR, absolutely this is a use case to use the document cache to minimize the latency of the off box call out. The size of the document cache would need to be large enough to handle some number of documents, and if you don't have enough space in the cache for a new document to be placed in the cache, the doc cache policy will determine the document priority, TTL and perhaps protocol cache times if a fixed policy is not specified, to determine which document in the cache is removed to make room for the new entry.

    Regards,
    Steve

    Hi Dave,

     

    We are also trying to set up something similar?were you able to set this up successfully? Can we make use of WSRR subscription objects for this.

    Can you also advise how we can set up http push notifications in WSRR?