Strengths of the C++ Middleware Writer

The C++ Middleware Writer (CMW) has advantages over the serialization library in Boost:
Usage Performance Message support Boost Intrusive support

Usage:

  1. We provide full generation of marshalling functions. Users of the serialization library in Boost must maintain serialize functions for their types by hand. With the CMW, marshalling functions are written and maintained automatically. There's no need to make parallel changes to functions by hand when changes are made to a type.
  2. On line access to multiple versions of the C++ Middleware Writer. The on line approach allows us to efficiently publish new releases and fixes without people having to go through the download/build cycle to patch a bug or move to a new version.

Performance:

Testing notes

For testing purposes we build the serialization library in Boost with variant=release and link=static. The tests are run three times in a row using a semicolon on Linux to separate the executions. The fastest time of the three is the only one used in the comparisons.

Output tests built with g++ version 4.7.0, -O3 optimization, Boost 1.52.0, and Linux 3.5.3-1

These programs marshal a deque of ints.

  Boost version
  Ebenezer version
  Generated code used by Ebenezer version

With a command line argument of 5,000,000, the Boost version is over 1.1 times slower than the Ebenezer version.

Output tests built with VS 11, -O2 optimization, Boost 1.52.0 and Windows 7 Home Premium

With a command line argument of 500000, the Boost version of the above test is over 1.8 times slower than the corresponding Ebenezer version.

Input tests built with g++ version 4.7.0, -O3 optimization, Boost 1.52.0, and Linux 3.5.3-1

The following programs input a deque of ints.

  Boost version
  Ebenezer version

With a command line argument of 5,000,000, the Boost version is over 3 times slower than the Ebenezer version and the stripped Boost executable is more than 4 times larger than the stripped Ebenezer executable.

These programs input to a vector<deque<double> >.

  Boost version
  Ebenezer version
  Generated code used by Ebenezer version

With a command line argument of 500000, the Boost version is over 3 times slower than the Ebenezer version. (The serialization library in Boost doesn't make use of std::move.) The stripped Boost executable is more than 2.6 times larger than the stripped Ebenezer executable.

Support for Messages:

The Middle language offers support for messages that's not available with the serialization library in Boost. For example, the following Middle code has two messages.


remote_messages_middle
   @out @msg_id_login (std::vector)
   @out @msg_id_direct (cmw::marshalling_integer, cmw_user_input)
}

When @msg_id... is used, the generated marshalling functions marshal the value associated with their message id before marshalling message data.

Support for Boost Intrusive Containers:

The C++ Middleware Writer has support for some Boost Intrusive containers. Neither Boost Intrusive nor the serialization library in Boost offer serialization support for these containers.

Weaknesses of the C++ Middleware Writer

The primary weakness is that we don't support some C++ features. We have limited support for user defined templates, nested classes and some other features of the language. We are working on shortening this list.


Home