Skip to content

Commit 65e26dd

Browse files
AXIS2-6098 Add HTTP/2 transport and docs explaining the benefits
1 parent 0f4d12d commit 65e26dd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+11768
-14
lines changed

modules/samples/userguide/src/userguide/springbootdemo/pom.xml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,18 @@
178178
<artifactId>axis2-transport-http</artifactId>
179179
<version>2.0.0-SNAPSHOT</version>
180180
</dependency>
181+
<!-- HTTP/2 Transport for Enterprise Big Data Processing -->
182+
<dependency>
183+
<groupId>org.apache.axis2</groupId>
184+
<artifactId>axis2-transport-h2</artifactId>
185+
<version>2.0.0-SNAPSHOT</version>
186+
</dependency>
187+
<!-- HTTP/2 Dependencies -->
188+
<dependency>
189+
<groupId>org.apache.httpcomponents.core5</groupId>
190+
<artifactId>httpcore5-h2</artifactId>
191+
<version>5.3.3</version>
192+
</dependency>
181193
<dependency>
182194
<groupId>org.apache.axis2</groupId>
183195
<artifactId>axis2-transport-local</artifactId>
@@ -345,6 +357,9 @@
345357
<jar jarfile="${project.build.directory}/deploy/axis2-json-api.war/WEB-INF/services/testws.aar">
346358
<metainf file="resources-axis2/test_service_resources/services.xml"/>
347359
</jar>
360+
<jar jarfile="${project.build.directory}/deploy/axis2-json-api.war/WEB-INF/services/BigDataH2Service.aar">
361+
<metainf file="resources-axis2/bigdata_h2_resources/services.xml"/>
362+
</jar>
348363
<copy todir="${project.build.directory}/deploy/axis2-json-api.war/WEB-INF/conf">
349364
<fileset dir="resources-axis2/conf">
350365
<include name="axis2.xml"/>
@@ -357,6 +372,9 @@
357372
<jar jarfile="${project.build.directory}/exploded/WEB-INF/services/testws.aar">
358373
<metainf file="resources-axis2/test_service_resources/services.xml"/>
359374
</jar>
375+
<jar jarfile="${project.build.directory}/exploded/WEB-INF/services/BigDataH2Service.aar">
376+
<metainf file="resources-axis2/bigdata_h2_resources/services.xml"/>
377+
</jar>
360378
<copy todir="${project.build.directory}/exploded/WEB-INF/conf">
361379
<fileset dir="resources-axis2/conf">
362380
<include name="axis2.xml"/>
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
<!--
2+
~ Licensed to the Apache Software Foundation (ASF) under one
3+
~ or more contributor license agreements. See the NOTICE file
4+
~ distributed with this work for additional information
5+
~ regarding copyright ownership. The ASF licenses this file
6+
~ to you under the Apache License, Version 2.0 (the
7+
~ "License"); you may not use this file except in compliance
8+
~ with the License. You may obtain a copy of the License at
9+
~
10+
~ http://www.apache.org/licenses/LICENSE-2.0
11+
~
12+
~ Unless required by applicable law or agreed to in writing,
13+
~ software distributed under the License is distributed on an
14+
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
~ KIND, either express or implied. See the License for the
16+
~ specific language governing permissions and limitations
17+
~ under the License.
18+
-->
19+
20+
<serviceGroup>
21+
<!-- HTTP/2 Big Data Service for Enterprise JSON Processing -->
22+
<service name="BigDataH2Service" scope="application">
23+
<description>
24+
Enterprise Big Data Processing Service with HTTP/2 Transport Optimization
25+
26+
This service demonstrates HTTP/2 transport capabilities for large JSON datasets:
27+
- Support for 50MB+ JSON payloads with streaming optimization
28+
- Connection multiplexing for concurrent request processing
29+
- Memory-efficient processing within 2GB heap constraints
30+
- Performance monitoring and optimization metrics
31+
32+
Transport Features:
33+
- HTTP/2 streaming for large datasets (50MB+)
34+
- Connection multiplexing for medium datasets (10-50MB)
35+
- Standard HTTP/2 processing for small datasets (&lt;10MB)
36+
- Memory pressure handling and adaptive flow control
37+
38+
Security Features:
39+
- OWASP ESAPI input validation
40+
- HTTPS-only endpoint enforcement
41+
- Enterprise security compliance
42+
</description>
43+
44+
<!-- Service Implementation -->
45+
<parameter name="ServiceClass">userguide.springboot.webservices.BigDataH2Service</parameter>
46+
<parameter name="ServiceObjectSupplier">org.apache.axis2.spring.SpringAppContextAwareObjectSupplier</parameter>
47+
<parameter name="SpringBeanName">bigDataH2Service</parameter>
48+
49+
<!-- HTTP/2 Transport Configuration -->
50+
<parameter name="preferredTransport">h2</parameter>
51+
<parameter name="enableHTTP2">true</parameter>
52+
<parameter name="enableStreaming">true</parameter>
53+
<parameter name="enableMemoryOptimization">true</parameter>
54+
55+
<!-- Large Payload Configuration -->
56+
<parameter name="maxPayloadSize">104857600</parameter> <!-- 100MB -->
57+
<parameter name="streamingThreshold">52428800</parameter> <!-- 50MB -->
58+
<parameter name="connectionTimeout">30000</parameter>
59+
<parameter name="responseTimeout">300000</parameter> <!-- 5 minutes -->
60+
61+
<!-- JSON Processing Configuration -->
62+
<parameter name="enableJSONOnly">true</parameter>
63+
<parameter name="disableSOAP">true</parameter>
64+
65+
<!-- Performance Monitoring -->
66+
<parameter name="enablePerformanceMetrics">true</parameter>
67+
<parameter name="logProcessingTime">true</parameter>
68+
69+
<!-- Service Operations -->
70+
<operation name="processBigDataSet">
71+
<description>
72+
Process large JSON datasets using HTTP/2 optimization features.
73+
Automatically selects optimal processing mode based on dataset size:
74+
- Streaming for 50MB+ datasets
75+
- Multiplexing for 10-50MB datasets
76+
- Standard for &lt;10MB datasets
77+
</description>
78+
79+
<!-- HTTP/2 Operation Configuration -->
80+
<parameter name="enableHTTP2Streaming">true</parameter>
81+
<parameter name="memoryOptimization">true</parameter>
82+
<parameter name="concurrentStreams">5</parameter>
83+
84+
<!-- Input/Output Message Configuration -->
85+
<messageReceiver class="org.apache.axis2.json.JSONMessageReceiver"/>
86+
87+
<!-- Operation-level timeout for large datasets -->
88+
<parameter name="operationTimeout">300000</parameter> <!-- 5 minutes -->
89+
</operation>
90+
91+
<!-- Error Handling Configuration -->
92+
<parameter name="enableDetailedFaults">true</parameter>
93+
<parameter name="faultDetailLevel">full</parameter>
94+
95+
<!-- Security Configuration -->
96+
<parameter name="enableSecurity">true</parameter>
97+
<parameter name="requireHTTPS">true</parameter>
98+
<parameter name="validateInput">true</parameter>
99+
100+
</service>
101+
</serviceGroup>

modules/samples/userguide/src/userguide/springbootdemo/resources-axis2/conf/axis2.xml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,23 @@
230230
<parameter name="Transfer-Encoding">chunked</parameter>
231231
</transportSender>
232232

233+
<!-- HTTP/2 Transport for Enterprise Big Data Processing -->
234+
<transportSender name="h2"
235+
class="org.apache.axis2.transport.h2.impl.httpclient5.H2TransportSender">
236+
<parameter name="PROTOCOL">HTTP/2.0</parameter>
237+
<parameter name="maxConcurrentStreams">100</parameter>
238+
<parameter name="initialWindowSize">65536</parameter>
239+
<parameter name="serverPushEnabled">false</parameter>
240+
<parameter name="connectionTimeout">30000</parameter>
241+
<parameter name="responseTimeout">300000</parameter>
242+
<parameter name="streamingBufferSize">65536</parameter>
243+
<parameter name="memoryPressureThreshold">0.8</parameter>
244+
<!-- Enterprise Big Data Configuration -->
245+
<parameter name="enableStreamingOptimization">true</parameter>
246+
<parameter name="enableMemoryOptimization">true</parameter>
247+
<parameter name="largePayloadThreshold">52428800</parameter> <!-- 50MB -->
248+
</transportSender>
249+
233250
<!-- Please enable this if you need the java transport -->
234251
<!-- <transportSender name="java"
235252
class="org.apache.axis2.transport.java.JavaTransportSender"/> -->

0 commit comments

Comments
 (0)