|
Interoperability Between .NET and Java
Prepared by Matt Ulepic and Bob Simonoff with help from Alex Mason and Mark Shaffer.
Enterprise software grows in the same way as its market reach. Some of this growth is attributed to acquisitions, and such
measures often require bringing together heterogeneous technologies. When JDA
Software Group
purchased Manugistics, the keystone to
increasing its market share while preserving the existing customer experience was achieving high performance interoperability
with minimal impact; JDA was offering compelling user interfaces based on
.NET Framework while Manugistics was providing high powered solutions that leveraged a
J2EE server framework. Microsoft's
Windows Communication Foundation
proved to be excellent in providing .NET-to-Java interoperability, but Web services speed was lacking. To solve this challenge
JDA chose to use
Noemax's WCF-Xtensions which dramatically
improved the overall communication efficiency and enabled JDA meet its high performance targets.
Situation
JDA® Software Group, Inc. (NASDAQ: JDAS) is focused on helping companies realize real supply chain and revenue
management results - fast. JDA Software delivers integrated merchandising as well as supply chain and revenue management
planning, execution, and optimization solutions for the consumer-driven supply chain and services industries. Through its
industry leading solutions, leading manufacturers, distributors, retailers and services companies around the world are growing
their businesses with greater predictability and more profitably. With more than 5,600 customers in 60 countries, JDA employs
the industry’s most experienced supply and demand chain experts to develop, deliver and support its solutions.
JDA, in its purchase of Manugistics, brought together a suite of mature scalable applications under one roof. Some
of these applications were implemented using Microsoft technologies, while others were implemented using Java and J2EE. The task
facing JDA was to create highly interactive and compelling user interfaces for Windows clients which would utilize the existing
J2EE application code on the server side, thus providing a rich user experience while keeping the existing maturity and
scalability offered by the J2EE application tier.
The merger of these technologies presented an interoperability challenge. The key components to this challenge
were providing high performance and minimal impact.
Solution
For the presentation layer, Windows Presentation Foundation (WPF) was selected as the technology providing
the most modern and compelling rich user experience possible. The challenge was in the communication layer, as there were only a very
small number of approaches for making a WPF application communicate with a J2EE server.
|
|
|
|
|
| “ |
The performance improvement we achieved through the use of WCF-Xtensions combined with the simplicity of
integrating it into WCF has greatly simplified the process of adding extreme interactivity to our existing suite of products
without the need for rewriting J2EE application code. |
„ |
|
|
|
Bob Simonoff Senior Technical Architect, JDA Software Group |
|
|
|
|
|
JDA was intent on leveraging its existing J2EE server framework, grid architecture and applications. JDA also set
forth a goal to use standards-based
approaches wherever possible. To do this meant using Web services.
To provide the Web services infrastructure, Windows Communication Foundation (WCF) was the natural choice for the
.NET-based client side. On the J2EE server side, JDA decided to use Sun
Microsystem's Web Services Interoperability Technology (WSIT).
Since
Microsoft was already cooperating with that team on interoperability, it seemed to be the best supported path.
JDA began an extensive round of prototyping the details of how to make these technologies work together, make the
development process as efficient as possible, the interfaces flexible and the performance superior. The prototype created was
based on an analytical workbench with very heavy client-side data needs – meaning that a lot of data would have to be
transported between .NET and J2EE. This was chosen because it was the worst case scenario from a data movement perspective. The
other advantage was that the server-side code already existed, which would aid in determining the level to which existing J2EE
code could be leveraged.
A team was formed consisting of senior J2EE and .NET architects to prototype a Web services-based integration. It
quickly became apparent to the JDA team that WCF and WSIT were mature enough to meet the project needs. A Web services approach
proved to be an interoperability solution with minimal impact, as required. However, performance was lacking and was not meeting
the end-to-end requirements.
|
|
|
|
|
| “ |
A significant enabler was Noemax’s Customer Support. A product is nothing more than the company behind it. And
WCF-Xtensions has been a great contribution to JDA’s technology Portfolio. |
„ |
|
|
|
Matt Ulepic Software Architect, JDA Software Group |
|
|
|
|
|
The JDA team tried several techniques to improve performance, but none achieved the desired goals. Then the JDA team tried Noemax's
WCF-Xtensions, which includes several components that accelerate the performance of WCF-based Web services. Of particular
interest was its implementation of the Fast Infoset standard which specifies a binary encoding of the XML Infoset that reduces bandwidth
consumption, improves processing performance and is widely interoperable with Java and other platforms.
"The performance improvement we achieved through the use of WCF-Xtensions combined with the simplicity of
integrating it with WCF has greatly simplified the process of adding extreme interactivity to our existing suite of products
without the need for rewriting J2EE application code" says Bob Simonoff, Senior Technical Architect at JDA. "After a full
year's use, Fast Infoset proved to be a robust and mature technology on both .NET and Java that has reliably delivered
outstanding
benefits."
To assess the performance gains introduced by the use of WCF-Xtensions, the JDA team run two primary test scenarios. The first, a
control, involved a request of a simple Customer object array. The customer object contained a first name and a last name that were
unique among the customer array. The Web service contained a single operation that received a request containing an integer and
returned an array of customer objects sized to the integer. The second test represented JDA's target data model, the transmission
of Demand Forecast Units. DFUs are highly descriptive and large data objects; not only do they contain great amounts of data but
also represent an extensive hierarchy. This data model typically equates to complex XML that hinders processing. The use of a
control and a target data model allowed the JDA team to confirm that its performance findings were both consistent and
repeatable.
"A significant enabler was Noemax’s Customer Support" says Matt Ulepic, Software Architect at JDA. "A product is
nothing more than the company behind it. And WCF-Xtensions has been a great contribution to JDA’s technology Portfolio."
Benefits
The JDA team was very pleased that they were able to easily integrate WCF-Xtensions into their client
applications, that the Fast Infoset message encoding provided full interoperability between .NET and Java, and that tests showed
that scalability and raw performance had both improved dramatically.
Ease of integration
For JDA, the impact to the existing code base of a Web services interoperability solution was a concern. Noemax mitigated
this concern through the use of WCF binding extensions. The JDA team was able to integrate Noemax’s WCF-Xtensions into their
existing Web service clients with no impact. They simply modified the WCF bindings in the app.config to reference Noemax
extension bindings. For example, the client endpoint binding references changed from:
bindingConfiguration="TargetService_Binding"
to
bindingConfiguration="TargetService_BindingFiExtended"
The Java Web Services were also not impacted through the use of Fast Infoset because WSIT automatically supports
the Fast Infoset message encoding.
.NET to Java interoperability
Fast Infoset implementations that conform to the joint ITU-T
Recommendation (ITU-T Rec. X.891) and
ISO/IEC International Standard (ISO/IEC
24824-1) are available for a wide range of systems that include .NET and Java.
Fast Infoset serializes a W3C XML Information Set
into a binary XML encoding on one side and deserializes exactly the same infoset on the other side without any loss of
information. The schema-less design of Fast Infoset proved to be extremely robust independent of the type or complexity of the
data in the message.
To use Fast Infoset as a message encoding, JDA selected the implementations available in Noemax's WCF-Xtensions
and Sun' WSIT. JDA did not encounter any interoperability issues between these implementations, which has been working flawlessly
throughout many months of heavy use.
Whether transferring a few kilobytes or hundreds of megabytes, whether the payload included binary data or not,
whether buffered or streamed mode was used, whether with or without security, Fast Infoset always performed efficiently and
reliably.
Excellent performance increase
The tests that the JDA team made showed that scalability and raw performance had both improved dramatically.
They established that Fast Infoset introduced excellent gains when communicating over the
Internet, as the reduction in message size resulted in an generally proportional reduction in call completion time. When
communicating over a wide area network such as the Internet, the highest amount of the time consumed by a Web service call is
usually spent in message transmission. So by reducing message size the overall time taken to complete a call can be reduced by
as much as the message size is reduced.
To evaluate the compactness offered by Fast Infoset, the JDA team used Microsoft's
Fiddler tool to measure the size of the payload transferred over HTTP
during calls to their Web services. The results of their tests repeatedly demonstrated that Fast Infoset produces a very compact
message encoding. During a typical call to a Web service, the following measurements were taken:
| Message size |
| |
Text XML |
Fast Infoset |
ratio |
| Request message size |
8,989,553 bytes |
1,489,452 bytes |
1:0.17 |
| Response message size |
10,378,317 bytes |
2,778,243 bytes |
1:0.27 |
|
| Total |
19,367,870 bytes |
4,267,695 bytes |
1:0.22 |
|
By using Fast Infoset instead of text as message encoding, the size of the request message was reduced by 83%, the size of the
response message by 73% and the size of the call as a total by 78%.

A similar level of compactness was observed with other calls that the JDA team made to different Web services, greatly cutting
down bandwidth consumption and speeding up response times.
Additionally, the JDA team measured the level of memory use when large messages are transmitted, which is an important factor
that can significantly affect server performance. The metrics gathered were peak memory usage, page faults and virtual memory
size both at the client and at the server.
| Memory use |
| Server side |
Text XML |
Fast Infoset |
| Max memory |
320 MB |
268 MB |
| Page faults |
90 KB |
48 KB |
| Virtual memory |
320 MB |
246 MB |
| Client side |
Text XML |
Fast Infoset |
| Max memory |
152 MB |
123 MB |
| Page faults |
59 KB |
45 KB |
| Virtual memory |
165 MB |
138 MB |
|
The above data were for a call to a Web service that returned a response containing 1,000,000
customer records with a size of 150 MB when serialized using text XML without non-significant whitespaces.
Following these results as well as those of several other tests, the JDA team concluded that the Fast Infoset
implementation available in WCF-Xtensions introduced excellent improvements in all performance aspects on both sides.
|