Menu

Soa versioning strategy

5 Comments

soa versioning strategy

Keep me signed in. By clicking Submityou agree to the developerWorks terms of use. The first time you sign into developerWorks, a profile is created for you. You may update your IBM account at any time. The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks. Please choose a display name between characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons. API versioning is a common problem in the design of any distributed system, and Web services are unfortunately no exception. In this article, Kyle Brown and Michael Ellis will outline the scope of the versioning difficulties facing Web services developers, provide some template solutions, and discuss architectures and best practices for addressing the problem. Intermediate Also available in: The correct handling of API versioning has versioning one of the most difficult issues faced by developers of distributed systems. Various schemes have been proposed, ranging from the laissez faire approach taken by CORBA to the stricter schemes used in DCOM. With the advent of Web services, there are some versioning features that you can take advantage of that can help alleviate the problem, but the brutal fact of the matter is that versioning has not been built into the Web services architecture. Current products from IBM and other vendors do not directly address the versioning issue, requiring developers to solve the problem through the application of patterns and best practices. Understanding the Web services API versioning problem is easy. Imagine that we have a simple WSDL document that contains a WSDL operation defined using the fragment in Listing 1. This operation is derived from an example in the WSDL specification -- see Resources. Now, let's say that you have deployed this Web service and that a number of requestors have been written using it. However, in a code review, you discover that floats are perhaps not the best data type for representing dollar values. You find that cumulative rounding errors have been causing upstream problems due to the way that trade prices are calculated on the system. As a result, the dollar values returned have sometimes been incorrect. So, you need to change the data type from a float to an integer, where it is understood that the integer value is a price in cents. You can strategy this change versioning as little as one alteration to the schema, as strategy in Listing However, now you are faced with a new problem. What will happen when all of the existing requestors that are expecting floats receive integers instead? This is the worst example of a subtle type of problem -- the XML that is output in the SOAP envelope may very well continue to be processed by the requestors, even though the answers that they are receiving are clearly not the answers they are expecting. In this case, they are receiving answers that are times larger than they would expect and have no decimal portion. The problem is that there is nothing explicit in the Web services definition that is, in the WSDL that will convey this difference to the requestor. If a developer makes the change above, the older requestors would fail, and the failure would be undetectable to the Web services infrastructure. You need to be able to carefully delineate the kinds of changes in a WSDL document that will not break existing requestors, as strategy as the kinds of changes that will. You also need a mechanism to ensure that, when the WSDL changes so much that it can break an existing requestor, there is no possibility of an older requestor calling the changed Web service. Roughly speaking, there are two types of changes in a WSDL document soa cannot soa an existing requestor, and several types of changes that can. In accordance with standard industry nomenclature, we will call these backwards-compatible and non-backwards-compatible changes, respectively. The types of changes that are backwards compatible are:. However, there are a host of other change types that are not strategy. So, in a broad sense, you can use two different strategies for handling the different types of changes that can occur. For backwards-compatible changes, the WSDL document can simply be updated in the repository from which it is made available to requestors, and the existing Web service may be updated. We would recommend that every new edition of a Strategy document be stored in a version-control system, and that XML soa be used to indicate unique version IDs or a version history. However, this is purely for the convenience of the Web service provider, and is not required by the versioning of the Web service requestors. For non-backwards-compatible changes, you need to take another approach. To solve this problem, begin by using XML namespaces to clearly delineate the versions of a document that are compatible. The mechanism by which this is done depends on whether the SOAP binding is done using the literal- or SOAP-encoded use style in WSDL. In literal encoding, the namespace is specified in the definition soa the messages as part of the XML schema namespace definitions; in SOAP encoding, it can strategy specified within the SOAP binding element. Regardless of the mechanism chosen, a specific namespace value is sent along with every SOAP message and result. This allows a Web service implementation to correctly determine what to do with an incoming message, based on the namespace value. So, if non-backwards-compatible changes need to be made to a WSDL document, then your first step is to ensure that the namespace for the XML elements resulting from that document is unique. To ensure that the various editions of a WSDL document are unique, we would recommend a simple naming scheme that appends a date or version stamp to the end of a namespace definition. This follows the general guidelines given by the W3C for XML strategy definitions. So, assuming that you are using a literal use parameter, your XML type definitions in the sample WSDL that we have been discussing might look something like the following:. The naming convention that this example uses is based on the standard convention followed by the W3C in identifying schemas. It consists of the company name, followed by a date stamp, followed by one or soa identifiers that semantically and specifically denote the particular namespace. We are proposing a departure from the most common approach here: So, once you have strategy the decision to change the namespace, you have to determine what to do with old requestors. One option is to generate a failure on the server end if a request for an older namespace is received. Another common option for dealing with this problem is to employ a Web service intermediary a router, for instance that determines what to soa with Web service requests that come in for any particular namespace. The router could examine the date stamp on the namespace and then route requests from the older namespace to an older version of the Web service, while routing requests from the newer namespace to the new version of the Web service. There are downsides to this approach, however. For one thing, you would have to implement the router intermediary though there are commercial products, like TalkingBlocks, that can do this. Perhaps more importantly, however, you would have to deploy each Web service twice, at least for the transitional period until all of the older requestors have moved over to the new WSDL. It can be argued that, when the interface to a soa changes in a non-backwards-compatible way, in reality an entirely new service has been created. In such a case, unless implementations of the first interface continue to exist, the preexisting service is, in effect, discontinued. From the client's perspective, a service is no more than an interface and some non-functional qualities such as trust and QoS attributes that it may claim to exhibit; thus, if the interface to a service changes in a non-backwards-compatible way, it no longer represents an instance of the original service, but is rather a completely new service. From this point of view, an interface version is always backwards-compatible with the preexisting interface. This can mean either that operations are added while all prior operations are maintained, or that existing operation signatures are changed in a manner that is compatible with the original interface opportunities for such changes are limited. Further, it is reasonable to expect that earlier versions of a service are versioning forward-compatible with later versions. Therefore, if a service interface is changed in a manner that is not backwards-compatible, it is not a version of the earlier service; it is a new service. As we've already suggested, identifying each service interface with a unique namespace provides a means to keep them distinct. Since backwards-compatibility is a requirement for each version, a means to distinguish between earlier and later versions of the soa interface is also required. To understand the best way to express a version, an understanding of the binding mechanism is necessary; more on this in a moment. Our second question, "Is the distinction between different interface versions and completely distinct interfaces an important one? Accepting this view of services leads to another question. What approach should be used to bind a client to a service such that the service can be versioned without breaking the binding? It stands to reason that, in order to ease the versioning of a service, you must eliminate all client-side coupling versioning volatile aspects of the interface. The aspects that may change are:. The service endpoint may change at any time to suit the deployment needs of the service provider. In general, a binding mechanism should not assume a static endpoint. At this point, important features of a binding approach are starting to take shape. A flexible binding approach versioning. There is a growing set of best practices associated with using UDDI and WSDL in combination. They revolve around the need to publish standard Web service interfaces such that services can advertise compliance and compatibility with those standards. At present, the best practices are specific to a single version of an interface and do not promote a best practice for service versioning. However, the UDDI data model is rich enough that the current best practices can be enhanced to include service versioning. The current best practices are based on the prerequisite that a given version of a wsdl: Clients of that portType version can do a green pages search of UDDI a simple unique key search for services that advertise compliance by associating themselves with that tModel. This relationship is depicted Figure 1based on UDDI version 2. Under the current best practice, the result of such a search would not include compatible services with later interface versions, since the best practice use case implies an exact match with a tModelKey and the best practice requires that different interfaces have different tModel s. UDDI versioning approach 1: Advertise compliance with several interfaces. However, there is nothing in the best practice or the data model that restricts the number of interfaces that a given service may advertise. In keeping with the best practice, a service that is compatible with both an earlier and a later version of an interface can reference the tModel for each in its tModelInstanceDetails collection. UDDI versioning approach 2: Introduce a version number to qualify the interface tModel. According to best practices, UDDI bindingTemplates use structures called tModelInstanceInfo s to make reference to standard interface tModel s. To quote the UDDI spec, "This element can be used when tModel reference-specific settings or other descriptive information are required to either describe a tModel -specific component of a service description or support services that require additional technical data support. By introducing a version number in the instanceDetails and altering green page searches to include consideration for the version of the interface, green page queries become version aware. However, a version number on its own is not enough. The current UDDI best practice associates the interface WSDL with the interface tModel under the assumption that all services declaring compliance will share a common WSDL definition. Versioned service interfaces do not share a common definition, so that assumption is not valid in the context of interface versioning. What we are looking for is a way to decouple the WSDL from the service tModel and associate it with the interface version number. The required association can be accomplished by setting the overviewDoc URL value in the instanceDetails structure mentioned previously to the location of the interface WSDL. The version number and WSDL URL can be viewed as link attributes for the reference between a bindingTemplate and a standard tModel. These two alterations to the current best practice provide the necessary means to accomplish interface versioning in UDDI. In most cases, you should use the first approach. There are a number of problems associated with the second approach:. From a performance standpoint, the first approach supports version-compatible searches using nothing more than a tModel key; the second requires that a query analyze several UDDI structures, a process which is likely to slow that query. In this article, we've examined some of the most common techniques for dealing with service versioning problems in Web services. The approach you choose will depend on a number of factors, but there are enough options that you can find an effective solution to most problems. In particular, we've examined the use of unique version namespaces, as well as the use of version numbers in UDDI, to alleviate the problem. You can use the pros and cons we've listed here to determine the technique that will work best in your environment. The authors would like to thank Dmitry Tyomkin, Boris Lublinsky and the rest of the group at CNA for their help in developing the best practices that went into this article. Kyle Brown is a senior technical staff member with IBM Software Services for WebSphere. Kyle provides consulting services, education, and mentoring on object-oriented topics and Java 2 Platform, Enterprise Edition J2EE technologies to Fortune clients. He is co-author of Enterprise Java Programming with IBM WebSphere, WebSphere 4. He is also a frequent conference speaker on enterprise Java technology, object-oriented design, and design patterns. You can reach him at brownkyl us. Michael Ellis is a solution architect on the IBM Software Services for WebSphere team and lives in Ottawa, Canada. He specializes in Web services, XML, J2EE technology, and object-oriented architecture and design. You can contact him at msellis ca. Need an IBM ID? Forgot your IBM ID? Your display name accompanies the content you post on developerWorks. Must be between 3 — 31 characters. Rational Tester for SOA Quality is an automated web services testing and SOA testing tool that supports Web services SOAP, HTTP SJMS, WS-Security, UDDI, and RESTful standards. A complete, hosted development environment now available for public and private projects. Skip to main content. Sign in or register English [userid] IBM. All information submitted is secure. My home My profile My communities Settings. Product information Redbooks Software Software services. Technical topics Evaluation software Community Events Search developerWorks. Technical topics AIX and UNIX Big data Business analytics Business process management Cloud computing. Commerce DevOps IBM i Information management Java technology. Linux Lotus collaboration Mobile development Open source Rational. Security Tivoli service management Web development WebSphere. Technical library Products A to Z. Evaluation software Big data Business analytics Information management Lotus collaboration Rational. Security Tivoli service management WebSphere More IBM products Mobile, PureSystems Versioning My home Profiles Communities. Activities Podcasts IBM Champion program. Events Webcasts Find events webcasts, conferences Best practices for Web services versioning Keep your Web services current with WSDL and UDDI. Kyle Brown brownkyl us. Michael Ellis msellis ca. You can implement this change with as little as one alteration to the schema, as shown in Listing 2: Report abuse help Report abuse. This entry has been flagged for moderator attention. Report abuse submission failed. Please try again later. Change your password Keep me signed in. Choose your display name. Table of contents Understanding change types Service versioning vs. Next steps from IBM Rational Tester for SOA Quality is an automated web services testing and SOA testing tool that supports Web services SOAP, HTTP SJMS, WS-Security, UDDI, and RESTful standards. Dig deeper into SOA and Web services on developerWorks Overview New to SOA and Web services Downloads and products Open source projects Standards Technical library articles, tutorials, and more Forums Events. Develop software in the cloud at JazzHub. Print this page Share this page Follow developerWorks. About Help Contact us Submit content. Report abuse Terms of use Third party notice IBM privacy IBM accessibility. Faculty Students Business Partners.

Versioning Strategy

Versioning Strategy

5 thoughts on “Soa versioning strategy”

  1. adambereg says:

    Among other functions, the institutes were to provide course modules and learning technologies, and facilitate distance learning administration.

  2. akarad says:

    Academically standing this university is challenging but they offer assistance for any student who finds the material difficult.

  3. agexiaTex says:

    Acceptance of both oneself and the world around them are essential to maturity.

  4. anekdotik.at.ua says:

    I was terrified that she would tell my mother but my anger would not let me show the fear.

  5. alpha.h says:

    Well, to start off I would like to say that G.O.S.P.E.L. is an acronym for GOD-OUR-SINS-PAYING-EVERYONE-LIFE.

Leave a Reply

Your email address will not be published. Required fields are marked *

inserted by FC2 system