Model Usage |
Purpose |
This usage scenario describes how to use the metadata types that represent software deployment information. Software deployment information includes information about how to run and access installed software and the resources (files and data) that the software can access. An XML representation is included to show how to create software deployment objects and their associations.
Requirements |
This usage scenario assumes that the user has a general understanding of the Property Submodel and Software Deployment Submodel of the SAS Metadata Model.
Software Deployment Submodel Metadata Types |
This usage scenario describes the metadata objects that are used to represent a SAS/SHARE server, the information used by a JDBC driver to access the SAS/SHARE server, and a SAS library named Sales Information. Figure 1 shows the metadata types and their associations.
Figure 1. The metadata objects for the SAS/SHARE server, libraries, connections, and their associations.
The ServerComponent object represents a configured instance of an installed and runnable component that has been deployed. The ServerComponent metadata type contains attributes that describe the software, such as ProductName=, Platform=, Vendor=, and SoftwareVersion=. ServerComponent can be associated with a Transformation object with the InitInfo association (not shown). The Transformation object contains associations to other objects that provide information for the start-up process, log files, or any other information needed to start the server. Here, ServerComponent is associated with a Machine object that represents where this server is configured. The association is named AssociatedMachine (numbered 4 in Figure 1). The DeployedDataPackage association (numbered 2) points to data packages that are available to the server, and can include directories, schemas, and libraries. In this scenario, the DeployedDataPackage association references a SASLibrary object.
ServerComponent is associated with connection information with a SourceConnections association (numbered 1). The SAS Metadata Model has very few metadata types to represent connections. These include Connection, COMConnection, TCPIPConnection, and SASClientConnection. Connection is an abstract metadata type, from which the other metadata types inherit common properties. Connection describes how software components communicate with this object, or how this object communicates with other software components. The Properties association (numbered 3) is supported to provide additional information for specific connection types. A SAS/SHARE JDBC connection is described by the SASClientConnection metadata type. Additional properties that would be stored with this object include the server name, physical name, libref, and encryption algorithm key size. The SAS Management Console client uses prototypes (see Usage Scenario: Creating a Prototype) to indicate which properties are appropriate when creating connections.
The metadata objects in Figure 1 can be created by using the following XML request:
<AddMetadata> <Metadata> <ServerComponent Name="SAS/SHARE server on mymachine.com"> <AssociatedMachine> <Machine Name="mymachine.com"/> </AssociatedMachine> <SourceConnections> <SASClientConnection Name="SAS/SHARE JDBC Connection" ApplicationProtocol="SHARE" CommunicationProtocol= "TCP" Port="5010" RemoteAddress="d1234.na.sas.com"> <Properties> <Property Name="Server Name" PropertyName="ServerName" DefaultValue="sdfsd" SQLType="12"/> </Properties> </SourceConnections> <Properties> <Property Name="Encryption Algorithm Key Size" PropertyName="EncryptionKeySize" DefaultValue="0"> <OwningType> <PropertyType Objref="$EncKey"/> </OwningType> </Property> </Properties> <DataPackages> <SASLibrary ObjRef="ABCDEFGH.A7000001"/> </DataPackages> </ServerComponent> <PropertyType Id="$EncKey" Name="EncryptionKeySizes" SQLType="12" <StoredConfiguration> <TextStore Name="Enumeration of Encryption Key Sizes" TextRole="config" TextType="xml" StoredText="<Configuration> <Enumeration> <Value name="0"/> <Value name="40"/> <Value name="128"/> </Enumeration> </Configuration>" /> </StoredConfiguration> </PropertyType> </Metadata> <Reposid>A0000001.ABCDEFGH</Reposid> <NS>SAS</NS> <Flags>268435456</Flags> <Options /> </AddMetadata>
ServerComponent is the first object created. AssociatedMachine defines and creates the association from ServerComponent to the Machine object. SourceConnections defines and creates the association from ServerComponent to the SASClientConnection object. SASClientConnection describes how to access this server.
Connection objects have protocol attributes. For example, the information required for a DCOM connection is different from the information required for a CORBA connection. The CommunicationProtocol= attribute describes the network protocol used to access the server, such as TCP or APPC. The ApplicationProtocol= attribute describes the application-level protocol used by the application to communicate with the server. For example, the application protocol could be DCOM, CORBA, HTTP, RMI, Telnet, or, in this case, a proprietary protocol SHARE. For TCPIP communication, a value is required for the RemoteAddress= attribute, in addition to the port or service used by the server. For a SAS/SHARE JDBC connection, more information is needed. This information is stored in Property objects and associated with the Properties association. SASClientConnection has an associated Property object for storing the server name. This Property object has a SQLType= attribute value of 12, which means the property is a string. The encryption algorithm key size Property that is associated with the ServerComponent object has an enumerated list of possible values. A PropertyType object is created to describe the enumeration requirement. The possible values for the enumeration are stored in a TextStore object that is associated to the PropertyType object with the StoredConfiguration association.
The SASClientConnection object contains information about how to access a SAS/SHARE server from a Java client or other client that is not SAS. For example, the SAS/SHARE Driver for JDBC could use the information in this object to create the URL used to connect to the server. To find available SAS/SHARE servers, the JDBC application could search the SAS Metadata Server for SASClientConnection objects that have the ApplicationProtocol= attribute set to Share. These SASClientConnection objects would provide connection information for the SAS/SHARE servers registered in the SAS Metadata Server.
ServerComponent can also have Connection objects that are associated with the ProviderConnections association. These Connection objects are used by the ServerComponent to access other components. If the JDBC application was registered in the SAS Metadata Server as a ServerComponent, its ProviderConnections association could contain the TCPIPConnection objects it uses to access the server.
ServerComponent can have Connection objects in both lists. For example, Server 1 can forward a request to Server 2. Server 1 would have a Connection object in a SourceConnections association that describes how to connect to itself. The Server 1 ProviderConnections association would contain the Connection object that describes how to connect to Server 2.
The other association to ServerComponent in this example is DeployedDataPackage (numbered 2). In this XML example, the SASLibrary object has already been created, so the XML contains a reference to the existing object using the ObjRef= attribute.
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.