{"id":242,"date":"2007-08-10T16:08:00","date_gmt":"2007-08-10T21:08:00","guid":{"rendered":"http:\/\/www.biske.com\/blog\/?p=242"},"modified":"2007-08-11T08:06:45","modified_gmt":"2007-08-11T13:06:45","slug":"revisiting-service-versioning","status":"publish","type":"post","link":"http:\/\/www.biske.com\/blog\/?p=242","title":{"rendered":"Revisiting Service Versioning"},"content":{"rendered":"<p>A fellow member of the <a href=\"http:\/\/www.soa-consortium.org\/\">SOA Consortium<\/a>, Surekha Durvasula, EA Manager for Kohl&#8217;s, recently <a href=\"http:\/\/blogs.soa-consortium.org\/soa_consortium_insights\/2007\/08\/soa-practitione.html\">posted her perspective on service versioning<\/a> on the SOA Consortium&#8217;s blog.  At the end, she asked five questions, to which I thought I&#8217;d respond.<\/p>\n<ol>\n<li><i>How many versions of a service should be &#8220;live&#8221; at any given time?  How many versions are too many?<\/i><br \/>I&#8217;ve actually blogged on this one, so make sure you <a href=\"http:\/\/www.biske.com\/blog\/?p=144\">read this entry<\/a> before reading the rest of my answer.  I&#8217;ve yet to see this put into practice, however, for two reasons.  First, many organizations are still focused on getting version one out the door, so the pressure isn&#8217;t on to solve this problem.  Second, organizations are still learning how to manage the service consumer and service provider relationship. The approach I outline requires significant maturity in managing consumers and product lifecycles.  In the typical project-based culture in IT, this level of maturity is hard to find.  In the absence of maturity, I typically see an arbitrary number set (usually 3).  Setting a limit certainly recognizes that versioning must be dealt with, but only time will tell whether that number is right or not.<\/li>\n<li><i>Do you use the service mediation layer to achieve backward compatibility?<\/i><br \/>I&#8217;ve certainly advised companies that this can be done, but again, haven&#8217;t seen it put into practice yet.  If we have a policy that says two or more versions must be able to co-exist in production, that implies that we have the ability to route to either of them.  If we can do this, there shouldn&#8217;t be a need to leverage a mediation layer unless some consumer can&#8217;t change in time.  This is why I think lots of companies are picking 3 as the &#8220;right&#8221; number of versions to support.  It assumes that when version 2 comes out, consumers should be able to move to v2 by the time v3 is ready.  If you choose to only have one version running in production (the latest), and leverage the mediation layer, you may eventually run into a type of change that isn&#8217;t easily mediated at which point you need to fall back to having multiple versions running at once.  Knowing this, I&#8217;d make sure I knew how to run multiple versions at the same time first, and then try to leverage mediation where it makes sense.<\/li>\n<li><i>Where do you determine the service version &#8211; the mediation layer, the service consumer, or a service provider?<\/i><br \/>Let&#8217;s handle the easy one.  If you handle it at the service consumer side, you&#8217;re effectively saying that consumers must explicitly specify a version somehow.  If this is the case, versioning effectively goes away, the explicit specification would treat a different version as if it were a different service.  You could certain leverage a mediation layer and apply some transformations to send a V1 request to V2, but eventually you won&#8217;t be able to mediate for backward compatibility.  If the version desired is not explicit, now we have to handle it through a mediation layer or at the service provider.  My personal preference is to leverage the mediation layer for this routing.  Otherwise, your service implementation will now be littered with logic to determine what version the request represents, map that to the appropriate implementation, etc.  I just don&#8217;t think that belongs in code.  That belongs in a policy repository.  If you externalize this, the service developer can just focus on building services.<\/li>\n<li><i>Do you have governance models and policies around transitioning existing consumers to new versions?  Who is responsible for executing that transition?<\/i><br \/>Again, I&#8217;ve yet to personally see this in practice from an SOA standpoint.  I have seen it put into practice from a shared infrastructure standpoint, however, such as rolling out a new version of an app server.  Governance is critical.  When the governance processes did not allow appropriate priority for these versioning efforts, it was a nightmare.  It&#8217;s not just about funding for the upgrade, but it&#8217;s also about funding the impacted consumers and ensuring they have the resources to do their part.  Second, the service provider must make it a consumer-friendly process as possible.  Before that new version is ever put into production, the service team should have figured out exactly how their consumers will be impacted.  In the infrastructure example, the team responsible for the app server worked with every single application hosted on the platform to make the process as painless as possible.  They presented this approach when they requested funding for the effort, and the IT governance process made sure the impacted teams were onboard before it was approved.  As a result, it went very, very smoothly.  Planning these upgrades is tricky however, as unless things are properly coordinated and bundled, the entire IT project portfolio can get bogged on with independent versioning efforts.  There does need to be some master planning over the whole portfolio.<\/li>\n<li><i>What is the most graceful way of &#8220;retiring&#8221; or &#8220;decommissioning&#8221; a service?<\/i><br \/>If you&#8217;ve tackled the first question of how many versions, this shouldn&#8217;t be an issue.  If you&#8217;re enforcing your policy, all consumers of V1 will have migrated to V2 or V3 before V4 goes in.  V4 goes live, V1 is shut down.  Of course, this is where management must come into play.  Whether you perform authorization or not, all service requests must have identity attached to them.  If you don&#8217;t, you&#8217;ll never know whether all the known consumers have migrated.  There shouldn&#8217;t be any unknown consumers, and if there are, some process wasn&#8217;t followed long before this decommissioning effort.  In addition to identity, you also need to know the usage profile.  I had one consumer of a service that was only run once a quarter, as it was part of quarterly financial processing.  If I relied on daily usage counts of 0 to judge when to decommission, this could be devastating for a consumer that is run once every 90 days.<\/li>\n<\/ol>\n<p>I look forward to the day where these conversations are applicable to the mainstream.  Clearly, there are thought leaders and some companies that are already facing these issues.  The majority will be following in the future, so now is the time to start thinking about this.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A fellow member of the SOA Consortium, Surekha Durvasula, EA Manager for Kohl&#8217;s, recently posted her perspective on service versioning on the SOA Consortium&#8217;s blog. At the end, she asked five questions, to which I thought I&#8217;d respond. How many versions of a service should be &#8220;live&#8221; at any given time? How many versions are [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[6,1],"tags":[],"class_list":["post-242","post","type-post","status-publish","format-standard","hentry","category-governance","category-soa"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"http:\/\/www.biske.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/242","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.biske.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.biske.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.biske.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.biske.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=242"}],"version-history":[{"count":0,"href":"http:\/\/www.biske.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/242\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.biske.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=242"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.biske.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=242"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.biske.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=242"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}