HP Asset Manager Managing Scalability of Web services Legal Notices... 2 Introduction... 3 Objective of this document... 3 Prerequisites... 3 General Approach... 4 Context... 4 Process... 4 Comments... 5 Java Example... 6 Modified Sample description... 6 For more information... 7
Legal Notices Copyright 1994-2008 Hewlett-Packard Development Company, L.P. Confidential computer software. Valid license from HP required for possession, use or copying. Consistent with FAR 12.211 and 12.212, Commercial Computer Software, Computer Software Documentation, and Technical Data for Commercial Items are licensed to the U.S. Government under vendor's standard commercial license. The only warranties for HP products and services are set forth in the express warranty statements accompanying such products and services. Nothing herein should be construed as constituting an additional warranty. HP shall not be liable for technical or editorial errors or omissions contained herein. The information contained herein is subject to change without notice. Adobe, Adobe logo, Acrobat and Acrobat Logo are trademarks of Adobe Systems Incorporated. Corel and Corel logo are trademarks or registered trademarks of Corel Corporation or Corel Corporation Limited. Java is a US trademark of Sun Microsystems, Inc. Microsoft, Windows, Windows NT, Windows XP, Windows Mobile and Windows Vista are U.S. registered trademarks of Microsoft Corporation. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. UNIX is a registered trademark of The Open Group.
Introduction Objective of this document The goal of this document is to explain how to efficiently handle Asset Manager (AM) Web Services (WS) when you call them from an external application. Asset Manager Web Services were designed to provide powerful integration capabilities to external applications. Consequently, almost any AM information is available through this SOAP-based interface. Given the richness of the AM model, this can lead to a huge volume of information being exposed. Thus the scalability must be carefully handled, especially at development time. Therefore, the implementer must start with a first important step defining precisely the right scope of what should be exposed. The document will first describe the general approach to prevent AM WS scalability issues. Then, this approach will be illustrated with a sample provided as part of standard AM distribution using Java programming language. The same will apply to.net environment if necessary. Prerequisites The prerequisites for the platform needed to perform the process described in this white paper are: Asset Manager installed and working (version 5.11 was used below) AM Web Services deployed as documented in AM Installation Guide. Typically, you should be able to browse the different services using an URL like http://hostname:8080/assetmanagerwebservice/ A Java and/or.net environment setup as described in the readme files provided with the samples
General Approach Context The client application needs to consume AM Web Services: stub classes are required for this consumption. Producing those stubs is typically a time and system resource consuming activity. With an inadequate platform the generation process could either take several hours or crash before completion due to resource exhaustion. In addition, if the generation worked, associated information like the WSDL can be so huge that tools could have problems using it. Typically, Internet Explorer or client applications could fail in loading and parsing the resulting WSDL information. The guidelines provided below make the assumption you need to consume a well defined and quite limited subset of the available AM information. This is a mandatory prerequisite to make profit of the procedure. Process Here are the steps you need to correctly manage AM Web Service generation scalability: 1) Identify the tables (and optionally fields) that you need to expose. In this process, only consider the minimal required subset of information: this is the most important way to avoid issues at a later stage. For simplification purposes, we will expose all the fields of a given table in the rest of this document. 2) Define a new Functional Domain. You can choose any name as long as it does not collide with an existing functional domain. Make sure this name accurately qualifies the AM information you will expose. As Asset Manager manages Web Services versions for you (tag system), you should not insert version information in this name. For example, ABCProcurement, where ABC is the name of the consuming application, is a correct name for the functional domain. To do this, you need to: a) Start the AM Client e.g. on Windows XP: Start->All Programs->HP->Asset Manager 5.11 en->client b) Provide your credentials (it is assumed below that you can access to the Administration capabilities) c) Open the Functional Domain screen: Administration > Functional Domains d) Click on New e) Enter a functional domain name f) Make sure that the WebService: standalone attribute value is selected g) Click on Create
3) Define AM Screens (and Pages if needed) that describe the information you need to expose. This is done in the AM Application Designer. a) Start the AM Application Designer e.g. on Windows XP: Start > All Programs > HP > Asset Manager 5.11 en > Application Designer b) Connect to your database (you need administrator rights again) c) Switch to Screens view View > Screens d) For each of the needed tables, duplicate the most complete screen (e.g. full screenset). Make sure that the value for the functional domain of the duplicated screen is the one you created above. Identically, set the screen-set of the duplicated screen to the same value as the functional domain. Save your database: File > Update database structure 4) Using a web browser, you should see a new AM service exposed. E.g. http://hostname:8080/assetmanagerwebservice/ Comments When developing our own application, follow the best practices and recommendations described in the Programmer s Reference and Tailoring Guide documents (e.g. do not use HEAD version directly, how to tag web services ) As defining functional domains has various implications, you should limit as much as possible the number of new functional domains you define.
Java Example The selected example is part of the standard AM distribution and is named CoreServiceSample. It can be found at the following location: \HP\Asset Manager 5.11 en\samples\ws\java\coreservicesample The standard version does not apply the process described above and will take about 1 hour to compile (the associated process taking most of the available CPU during this time) on a 2.8 Gigahertz Xeon CPU-based system with 3Gb RAM. In addition, the ANT JVM process can take up to 1.2 Gigabyte of memory and 1.6 Gigabyte of VM Size We will describe below how this sample can be improved. Modified Sample description Following the general approach above, we will implement the steps defined earlier (more explanations for those 4 steps are given in the section above): 1) The tables and fields that need to be considered are listed in the source file. As you will see, the main tables used are amempldept and amlocation (this last one is barely used). We will consider those two previous tables with all their fields. 2) Define a new Functional Domain: it will be called CoreServiceSample. 3) Define two AM Screens that describe the information you need to expose. To do this, existing screens will be duplicated. Those screens need to be associated to the new functional domain CoreServiceSample. Set SQL name, label and description to the same values as for the initially duplicated screen (e.g. SQL name = amlocation ). Save your database and open it again right after to verify your screens have been properly taken into account. 4) Using a web browser, you should see a new AM service exposed (CoreServiceSample). E.g. http://hostname:8080/assetmanagerwebservice/ As a result, the produced WSDL is reduced from 3Mb to 250Kb. The build of the sample will take 22 minutes and the ANT JVM process memory will grow up to 800 Megabyte and 1 Gigabyte of Virtual Memory. No difference was visible in the output of the program (diff was run against the original version output).
For more information Please visit the HP Software support Web site at: http://www.hp.com/managementsoftware/support This web site provides contact information and details about the products, services, and support that HP Software offers. HP Software online support provides customer self-solve capabilities. It provides a fast and efficient way to access interactive technical support tools needed to manage your business. As a valuable support customer, you can benefit by being able to: Search for knowledge documents of interest Submit and track progress on support cases Submit enhancement requests online Download software patches Manage a support contract Look up HP support contacts Review information about available services Enter discussions with other software customers Research and register for software training Note: Most of the support areas require that you register as an HP Passport user and sign in. Many also require an active support contract. To find more information about support access levels, go to the following URL: http://www.hp.com/managementsoftware/access_level To register for an HP Passport ID, go to the following URL: http://www.managementsoftware.hp.com/passport-registration.html Limited responsibility clause Asset Manager is integrated with several third-party applications. Examples: Database engines, Web servers, single sign-on software, load-balancing and clustering hardware and software solutions, reporting software such as Crystal Reports, etc. Support for these applications is limited to their interface with Asset Manager. Support does not cover installation problems, setup and customization problems nor malfunctioning of the thirdparty application. White papers contain examples of implementations that may work in your environment with or without customization. There is no guarantee that this will be the case. It could also be that some of the solutions covered by white papers appear as standard features in a future release of the software. When this is the case, there is no guarantee that you will be able to upgrade the solution you implemented based on the white paper to the equivalent standard feature. 2008 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. The only warranties for HP products and services are set forth in the express warranty statements accompanying such products and services. Nothing herein should be construed as constituting an additional warranty. HP shall not be liable for technical or editorial errors or omissions contained herein. Itanium is a trademark or registered trademark of Intel Corporation in the U.S. and other countries and is used under license. Managing scalability of AM Web services.doc