2 Replies Latest reply on Dec 11, 2009 10:07 AM by Gary Brown

    Revisit versioning strategy

    Heiko Braun Master

      While working on https://jira.jboss.org/jira/browse/RIFTSAW-125 I've realized that we have a general problem with process versioning:

      ODE itself doesn't deal with versioning, apart from making sure that only one process is active at a time: http://ode.apache.org/user-guide.html#UserGuide-ProcessVersioninginOde


      Riftsaw currently uses a separate deployment artifact for each version,
      which exposes this problem:


      There's still a last question left unsolved: what happens if you take your bundle and deploy it under a different name with the same content. If you know a bit about source version control (like CVS or Subversion), that's very close to branching, only you might be executing two branches at the same time. <b>As Ode can't find another bundle with the same, the processes will simply be deployed without retiring anything.</b> You will effectively have twice the same process deployed under different versions. In that scenario you're supposed to know what you're doing.


      1.) What happens to the WS endpoint?
      When ODE deploys a process, it identifies the service and port that should be exposed. What happens is that for each service it calls deactivateEndpoint() followed by activateEndpoint().
      So, in the current versioning approach (same service in two different artifacts) one gets deactivated and the second one get's activated. That's basically correct apart from:


      The previous version remains active (see quote above).
      And it will be visible in the console


      2.) What happens if I remove the artifact of a previous version?
      In the example mentioned above, I would deploy helloworld-1.jar and helloworld-2.jar. Both containing a reference to the same WS endpoint (service+port). No problem, the procedure decribed in 1) kicks in, helloworld-1 will be deactivated and helloworld-2 activated. Fine. But if I now go and delete helloworld-1.jar, ODE will invoke deactivateEndpoint() for helloworld-1.jar, which results in the teardown of the associated WS endpoint.

      Unfortunately, both artifacts declare the same service and only one can exist at a given time (see point 1). So the service will be removed, which basically leaves the helloworld-2.jar deployment without an endpoint.

      3.) What's the conclusion?
      Well, the bottom line is: As long as versioning is decoupled from the WS endpoint declaration (WSDL that is) riftsaw will not be able to gracefully handle these situations. ODE isn't designed to that, it only references service and port upon activation and deactivation of endpoints. The versioning information is not available at that stage to discriminate on that.



        • 1. Re: Revisit versioning strategy
          Gary Brown Master

          RiftSaw uses the same mechanism for versioning as ODE. The paragraph you reference refers to deploying bundles under different names - this excludes the version number.

          So hello_world-1.jar and hello_world-2.jar would be classified as the same name, with different versions, so ODE will retire the process instances associated with the first version.

          The issue you point out in (2) needs to be resolved - but that should be possible based on identifying whether other bundles exist with the same name (e.g. hello_world-*.jar).

          • 2. Re: Revisit versioning strategy
            Gary Brown Master

            Have created https://jira.jboss.org/jira/browse/RIFTSAW-137 to track the undeployment issue.

            This approach to deployment does have problems, as it does not take into account the fact that different versions of a process definition may have changes that are not backward compatible.

            However the only way to tackle this at present is to deal with it manually, which would mean having different WS URL (endpoints) for the incompatible versions, which in terms of ODE and RiftSaw means using different BPEL deployment units/bundles.