SOAP Webservice Streaming – Memory and CPU usage pattern

Hi, There:

I have recently implemented SOAP Streaming with CXF 3.14 and datahandler. The streaming works really well with huge payload in MTOM. Without detailing on the code in this post, let me show the memory/CPU usage in the application on the server side. The pattern on the client side is very similar too.

See the memory usage when streaming for 1 GB (first small oscillation) and 8 GB (second big oscillation) of payload. The heap memory is constantly using and releasing throughout the streaming process.  Meanwhile the CPU usage is heavy also due to the constant heavy IO, since streaming utilizes heavy temp file storage.

Not showing here, but for non-streaming SOAP MTOM, memory usage is pretty much a big lump without oscillation and its CPU usage is minimum due to limited processing and IO. During non-streaming, peak memory usage is much much higher than that of streaming since the whole payload is processed and contained in memory.

Cheers!

-TY

CPU_Mem_Usage

 

maven dependency from POM packaged artifacts

Hi, There:

This one puzzles me for a few days and I found a solution to it. My solution may not be the most elegant one but it works.

In one of my CXF project, I needed the newest WSS4J dependencies from this following pom.

<dependency>
 <groupId>org.apache.wss4j</groupId>
 <artifactId>wss4j</artifactId>
 <version>2.1.4</version>
</dependency>

but there is no jar files associated directly with the above dependency because it is of pom packaging type, see below.
<groupId>org.apache.wss4j</groupId>
 <artifactId>wss4j</artifactId>
 <version>2.1.4</version>
 <packaging>pom</packaging>

As a result, the associated underlining jars never got pulled into my project. It kept on saying failed to download the artifact. After many days of trying with changing <scope> etc, etc in vain, I had to explicitly put the underlining dependency from the packaged pom into my project as below. Each one of them is packaged in jar. This works fine now, albeit a bit tedious.  I will come back to update on this topic if I find a more elegant solution.

-TY

 <dependency>
 <groupId>org.apache.wss4j</groupId>
 <artifactId>wss4j-bindings</artifactId>
 <version>2.1.4</version>
 </dependency>
 <dependency>
 <groupId>org.apache.wss4j</groupId>
 <artifactId>wss4j-policy</artifactId>
 <version>2.1.4</version>
 </dependency>
 <dependency>
 <groupId>org.apache.wss4j</groupId>
 <artifactId>wss4j-ws-security-common</artifactId>
 <version>2.1.4</version>
 </dependency>
 <dependency>
 <groupId>org.apache.wss4j</groupId>
 <artifactId>wss4j-ws-security-dom</artifactId>
 <version>2.1.4</version>
 </dependency>
 <dependency>
 <groupId>org.apache.wss4j</groupId>
 <artifactId>wss4j-ws-security-policy-stax</artifactId>
 <version>2.1.4</version>
 </dependency>
 <dependency>
 <groupId>org.apache.wss4j</groupId>
 <artifactId>wss4j-ws-security-stax</artifactId>
 <version>2.1.4</version>
 </dependency>
 <dependency>
 <groupId>org.apache.wss4j</groupId>
 <artifactId>wss4j-integration</artifactId>
 <version>2.1.4</version>
 </dependency>