Strengths of the C++ Middleware Writer

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

Usage:

  1. We provide full generation of marshalling functions. Users of the Boost Serialization library must maintain serialize functions for their types by hand. With the C++ Middleware Writer, 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. Boost Serialization requires friend declarations. Our approach writes marshalling functions based on the content of the types involved. So there's no need to add friend declarations.
  3. 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 "one more time."

Performance:

Testing notes

For testing purposes we build the Boost Serialization library 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 gcc version 4.5.1, -O3 optimization, Boost 1.48.0 and Linux 2.6.35.11

This set of programs serialize a list of ints.

  Boost version
  Ebenezer version
  Generated include file used by Ebenezer version
  Generated source file used by Ebenezer version

With a command line argument of 500000, the Boost version is between 1.1 and 1.2 times slower than the Ebenezer version.

These programs marshal a list of ints and a deque of ints.

  Boost version
  Ebenezer version

With a command line argument of 500000, the Boost version is between 1.2 and 1.3 times slower than the Ebenezer version.

Output tests built with MSVC++ 10, -O2 optimization, Boost 1.48.0 and Windows 7 Home Premium

With a command line argument of 500000, the Boost Serialization versions of both of the above tests are between 1.7 and 1.8 times slower than the corresponding Ebenezer version.

Input tests built with gcc version 4.5.1, -O3 optimization, Boost 1.48.0, and Linux 2.6.35.11

The following programs input a list of ints.

  Boost version
  Ebenezer version

With a command line argument of 500000, the Boost version is between 1.4 and 1.6 times slower than the Ebenezer version and the stripped Boost Serialization executable is more than 2.6 times larger than the stripped Ebenezer executable.

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

  Boost version
  Ebenezer version
  Generated include file used by Ebenezer version

With a command line argument of 100000, the Boost version is over 2.4 times slower than the Ebenezer version. (The Ebenezer marshalling code was generated with Permit-std::move turned on. The Boost Serialization library doesn't make use of ::std::move.) The stripped Boost Serialization executable is more than 2.6 times larger than the stripped Ebenezer executable.

Support for Messages:

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


msg_manager
  @msg_id_abc     (std::vector<double>, int8_t) 
  @msg_id_result  (bool, std::string)  
}

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

Support for Boost Intrusive Containers:

Only the C++ Middleware Writer has support for Boost Intrusive containers. Neither the Boost Intrusive nor Boost Serialization libraries offer serialization support for these useful 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