[RFC] Modern CORBA C++ IDL Mapping and implementation
Hello Boosters, Where I work we are implementing an open source, modern, CORBA implementation and IDL mapping. We want it to support C++ and C++11 IDL mapping, but we also want to create another IDL mapping. This new IDL mapping is being experimentated in the following url https://github.com/expertisesolutions/mORBid/tree/concepts It still has some very problematic issues (like compilation-time of generated code) and of course it is still far from completion. But, we would like to hear suggestions about this approach. What we did was that an IDL interface is mapped to a typedef for boost::type_erasure (I found the idea quite cool for the reasons that I'll mention below) with the requirements defined in the IDL, e.g. its operations. The IDL also emits a model for this type_erasure which is the actual stub class and is called remote_reference. It also emits a proxy_reference model for the same type_erasure typedef which receives a std::reference_wrapper and proxies the calls, this is needed because type_erasure can't switch between by-reference and by-value in runtime. Why I believe this approach is better than current IDL to C++11 mapping: Because the IDL to C++11 mapping is too intrusive. You can't really use normal classes you have written for use as servants in CORBA because you have to inherit from Skeletons classes *and* you have to use the *exact* same signature as defined in the mapping. This is *way too restricted*. This is also inerent to the OO paradigm that CORBA uses. But, we can mimic the same features using type-erasure instead of directly using dynamic polymorphism. This gives a much greater freedom to users. It might be that Boost.type_erasure is not the best tool here because of compile-time and compiler memory usage, but the idea surely is. We still haven't seriously profiled boost.type_erasure yet, but we will do so as soon as possible. I think it might be very interesting to experiment with lite concepts and Boost.concept_check as well. Also, we created a EDSL for GIOP and IIOP mapping based on the boost.spirit infrastructure. We use that to treat alignment and endianness automatically and to use the same grammar for generation and parsing of IIOP messages. The message header grammar is defined like this: start = "GIOP" & octet('\1') /* GIOP major version */ & octet('\0') /* GIOP minor version */ & endianness [ octet(MessageType) /* message_type */ & raw_size(ulong_)[body] ] ; Which is compiled to IIOP parser or generator through boost.spirit infrastructure of make_terminal, make_directive and etc. This works splendid well and is really easy to use, extend, is statically checked and has great performance. Whoever feel interested, please take a look and comments are highly appreciated. Regards, -- Felipe Magno de Almeida
Where I work we are implementing an open source, modern, CORBA implementation and IDL mapping. During last 10 years I went through number of companies that decommissioned
On 11 May, 2014, at 9:20 am, Felipe Magno de Almeida
We want it to support C++ and C++11 IDL mapping, but we also want to create another IDL mapping.
You are right that new IDL mapping can revitalise CORBA.
Hi,
Where I work we are implementing an open source, modern, CORBA implementation and IDL mapping. During last 10 years I went through number of companies that decommissioned their CORBA middleware in favour of something else. Current generation of software developers even don't consider CORBA for new projects. There are alternatives like ICE ZeroC (http://www.zeroc.com/iceVsCorba.html)
CORBA has historical significance and well developed set of concept but is it really alive?
Yes, it is still alive.
We want it to support C++ and C++11 IDL mapping, but we also want to create another IDL mapping.
You are right that new IDL mapping can revitalise CORBA.
The new C++11 mapping is way easier than the old mapping. It reuses STL, see https://osportal.remedy.nl/projects/idl2cppx0 for details and examples. Best regards, Johnny
On 11 May, 2014, at 9:20 am, Felipe Magno de Almeida
wrote: CORBA has historical significance and well developed set of concept but is it really alive?
Considering it is the core of JTRS and SCA, I'd say it's still alive: http://en.wikipedia.org/wiki/Software_Communications_Architecture
Hi,
Why I believe this approach is better than current IDL to C++11 mapping: Because the IDL to C++11 mapping is too intrusive. You can't really use normal classes you have written for use as servants in CORBA because you have to inherit from Skeletons classes *and* you have to use the *exact* same signature as defined in the mapping. This is *way too restricted*. This is also inerent to the OO paradigm that CORBA uses.
it is true that the current IDL to C++11 mapping only has inheritance support for servants. It doesn't have a delegation model, at the moment we worked on the spec we needed inheritance and didn't want to standardize delegation without a good feeling about it. If you have concrete proposals how the IDL to C++11 spec can be extended with a delegation model, contact me directly, that is definitively something that could be added to the specification. Best regards, Johnny Willemsen Remedy IT http://www.remedy.nl
participants (5)
-
Alexey Tkachenko
-
david.hagood@gmail.com
-
Felipe Magno de Almeida
-
Johnny Willemsen
-
niXman