Skip to content

Commit 03b1acd

Browse files
Apply Gemini review: fix jargon, add missing MC responses, clarify timings
- Replace BLUF with Summary (military jargon inappropriate for open-source) - Replace dptv2 reference with 'production deployment template' - Add missing Monte Carlo JSON responses in Demo 2 pre-trade section - Add variance note to Full Performance Summary (MC timings +/-5% across runs) - Use consistent 1,366 ms for 100K MC in summary table (Demo 3 steady state) - Tone down marketing language in 'When to use which' section Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 0f5b6d7 commit 03b1acd

1 file changed

Lines changed: 24 additions & 12 deletions

File tree

MCP_EXAMPLES.md

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# MCP Examples: Financial Services on Axis2/Java + WildFly
22

3-
**BLUF**: Apache Axis2/Java serves the same financial calculations as Axis2/C —
3+
**Summary**: Apache Axis2/Java serves the same financial calculations as Axis2/C —
44
portfolio variance, Monte Carlo VaR, scenario analysis — over JSON on WildFly 32
55
with Spring Security JWT authentication. This document shows the same live demos
66
as the Axis2/C `MCP_EXAMPLES.md`, run against the Java implementation, with
@@ -410,7 +410,17 @@ curl -s http://localhost:8080/axis2-json-api/services/FinancialBenchmarkService
410410
"nPeriodsPerYear":252}}]}'
411411
```
412412

413-
**Results (real output, 2026-04-08):**
413+
**European candidate response:**
414+
```json
415+
{"response": {"var95": 237481, "var99": 340245, "cvar95": 300412, "probProfit": 0.643, "maxDrawdown": 0.610, "calcTimeUs": 1360351}}
416+
```
417+
418+
**Japanese candidate response:**
419+
```json
420+
{"response": {"var95": 221367, "var99": 322087, "cvar95": 282371, "probProfit": 0.656, "maxDrawdown": 0.555, "calcTimeUs": 1364834}}
421+
```
422+
423+
**Results summary (2026-04-08):**
414424

415425
| | Before (5 names) | + European semi | + Japanese peer |
416426
|---|---|---|---|
@@ -517,15 +527,17 @@ which is fast enough for interactive use.
517527

518528
All measurements from 2026-04-08, same machine (Linux, 32 GB RAM).
519529
Timings are server-reported `calcTimeUs` — pure computation time, no
520-
transport overhead.
530+
transport overhead. Monte Carlo timings vary ±5% across runs due to JIT
531+
warmup and GC; values below are from the Demo 3 convergence runs (JIT-warm
532+
steady state).
521533

522534
| Benchmark | Axis2/C | Axis2/Java | Ratio |
523535
|-----------|---------|------------|-------|
524536
| portfolioVariance (5 assets) | < 1 μs | 1 μs | ~1x |
525537
| portfolioVariance (500 assets) | 232 μs | 660 μs | 2.8x |
526538
| monteCarlo (1K × 252) | 6 ms | 13 ms | 2.1x |
527539
| monteCarlo (10K × 252) | 66 ms | 136 ms | 2.1x |
528-
| monteCarlo (100K × 252) | 716 ms | 1,370 ms | 1.9x |
540+
| monteCarlo (100K × 252) | 716 ms | 1,366 ms | 1.9x |
529541
| monteCarlo (1M × 252) | 6.6 sec | 13.8 sec | 2.1x |
530542
| MC throughput (sims/sec) | ~150K | ~73K | 2.1x |
531543
| Peak memory (500-asset PV) | ~193 MB | 229 MB | 1.2x |
@@ -535,14 +547,14 @@ transport overhead.
535547
### When to use which
536548

537549
- **Axis2/C**: Edge devices, Android (1-2 GB RAM), IoT gateways, latency-critical
538-
paths, environments where JVM overhead is unacceptable. Sub-millisecond portfolio
539-
variance at 500 assets. Startup in milliseconds.
550+
paths, environments where a JVM cannot run or its memory overhead is unacceptable.
551+
Sub-millisecond portfolio variance at 500 assets. Startup in milliseconds.
540552

541-
- **Axis2/Java**: Enterprise deployment on WildFly/Tomcat, existing Java shops,
542-
environments with Spring Security/JWT/mTLS requirements, integration with Java
543-
ecosystem (Hibernate, JPA, FactSet SDKs). 2x slower on Monte Carlo but still
544-
fast enough for interactive use (1.4 sec for 100K paths). Rich deployment
545-
tooling (WAR, Spring Boot, OpenAPI/Swagger UI, MCP bridge).
553+
- **Axis2/Java**: Standard Java EE/Jakarta EE deployment on WildFly or Tomcat,
554+
teams with existing Java infrastructure, environments requiring Spring Security
555+
(JWT/mTLS), or integration with Java-based data providers. 2x slower on Monte
556+
Carlo but still interactive (1.4 sec for 100K paths). Deploys as a standard WAR
557+
with OpenAPI/Swagger UI and MCP bridge included.
546558

547559
Both implement the same MCP tool schemas. An AI assistant configured with
548560
either backend gets the same financial capabilities — the same questions
@@ -572,7 +584,7 @@ See `WILDFLY32_DEPLOY_STATE.md` in the Axis2/C repo for the full deployment
572584
walkthrough. Key points:
573585

574586
- WildFly 32.0.1.Final with `--add-modules=java.se` in `standalone.conf`
575-
- `jboss-deployment-structure.xml` from dptv2 (includes `jdk.net` module dependency)
587+
- `jboss-deployment-structure.xml` from production deployment template (includes `jdk.net` module dependency)
576588
- `beans.xml` with `bean-discovery-mode="none"` (satisfies Weld without CDI scanning)
577589
- Spring Boot 3.4.3 starts in ~0.9 seconds inside WildFly
578590
- WAR: `axis2-json-api-0.0.1-SNAPSHOT.war`

0 commit comments

Comments
 (0)