Home Products Services Company Developer Connection
Applied Informatics

Developer Connection

Archive for February, 2009

POCO Platform 2009.1 Preview Part 1: The Core Libraries

We are currently working hard on finishing release 2009.1 of the POCO Platform, which will be available in March. In the coming days I will publish a series of posts that introduce the new features and changes in that release. Today, I’ll start with the core libraries — Foundation, XML, Util and Net, as well as NetSSL. For these libraries, the main focus of the upcoming release is performance. Through some profiling we found a few places in POCO that were worthy targets for performance improvements. The main goal was reducing the number of heap memory allocations, especially in the HTTP server framework. Actually, most memory allocations are caused by string operations, so reducing and optimizing string operations alone makes for a significant improvement. Another source of often unnecessary memory allocations were the NumberFormatter and DateTimeFormatter classes. Instead of writing something like:

std::string str;
str += NumberFormatter::format(100);

it is now possible to write:

std::string str;
NumberFormatter::append(str, 100);

The same applies to DateTimeFormatter. These performance improvements will mostly delight folks working with embedded systems, as on these systems the improvements will be most visible. Apart from the performance we of course also fixed all currently known bugs. And we threw in a few new features as well. There will be a new timer class that does not need a separate thread per timer. On systems using many timers, using this class helps to keep the number of threads low.

A lot of good work went into the NetSSL_OpenSSL library, which was significantly overhauled. It is now possible to use a separate SSL context for every socket. Furthermore, secure sockets can now be created on top of existing sockets. This enables the implementation of protocols that can switch to a secure connection over an existing TCP connection, such as SMTP with the STARTTLS command. Error handling in the library has been improved, as well as the documentation.

All these changes will also soon be available in release 1.3.4 of the Open Source POCO C++ Libraries.

In the next installment of this series I will talk about the improvements to the Open Service Platform.

Meet us at Embedded World

The Embedded World exhibition and conference, the world’s most important event for the embedded community, will take place from March 3 to 5 in Nuremberg, Germany. Come and visit us at the booth of our partner Atlantik Elektronik (booth 12-443) to see a cool technology demo involving the POCO Platform, a Lego Mindstorms® robot, Digi hardware and an iPhone™.

A preview of the demo can be seen in the video below.

How does it work? The Mindstorms vehicle is remote controlled using the iPhone’s accelerometer. The iPhone talks to a Digi ConnectCore Wi-9C running Linux and a POCO-based application over a WiFi connection. Connected to the Digi board is a Serial-to-Bluetooth™ dongle from Ezurio. We have a small application running on the iPhone that sends accelerometer data to the server process on the Digi board over UDP. The server application then sends command to the Lego NXT over Bluetooth. The Mindstorms vehicle is equipped with sonar, sound and light sensors, and the sensor data is sent back to the POCO application, which has a builtin web server to visualize the data on an Ajax-based web page. The NXT is running nxtOSEK, which allows us to program it in C and even C++. The program running on the NXT is a modified version of the nxtgt sample application that ships with nxtOSEK.

The video was filmed on November 8, 2008 at the “Lange Nacht der Forschung” in Klagenfurt, Austria, where this demo was a favorite among children of all ages.

Welcome!

Welcome to the Applied Informatics Developer Connection website. On this site you will find useful information and resources for developers working with the POCO C++ Libraries and the POCO Platform. Over time, we plan to fill this site with lots of useful information, including whitepapers and technical articles, answers to frequently asked questions, our development roadmap and previews of forthcoming releases. Be sure to check back often!