Skip to Content
Author's profile photo Vanya Maneva

Deploy the Delta

If you are a developer who didn’t like deploying the whole archive of an application every time you made some changes, we have something for you.

The delta deployment now makes it possible to upload only the changed files and not the entire set.

The delta option is available both in the SAP HANA Cloud Platform console client and Eclipse IDE.

When you use it, you upload only the changes between the provided source and the previously deployed content – new content is added; missing content is deleted; existing content is updated if there are changes.

This saves time and makes the development turnaround much faster.

❗ Use it for development purposes only. For updating productive applications, deploy the whole application.

Console client

A new delta parameter is available in the deploy and hot-update commands.

If you use deploy, you need to restart the application.

neo deploy -h us1.hana.ondemand.com -u mymail@example.com -a myacc -b myapp –s samples/deploy_war/example.war –delta

With hot-update, you apply the changes on an already running application process so no restart is required.

neo hot-update -h us1.hana.ondemand.com -a myacc -b myapp –s samples/deploy_war/example.war -u mymail@example.com –strategy replace-binaries –delta

Eclipse IDE

You can do the same with just one click in the Eclipse IDE.

In the Servers view, double-click on the cloud server.

In the Overview tab -> Publishing, select Publish changes only (delta deploy).

Delta_Deploy_IDE.png

Save time

Our measurements show that the time optimization when using the delta option is considerable especially in case your application binaries are very big or your network is slow.

Here is an illustration of the time optimization for delta deploy compared to standard deploy and deploy using multiple connections.

The times largely depend on the network speed which varies proportionally to our distance to the respective data center.
In our case, we executed the deployment from Europe on the three productive landscapes – Europe (hana.ondemand.com); United States (us1.hana.ondemand.com) and Asia-Pacific (ap1.hana.ondemand.com).
Measurements are made with a 201.55 MB source file containing 70 files. The delta is about 2.16 MB of changes made in approximately 15 of the files.

Delta_deploy.png

It’s as easy as that!

Try it out and give us your feedback.

Assigned Tags

      2 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      Could you explain the neo-maven-plugin syntax a little? it seems to me that delta is not really working there. pom.xml looks like:

         <plugin>
         <groupId>com.sap.cloud</groupId>
         <artifactId>neo-javaee6-wp-maven-plugin</artifactId>
         <version>${sap.sdk.version}</version>
         <configuration>
         <sdkInstallPath>${project.build.directory}${file.separator}sdk</sdkInstallPath>
         <mavenSettingsServerId>tts-hcp</mavenSettingsServerId>
         <host>${hcp.host}</host>
         <account>${hcp.account}</account>
         <application>${hcp.application}</application>
         <source>${project.build.directory}${file.separator}${project.artifactId}-${project.version}.war</source>
         <delta></delta>
         <strategy>replace-binaries</strategy>
         </configuration>
         <executions>
         <execution>
         <phase>package</phase>
         <goals>
         <goal>hot-update</goal>
         </goals>
         </execution>
         </executions>
         </plugin>
      Author's profile photo Eckart Langhuth
      Eckart Langhuth

      Hi Mathias,

      you'll need to provide a true value in the configuration of boolean type properties: <delta>true</delta>

      (That is because Maven does not inject empty content. Inside the Mojo there is no way to distinguish between  <delta></delta> and no <delta> tag at all)

      Regards, Eckart