Hi,
I'm writing a .NET smart client that should communicate with an older
C++ library ("older" means: written with something prior .NET, perhaps
VS 6.0). If the C++ library crashes my .NET client mustn't crash
too. So the idea is to run .NET client and C++ library in different
processes. These processes have to communicate.
Some constraints: The people who have to deploy the whole application
don't like COM because deployment with COM is much more difficult than
without (so they say). Porting the older C++ library to managed
code is currently not an option.
Now we have the following working solution via mail slots as
middleware (easy to deploy: they're already there) and with XML as
protocol (easy to use with .NET resp. MSXML):
- The .NET Client and the C++ library (library wrapped in a thin
C++ application by ourself) are running in two different processes.
- If the .NET client wants to sent a message to the C++ application
the client serializes its data into XML.
- The data is sent via a mail slot to the C++ application.
- The C++ application deserializes the XML.
- The C++ library is called.
- With the result of the call the C++ application constructs a DOM
tree.
- The DOM is serialized to XML.
- The XML is sent back via mail slot to the .NET client.
- The .NET client deserializes the XML.
Some questions and problems: Is my assumption "I need a seperate
process for the C++ library to inhibit a potential crash of my .NET
client" correct? If yes: I'm not sure wether mail slots are the right
decision regarding stability and performance.
Regarding XML: The result of a C++ library call can consist of a lot
of small objects and can result in up to 50MB XML text. Constructing a
DOM tree with a lot of small objects is *very* slow. Of course I can
define my own communication protocol but in .NET handling of XML and
(de-)serialization is very easy. Can I make the DOM construction
faster? Any other option to serialize the C++ data to XML (besides
writing XML "by hand")?
Any hints and/or tips?
Thanks in advance,
Burkhard
--
Burkhard Perkens-Golomb mailto: [EMAIL PROTECTED]
sd&m AG http://www.sdm.de
software design & management AG
Carl-Wery-Str. 42, 81739 Muenchen, Germany
Tel +49 89 63812-398, Fax -410
Tel Home +49 89 66 00 09 61
===================================
This list is hosted by DevelopMentor� http://www.develop.com
Some .NET courses you may be interested in:
Guerrilla ASP.NET, 10 Nov 2003 in London and 26 Jan 2004, in Los Angeles
http://www.develop.com/courses/gaspdotnet
Guerrilla .NET, 8 Dec 2003, in Los Angeles
http://www.develop.com/courses/gdotnet
View archives and manage your subscription(s) at http://discuss.develop.com