bleen Code
Status: Alpha
Brought to you by:
mikedilger
bleen ----- See INSTALL for installation instructions. See LICENSE, COPYING.LESSER, and COPYING for license information. Bleen is released under the LGPL. Bleen is a high performance C++ UDP-based networking library. It provides a thin layer of additional services on top of UDT, which does the lion's share of work. Bleen is portable and works under multiple Microsoft Windows variants as well as various Unix-like operating systems including Linux, BSD, and OSX, and runs on IA32, POWER-PC, IA64 and AMD64 architectures. UDT layer features ------------------ Most of the features are provided by UDT. These include: * High performance UDP-based application layer networking, avoiding several inefficiencies and latencies in TCP. * Connection oriented * Full duplex * Reliable data transfer with streaming, as well as partially reliable data messaging * In-order delivery of messages * Preservation of message boundaries * Flow control * Congestion control (and is ECN capable) * Selective ACKs (for higher performance) * MSS setting (but not MTU discovery) * Network fairness: Throughput is balanced regardless of the RTT. * Packet timestamping (not yet exposed by bleen) * Clock synchronization via per-socket clocks (not yet exposed by bleen) * Multiplexing (multiple channels per socket) (not yet exposed by bleen) You can find out more about UDT at http://udt.sf.net http://sf.net/projects/udt/ Bleen layer features -------------------- * A thin wrapper, abstracting and simplifying the networking API as C++ classes. Future features --------------- Bleen is intended to do automatic MTU discovery and optimization. This is not yet implemented. Bleen is intended to be secure supplying secrecy via encryption, authenticity via message authentication, and key exchange. However, this version of bleen does not supply any of these. The intent is to weave AES OCB 2.0 and J-PAKE into a future distribution. OCB 2.0 is the fastest known algorithm providing this type of security, both secrecy and message authentication in one pass. It can also authenticate the UDT and UDP headers without encrypting them, while encrypting the payload, and still do this all in one pass. This nicely takes care of the main security concerns with UDT including sequence number attacks such as blind ACKs, blind resets, and syn flooding style attacks. However, OCB 2.0 is patented by Philip Rogaway, meaning that functionality cannot be released under LGPL. ConnStream is intended to extend std::iostream. This has not yet been implemented. Bleen is intended to allow setting of ECN and QoS features. This is not yet been implemented. Bleen is intended to provide clock synchronization using an algorithm that converges faster than NTP and is more accurate than SNTP. The service wouldn't adjust any clocks, it would just calculate and maintain offsets. Bleen is intended to be thread safe. The UDT components are, but I have not verified that the entire library is. Features Omitted ---------------- We intentionally omitted a number of related features. If you want these, feel free to fork development (the license is permissive), or layer them on top. These include: * Threading. While we intend to be thread safe, we don't intend to implement threading. We believe threading is best implemented at the top level of the application with a solution such as Intel's Concurrent Collections for C++ (or Threading Building Blocks). If various libraries each implement their own threading, applications typically end up with too many threads causing contention and excessive context switching, a penalty that can be very high. NOTICE: Currently UDT uses threading fairly heavily. We intend to strip this from a future release, but retain it's ability to thread. * Object serialization. This tends to be application specific in nature, and requires application-specific object modifications. We recommend using boost::serialization with the eos portable binary archive developed by Christian Pfligersdorffer. It is fast, space efficient, and it is almost portable (it requires IEEE 754 floating point, and may not preserve distinctions among NaNs). * Pluggable security. We didn't bother and don't care for the overhead, because OCB 2.0 is perfectly mated to the security needs of UDT. However OCB 2.0 is patented by Philip Rogaway and that may cause some issues for commercial users. * Data compression. I'm not sure it belongs here. History ------- Bleen was developed for vast, a game engine. Bleen used to be called grue before 22 Oct 2009. The philosophical ramifications of that are left as an exercise for the reader. mike@mikedilger.com