RCF is a library/framework for RPC and distributed messaging. I like the RCF framework for the following reasons
- in line service - interface - rpc call specification (i.e., no separate compilation of an IDL).
- C10K design style (layers ontop of windows IOCP or boost ASIO).
- supports windows named pipes and unix domain sockets (I absolutely cannot compromise on this).
- SSL.
- Messaging paradigms, 2-way, 1-way, client-callback, 1-way batched.
- protocol buffers support (tho I think I can stick with the built-in-serialization).
- publish/subscribe functionality.
I am using GCC 4.4.3 on a 64-bit ubuntu install. I compile the trivial server and client code using the following line in the demo subdirectory of the distribution.
g++ -O3 -DRCF_USE_BOOST_ASIO Client.cpp ../src/RCF/RCF.cpp -I ../../Boost/ -I ../include/ -lpthread ../../Boost/lib/libboost_system.a -s
The resulting client and server binaries fluctuate between 1.7 to 2.2 megabytes.
Alarm bells are ringing; I use the following three examples as my yard sticks:
- Boost::ASIO: server 2 example compiled in release version using bjam. The resulting code , stripped, is 176kb.
- nginx: A highly complex, very configureable, very efficient web-server. 500kb stripped.
- Trandsport Channel focused minimal middleware solution Zero MQ. libzmq 274k
I have written my own production RPC/middleware and I'm getting to a stage where I'm thinking I'll just write another one to meet my needs, layering on top of Boost. But I do not want to do this. I like RCF's design, it meets my needs. However, I can't justify the binary size of the simple programs, it should not produce such massive binaries.
I have two main concerns.
- The quality of the code-paths for rpc. I want low latency.
- The growth of the binary as I start coding my application arround it.
A reasonable explanation is that the library isn't designed for modularity, and instantiates everything upfront.
["The Question"]
I'd like some feedback from folks who design real-time data-processing systems on my concerns. Could you justify this size ?
["/The Question"]
I'd consider alternatives. ZMQ is nice, but its an aditional dependancy, misses SSL, doesn't provide a lot of middleware primitives, and doesn't provide named pipes (I need to verify connecting processes, and named pipes have security contexts)
-sto g++. - Hassan Syed