About C++11 and CORBA for numerics

  • Context: C/C++ 
  • Thread starter Thread starter Solkar
  • Start date Start date
Click For Summary
SUMMARY

The discussion centers on the integration of C++11 features, particularly Lambda Expressions, with CORBA for numerical applications. Prof. Bjarne Stroustrup's Matrix example highlights C++11's potential for handling large float arrays efficiently. Despite the advancements in C++11, the lack of seamless data handling in distributed systems remains a challenge, with CORBA being identified as a viable solution. However, the recent OMG C++11 IDL-binding lacks delegation-based binding, raising concerns about its suitability for concurrent applications.

PREREQUISITES
  • C++11 programming concepts, including Lambda Expressions
  • CORBA (Common Object Request Broker Architecture) fundamentals
  • Understanding of distributed systems and stateful applications
  • Knowledge of OMG (Object Management Group) specifications for C++
NEXT STEPS
  • Explore C++11 Lambda Expressions for numerical integration techniques
  • Research the latest OMG C++11 language mapping specifications
  • Investigate best practices for lifecycle management in concurrent applications
  • Learn about TAOX11 and its implementation of C++11 IDL-binding
USEFUL FOR

Software developers, particularly those working with C++11 and CORBA, as well as engineers involved in numerical computing and distributed systems design.

Solkar
Messages
107
Reaction score
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++ language Mapping. OMG, 2012. http://www.omg.org/spec/CPP/1.3
[OMG13] OMG C++11 language Mapping. OMG, 2013. http://www.omg.org/spec/CPP11/
 
Last edited:
Technology news on Phys.org
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.
 

Similar threads

  • · Replies 25 ·
Replies
25
Views
5K