Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ada/C/++ distributed applications

I am trying to evaluate some technologies for implementing a communication process between some Ada modules with some C++/OpenGL modules. There is an (Windows XP) Ada application which communicates with a C++ application using COM, but I intend to switch the COM to a new technology. Some suggestions came up, such as direct Sockets, DSA, Polyorb, Corba and DSS/Opensplice.

  • DSA appears to be just Ada -implemented (not sure)
  • Polyorb has its last implementation on 2006, according to http://polyorb.ow2.org/
  • Corba someone argumented that it could be not simple enough to justify its complexity for implementing simple applications
  • DSS/Opensplice appears to be just C/C++ implemented, so an Ada binding should be done. It also looks to be not very simple to be implemented too.

Personally I like COM, but due to the migration, I'd rather take the sockets option due to its simplicity, and the interface architecture could be implemented very easily.

So, what you think? Could you please comment about these technologies or even suggest other more?

Thanks very much.

like image 638
Rego Avatar asked Oct 20 '11 16:10

Rego


2 Answers

A big factor in your choice is the size and complexity of the system you're reengineering. Is it a broadly distributed system with lots of complex messages? Is it a relatively small system with a handful of mundane message exchanges?

For small systems I used to just roll-my-own socket-based comm modules. Now, though, I lean more towards ZeroMQ (brokerless) or STOMP (text-based). And there's some Ada support for these, zeromq-Ada and TOMI_4_Ada (supports both).

While these handle the distribution mechanics, you would still need to handle the serialization of the messages into transportable form.

CORBA/PolyORB and DDS solutions are rather heavyweight, but are complete solutions. If you don't fear IDL and managing brokers, they can do well for large-scale distributed systems. Yeah, there may need to be some Ada bindings built, but if you can get C headers or a C API to bind to, it's typically not too bad if you focus on just binding the functions and data structures you require. Rather than creating a comprehensive binding, liberally employ opaque and void pointers (void_ptr, opaque_structure_def_ptr) for structs and parameters whose internal contents you don't care about.

like image 114
Marc C Avatar answered Sep 29 '22 09:09

Marc C


we intend to switch the COM to a new (suported) technology, since COM is not more supported by Microsoft

Whoever told you COM is no longer supported is totally clueless.

While COM has undergone many name changes (OLE, COM, OLE Automation, DCOM, COM+, ActiveX, WinRT) and extensions over the past decades, it is the single most important technology for MS platforms: past, present and future. The .NET runtime uses COM extensively. Much of the Win32 API is written in COM, and the portions that weren't, will be in Win8, since WinRT components are COM objects.

like image 30
Ben Voigt Avatar answered Sep 29 '22 09:09

Ben Voigt