“The trick was developed in HiBase by Kenneth Oksanen, who (…) based it on similar constructs used in GCC, but developed and refined the idea further.” [1]
Tag Archives: c++
simple c++ client/server encryption corba example
hey folks,
my students are running crazy
they have to understand corba, based on this great example [1]. but they fail on using orbacus [2] and/or omniorb. so i have to help them.
first of all i want to make one thing clear: i don’t want to implement this stuff on windows. two years ago i made it, and that should be enough. it is much easier to implement and make it work under linux than with windows! so keep it simple stupid! i’ll now explain the installation of orbacus, because omniorb is out of the box: apt-get install omniorb
download orbacus for both languages (there will be an additional task: write a java client/server and let them intercommunicate). i don’t know why, but use the zip file instead of the tar.gz – there were some missing header files … unzip it to the desired location (i used $HOME/bin/orbacus_cpp) and the game can begin!
- change to the path and run the pre-configuration script: ./runconfig
- pick up the corresponding answers to the questions (e.g. b->bash; 5->GCC 3.4.x/4.1.x/4.3.x; yes; no; yes; [ ]; [ ]; [ ]; [ ]; /home/mike/bin/orbacus_cpp)
- then start the config script with: . ./go
- after everything went fine, fire up the compilation process with make and head for a coffee …
- finish the installation with make install as superuser
- now edit your $HOME/.bashrc file (the LD_LIBRARY_PATH is for the binaries of orbacus, e.g. the idl compiler):
if [ -d “$HOME/bin/orbacus_cpp” ] ; then export PATH=”$PATH:$HOME/bin/orbacus_cpp/bin” && export LD_LIBRARY_PATH=”$LD_LIBRARY_PATH:$HOME/bin/orbacus_cpp/lib” ; fi - it is possible to add the “LIBRARY_PATH” also to the bashrc, but we will check this in the Makefile! now we have to download the sourcecode of Carlos …
- use this makefile to successfully compile the code! for omniorb you have to change the -I and -L arguments 😉
after compiling the code you can adopt the */ini*.bat files for running the example! et voila …
wish you happy coding!
[1] A Simple C++ Client/Server in CORBA, Carlos Jiménez de Parga, Sep 2009, Online: http://www.codeproject.com/Articles/24863/A-Simple-C-Client-Server-in-CORBA;
[2] Orbacus, Progress Software, Online: http://www.progress.com/en/orbacus/orbacus_index.html;
What’s new in C++ 11?
Yesterday, InfoWorld published a interview with Bjarne Stroustrup about the new stuff in C++ 11. He mentioned for example multithreading, lock-free concurrency, improvements in returning large data structures and the range-for loop. The following two questions were also very interesting …
InfoWorld: How does C++ compare to languages like Java, C#, or the dynamic scripting languages that are proliferating lately?
Stroustrup: I can’t do a detailed comparison, but C++ is more flexible (for good and bad) and tends to perform significantly better, assuming competent developers in all languages compared. The other languages tend to have massive standard libraries. For C++, the standard library is relatively small, and a developer is faced with the problem of choosing among a host of commercial and open source libraries when going beyond that.
InfoWorld: At Microsoft’s GoingNative 2012 conference recently, you emphasized native programming, saying, “Something has to talk to hardware,” and not everything can be a virtual machine. When should a developer opt for native programming, and when should a developer opt for a virtual machine-based language?
Stroustrup: Actually, it was Microsoft that emphasized “native” programming and chose the title, but that’s the kind of implementation techniques I’ve relied on for decades. C++ has significant strengths compared to “virtual machine-based languages” when it comes to building infrastructure. In other words, where performance, reliability, resources, and complexity need to be tightly controlled.
For example, you wouldn’t write a JavaScript engine in JavaScript, and you probably wouldn’t write a “first to market” simple Web app in C++. You would write the foundations of a Google, an Amazon, a Facebook, or an Amadeus (airline ticketing) in C++, but maybe not the rapidly changing top layers of such systems.
You can read the full article here [1]. If you don’t know who Bjarne Stroustrup is, there is his site [2]. And if you want a argument why C++ is not dead, here we go [3].
Have fun at reading the article!
[1] http://www.infoworld.com/d/application-development/stroustrup-reveals-whats-new-in-c-11-187051
[2] http://www2.research.att.com/~bs/
[3] http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html