Discussion:
[omniORB] Experience with dotnet (C#) and omniORB?
Martin B.
2010-12-14 15:04:08 UTC
Permalink
Hi all!

I know there's IIOP.NET [1] and I have found an old posting of Duncan
[2], where: (Thu Dec 14 16:53:10 GMT 2006)
P.S. Yes, I know that there is also IIOP.NET.
I would imagine that's a far more sensible way
of doing CORBA work from C#.

Currently I can see two options for communicating btw. the dotnet part
of our system with the native C++ part:
* Either I use IIOP.NET
* Or, I make a native C++ DLL that handles the CORBA communication via
omniORB and define a custom interface for that DLL so that it can be
loaded and used by a managed app. (We already do this at one place, and
technically it isn't a problem, but obviously it is more maintenance work.)

I therefore wanted to ask any omniORB users if they could share (recent)
experience of interfacing native C++ CORBA with dotnet(C#) applications.

thanks!
- Martin


[1] IIOP.NET : http://iiop-net.sourceforge.net/

[2] "How to use omniORB from C# " :
http://www.omniorb-support.com/pipermail/omniorb-list/2006-December/028280.html
Obermaier, Stephen J (IS)
2010-12-14 21:10:36 UTC
Permalink
Martin -

We do a lot of .NET work (both C# and C++) and use both omniORB and
omniEvents as the communications medium between the various
applications. What we have done is built a number of interface dll's in
C++ (with clr support) to wrapper the implementation classes derived
from the idl. This essentially allows all .net language implementations
access to the same interface(s). The client side is quite
straightforward. Each interface dll method accepts managed data,
converts the data to unmanaged types and invokes the appropriate
requests to the designated servant. The server side gets a bit more
complicated, depending on what you are trying to do. In a typical
scenario, a server implementation accesses a managed servant via a
delegate (defined via the .net interoperable services) to supply
whatever data is requested. The thing is, you do this once and you have
a cookie cutter that you can build all your interfaces from.

We also wrappered all the normal tasks that that an application would
typically perform (ORB initialization, interaction with Names, etc.).

We looked at IIOP a number of years ago (it's been around for a while),
but we wanted a common infrastructure that allowed interoperability
between both managed and unmanaged applications. Also, from what I
recall, it may not have supported the services like Names and Events).

Stephen J. Obermaier


-----Original Message-----
From: omniorb-list-***@omniorb-support.com
[mailto:omniorb-list-***@omniorb-support.com] On Behalf Of Martin B.
Sent: Tuesday, December 14, 2010 3:57 AM
To: omniORB-***@omniorb-support.com
Subject: EXTERNAL:[omniORB] Experience with dotnet (C#) and omniORB?

Hi all!

I know there's IIOP.NET [1] and I have found an old posting of Duncan
[2], where: (Thu Dec 14 16:53:10 GMT 2006)
P.S. Yes, I know that there is also IIOP.NET.
I would imagine that's a far more sensible way
of doing CORBA work from C#.

Currently I can see two options for communicating btw. the dotnet part
of our system with the native C++ part:
* Either I use IIOP.NET
* Or, I make a native C++ DLL that handles the CORBA communication via
omniORB and define a custom interface for that DLL so that it can be
loaded and used by a managed app. (We already do this at one place, and
technically it isn't a problem, but obviously it is more maintenance
work.)

I therefore wanted to ask any omniORB users if they could share (recent)

experience of interfacing native C++ CORBA with dotnet(C#) applications.

thanks!
- Martin


[1] IIOP.NET : http://iiop-net.sourceforge.net/

[2] "How to use omniORB from C# " :
http://www.omniorb-support.com/pipermail/omniorb-list/2006-December/0282
80.html
Martin B.
2010-12-14 21:49:02 UTC
Permalink
Thanks for this description!

Do I understand you correctly in that you use omniORB/C++ as
communication layer even for communication btw. two dotnet applications?

cheers,
Martin
Post by Obermaier, Stephen J (IS)
Martin -
We do a lot of .NET work (both C# and C++) and use both omniORB and
omniEvents as the communications medium between the various
applications. What we have done is built a number of interface dll's in
C++ (with clr support) to wrapper the implementation classes derived
from the idl. This essentially allows all .net language implementations
access to the same interface(s). The client side is quite
straightforward. Each interface dll method accepts managed data,
converts the data to unmanaged types and invokes the appropriate
requests to the designated servant. The server side gets a bit more
complicated, depending on what you are trying to do. In a typical
scenario, a server implementation accesses a managed servant via a
delegate (defined via the .net interoperable services) to supply
whatever data is requested. The thing is, you do this once and you have
a cookie cutter that you can build all your interfaces from.
We also wrappered all the normal tasks that that an application would
typically perform (ORB initialization, interaction with Names, etc.).
We looked at IIOP a number of years ago (it's been around for a while),
but we wanted a common infrastructure that allowed interoperability
between both managed and unmanaged applications. Also, from what I
recall, it may not have supported the services like Names and Events).
Stephen J. Obermaier
-----Original Message-----
Sent: Tuesday, December 14, 2010 3:57 AM
Subject: EXTERNAL:[omniORB] Experience with dotnet (C#) and omniORB?
Hi all!
I know there's IIOP.NET [1] and I have found an old posting of Duncan
[2], where: (Thu Dec 14 16:53:10 GMT 2006)
P.S. Yes, I know that there is also IIOP.NET.
I would imagine that's a far more sensible way
of doing CORBA work from C#.
Currently I can see two options for communicating btw. the dotnet part
* Either I use IIOP.NET
* Or, I make a native C++ DLL that handles the CORBA communication via
omniORB and define a custom interface for that DLL so that it can be
loaded and used by a managed app. (We already do this at one place, and
technically it isn't a problem, but obviously it is more maintenance work.)
I therefore wanted to ask any omniORB users if they could share (recent)
experience of interfacing native C++ CORBA with dotnet(C#) applications.
thanks!
- Martin
[1] IIOP.NET : http://iiop-net.sourceforge.net/
http://www.omniorb-support.com/pipermail/omniorb-list/2006-December/0282
80.html
_______________________________________________
omniORB-list mailing list
http://www.omniorb-support.com/mailman/listinfo/omniorb-list
Jérôme Carretero
2010-12-15 03:08:15 UTC
Permalink
On Tue, 14 Dec 2010 09:56:48 +0100
Post by Martin B.
I therefore wanted to ask any omniORB users if they could share (recent)
experience of interfacing native C++ CORBA with dotnet(C#) applications.
Hi Martin,

I've been using IIOP.Net and omniORB together for about 2 years.
.Net (C#) side for the clients.

I use the IDL2CLS generator provided with IIOP.Net, to generate usable DLLs directly from the IDL files.
The examples provided with IIOP.Net are quickly tweaked to provide seamless IPC if you have an IDL file and use IDL2CLS.
I had problems with string encodings, and that's why I always pass strings as Any objects and deal with encoding later.

Naming is supported, callbacks are supported, I did not use events.
If you don't do cryptic stuff, I don't see how wrapping unmanaged code can be simpler than this...

Regards,
--
cJ
Loading...