About C++11 and CORBA for numerics

  • C/C++
  • Thread starter Solkar
  • Start date
In summary, Prof. Bjarne Stoustrup is knowledgeable about C++11 and has provided an example at the 2012 GoingNative Conference that showcases its benefits for numerical operations. However, despite the advantages, the adoption of C++11 for numerical purposes has not been as widespread as expected. One of the major reasons for this is the difficulty in seamlessly integrating data into a distributed system. The use of MPI and SOAP have their limitations, and CORBA appears to be the best solution, although it is not very C++11-friendly. The recently released C++11 IDL-binding by OMG addresses some of these issues, but there are still concerns about its implementation and lack of certain features such as delegation-based binding. The author proposes
  • #1
Solkar
107
3
Prof. Bjarne Stoustrup of course knows where his towel is when it comes to C++11.

The Matrix example he provided at the 2012 GoingNative Con [Str12] is indeed an appetizer if one has ever dealt with pushing large float arrays around, and I find it remarkable that C++11's share for numerical has not yet rocketed, because that gives way to very expressive style of coding.

The other big fish of C++11 for numerics is "Lambda"-Expressions; that makes it e.g. possible to Integrate over a given Riemann-partition in a single line of code.

---

But nowadays, even the best language concepts do pay little if there are no seamless means to push the data into a component of a distributed system.

Consider a number-crunching application core that is stateful and idle while waiting for data that is to be processed depending to the state; e.g. an application that has found certain physically valid morph paths and is now waiting for arbitrary surface data to actually be morphed that way.

MPI is fine when data arrives sooner-or-later, but what if the arrival of data is depending on user interaction; e.g. because it does not arrive at all be cause the object's update is dropped during culling?

SOAP would be fine if would not bring a large overhead with it that required a parsing which is often more time-expensive than (vectorized) processing of the workload.

So CORBA, which is often said to be plainly "dead", still appears the best platform-independent fast solution for this scenario (COM/DCOM is also fast, but MS specific)

---

So CORBA it is - but wait!

[OMG12] is not exactly what one would call C++11-ish - there are pointers passed around in never-come-back fashion which makes it a QA nightmare. And even "STL" appears sort-of terra incognita for that standard.

--

So OMG has recently released [OMG13], a C++11 IDL-binding.

Fortunately so.
Fortunately?

Well - what appears missing even on a first look is delegation-based binding (aka "tie"-implementation) of [OMG12] That is quite strange; especially in the light of improved generics of C++11 - one intuitively would likely expect "more generics" in a C++11 binding than in prior C++-bindings, but definitely not "less generics".

By glueing together the lifetime of the implementation and the servant by "allowing" inheritance-only, OMG sort-of implies a very bad programming model for concurrent apps - custom "p_impl"ing and per-case custom life-cycle management to protect expensive assets from being d'tored just because the servant runs out of like-keeping refs.

---

I'm yet not sure how to deal with that in a consistent fashion; at least it appears there is a sort of (template-based) "life-cycle layer best practices" needed in supplement to the OMG standard.

Opinions or advice on that? Solkar
[Str12] Stroustrup, Bjarne C++11 Style – A Touch of Class. GoingNative Conference, 2012. http://channel9.msdn.com/Events/GoingNative/GoingNative-2012/Keynote-Bjarne-Stroustrup-Cpp11-Style?format=flash (Slides available there)
[OMG12] OMG C++ Langauge Mapping. OMG, 2012. http://www.omg.org/spec/CPP/1.3
[OMG13] OMG C++11 Langauge Mapping. OMG, 2013. http://www.omg.org/spec/CPP11/
 
Last edited:
Technology news on Phys.org
  • #2
We have made a proposal to add a delegation approach to the IDL to C++11 language mapping. We hope it gets into the v1.4 version of the IDL to C++11 specification. We have a working prototype for TAOX11.
 

1. What is C++11?

C++11 is a version of the programming language C++ that was released in 2011. It introduced new features such as lambda expressions, type inference, and concurrency support.

2. What is CORBA?

CORBA (Common Object Request Broker Architecture) is a standard for distributed computing that allows different applications written in different programming languages to communicate with each other.

3. How does C++11 and CORBA benefit numerics?

C++11 and CORBA provide a powerful combination for numerical computing. C++11's new features allow for efficient and concise code, while CORBA's distributed computing capabilities allow for parallelization and scalability in numerical applications.

4. Can C++11 and CORBA be used together for other types of programming?

Yes, C++11 and CORBA can be used together for a wide range of programming tasks beyond numerics. They can be used for web development, data processing, and other types of distributed systems.

5. Are there any downsides to using C++11 and CORBA for numerics?

Some potential downsides to using C++11 and CORBA for numerics include a steeper learning curve for those who are not familiar with these technologies, and the need for additional tools and libraries to fully utilize their capabilities in numerical applications.

Back
Top