Joost: A Simple Networking Library
Today's OCI C++ lunch features Justin Michel presenting his own networking library—Joost. It abstracts away many of the lower level details and makes network programming simple and correct. The Joost abstraction retains only a few concepts: addresses, connections, events, messages. Hook them up and you've got a little thingy that will do the right things with little programmer attention. Things are done in an asynchronous fashion and nothing blocks. Flow control are handled through events.
The interfaces are carefully designed to make efficient implementations possible on multiple platforms and across programming languages. .NET and Java implementations have been done. C++ implementation is in progress.
Here's a snippet of client code:
class hello_client : public joost::tcp_events {
//...
public:
void run() {
joost::ip_address addr("localhost", 5555);
joost::message_size_decoder_ptr no_msd;
joost::tcp_events_ptr handler(this, dont_delete);
joost::tcp_connection con(addr, no_msd, handler);
std::string hello = "Hello World";
joost::out_message out;
out.append_uint8(hello.size() + 1); // size of string + 1 byte header
out.append_ascii(hello);
std::cout << "\nSending Hello..." << std::endl;
joost::tcp_send_results result = con.send(out);
std::cout << "\nDisconnection..." << std::endl;
con.disconnect();
hman.wait();
std::cout << "\nDone." << std::endl;
}
// ...
};
String 2006
A conference on string theory was held in the past weeks in Beijing.
(I know some readers of this blog are interested in string theory.)
Not Even Wrong: Slides from the talks at Strings 2006 are now available.
Steven Hawking is always a good read. And Edward Witten is always interesting.
Unreleated to the topic of the conference but equally interesting is the recent announcement of the full proof of the Poincaré Conjecture by Cao Huaidong and Zhu Xiping. It is one of the seven Millennium Prize Problems for which the Clay Mathematics Institute is offering a $1,000,000 prize for a correct solution.