Tuesday, February 27, 2007

Evolving the Spectrum of Distributed Architectures

Great conclusion by Benjamin Carlyle on the The Architectural Spectrum:

I still don't see where SOAP fits into the world, or even WAKA for that matter. The expense of rolling out a new protocol over the scale of the Web has already been demonstrated to be nearly impossible over the short term. HTTP/1.1 and IPv6 are examples. The Web has reached a point where it takes decades to bring about substantial change, even when the change appears compelling. HTTP can't be unmade at this point, but perhaps it can be extended. So long as their use remains Web-compatible, sub-architectures can extend HTTP and its content types to suit their individual needs. They may even be able to build a second-tier Web that eventually supplants the original Web.

I don't see a place for RDF. I see the Web as a world of mime types and namespace-free xml. I think you need to build communities around document types. I think the sub-architectures that (mis)use and extend the content types of the Web contribute to it, and that XML encourages this more than RDF does. Today we have HTML, atom, pdf, png, svg, and a raft of other useful document types. In twenty years time we will probably have another handful that are so immensely useful to the wider Web that we can't imagine how we ever lived without them. I predict that this will be the way to the semantic web: Hard-fought victories over specific document types that solve real-world problems. I predict that the majority of these document types will be based around the tree structure of XML, but define their own structure on top of it. I don't foresee any great number being built around the graph structure of XML, also defined on top of XML in present-day RDF/XML serialisations. If RDF is still around in that timeframe it will be used behind the firewall to store data acquired through standard non-RDF document types in a way that replaces present day RDBMS and SQL.

Saturday, February 24, 2007

Most of my best ideas arrive while showering !

Glad to know I'm not the only one. And I agree with this guy in that the reasons are really obvious: no one is disturbing you, you're relaxed, everything just flows.

Language independent exception handling on SWIG

This is quite useful when wrapping code using SWIG for several languages. By adding this snippet to my interface definition file:

// Language independent exception handler
%include exception.i

%exception {
try {
} catch(string& stringReason) {
const char* sData = (char*)stringReason.c_str();
} catch(...) {
SWIG_exception(SWIG_RuntimeError,"Unknown exception");

I can do this on C++:

if (dbSpace.count(dbId)) {
throw string("dbId already in use");

and catch native runtime exceptions on Python or Java:

except RuntimeError, e:
print e

>> dbId already in use

Thursday, February 01, 2007

clocky, the alarm clock that runs away


The alarm clock that runs away and hides when you don't wake up. Clocky gives you one chance to get up. But if you snooze, Clocky will jump off of your nightstand and wheel around your room looking for a place to hide. Clocky is kind of like a misbehaving pet, only he will get up at the right time.