[Mono-list] Embedding strategy

Mads Bondo Dydensborg mbd at dbc.dk
Fri Sep 19 02:46:09 EDT 2008


Hi there

I was wondering if someone could give me some advice on using C# code together 
with C++ code. My case is this: I have a number of C# assemblies that provide 
some functionality. I also have some C++ .so's that I need to use. Everything 
is threadsafe, and the application (a server) needs to be multithreaded to 
support a number of concurrent clients. What I was wondering is, what is the 
most practical way to implement it. I am looking at two options:

a) requests <=> C++ multithreaded main app <=> mono assemblies
b) requests <=> mono multithreaded main app <=> C++ libs

a) would need to use the mono embedding api from C++
b) would need to use PInvoke on my libs.

I am in doubt what would be my "best" option.

For a is that I can use gdb for my main app - which works IMHO a lot better 
than the mono debugger.
Against a is the fact that I do not really know the mono embedded api, and I 
am uncertain about the docs, especially in relation to threads

For b is the the fact that PInvoke is quite well documented, and that I know 
exactly how to provide a threadsafe environment from C++. But I would 
probably have to use the mono debugger. 

Does anyone have any suggestions to as what would be the most productive way 
to go about this? Any other strategies I have missed?

Regards

Mads

-- 
Med venlig hilsen/Regards

Systemudvikler/Systemsdeveloper cand.scient.dat, Ph.d., Mads Bondo Dydensborg
Dansk BiblioteksCenter A/S, Tempovej 7-11, 2750 Ballerup, Tlf. +45 44 86 77 34



More information about the Mono-list mailing list