Friday, October 08, 2004

C++ Migration to Java

After 3 months of work, I'm close to being done with the re-architecture of three legacy C++ servers. The original servers were written back in the late 90's, and used an OO database as a repository. The re-architecture has involved moving and code to Java, and migrating off the OO database. What follows is a summary of the performance timings taken from a JUnit calling both the C++ and Java CORBA servers - these timings should be taken with a pinch of salt, since the internals of the C++ and Java servers are different (but produce the same results, and expose the same IDL interfaces), as is the repositories:

(11998 method calls) for Test 1
C++:Average milliseconds 21(total milliseconds:253846)
Java:Average milliseconds 1(total milliseconds:18438)

(11998 method calls) for Test 2
C++:Average milliseconds 26(total milliseconds:314209)
Java:Average milliseconds 3(total milliseconds:38745)

(5999 method calls) for Test 3
C++:Average milliseconds 40(total milliseconds:242797)
Java:Average milliseconds 1(total milliseconds:10684)

(5999 method calls) for Test 4
C++:Average milliseconds 53(total milliseconds:322152)
Java:Average milliseconds 11(total milliseconds:69485)

(10 method calls) for Test 5
C++:Average milliseconds 717(total milliseconds:7174)
Java:Average milliseconds 168(total milliseconds:1680)

(10 method calls) for Test 6
C++:Average milliseconds 101(total milliseconds:1019)
Java:Average milliseconds 25(total milliseconds:259)

(10 method calls) for Test 7
C++:Average milliseconds 81(total milliseconds:813)
Java:Average milliseconds 28(total milliseconds:287)

(813 method calls) for Test 8
C++:Average milliseconds 3(total milliseconds:3133)
Java:Average milliseconds 2(total milliseconds:2053)

(813 method calls) for Test 9
C++:Average milliseconds 16(total milliseconds:13629)
Java:Average milliseconds 1(total milliseconds:1237)

Timings were taken on 8 CPU (1200Mhz) Sun Sparc Solaris box running JDK 1.4.2_05 with Iona Orbix 6.1

1 Comments:

At 8:26 pm, Anonymous Anonymous said...

Maybe you would like to take a look at JunC++ion (http://www.codemesh.com) to help with the migration. I know that you already have CORBA in the picture, but with JunC++ion you can easily replace pieces of C++ functionality with in-process Java and for example use exactly the same test suite (including C++ unit tests) as before.

Alex (alex at codemesh dot com)

 

Post a Comment

<< Home