Computers Posts

  • 05.25.08 BLIP: Come ‘n’ get it! (Computers)

    I’ve released the source code to my “BLIP” protocol implementation, as part of a project I call “MYNetwork”, for “Mooseyard Networking Libraries”. API documentation is available online, and you can check out or browse the source code from its Mercurial repository. For the really curious, there’s even a sketchy overview of the protocol’s wire format.

    It’s working quite well for me in Cloudy; it’s been a while since I’ve found any outright bugs, although I know … MORE

  • 05.16.08 BLIP update (Computers)

    I’ve got my new BLIP protocol all implemented now. After my previous post on Monday:

    • On Tuesday I implemented message metadata.
    • On Wednesday I got SSL working (configuring the “server” side to verify the “client’s” cert was difficult.)
    • On Thursday I put Cloudy up on blocks, pried out Vortex and my Obj-C wrapper library, and replaced them with BLIP.
    • And on Friday (today) I debugged.

    Cloudy’s back up and running, and all its features work. So, … MORE

  • 05.12.08 The Fine Line Between Clever And Stupid (Computers)

    It’s that old “make vs. buy” trade-off, or “write vs. reuse” in this case: do you go with an existing library, even if it’s problematic, or do you write your own implementation from scratch?
    What am I talking about? The networking code in Cloudy.… MORE

  • 05.11.08 Stickies makes its music-video debut! (Me, Humor, Computers)

    Stickies and I hadn’t spoken in a while, but this morning I just heard it’s made its acting debut in a music video! That was unexpected, to say the least, but it’s an exciting career move, and I had to congratulate it; it does a great job.… MORE

  • 05.03.08 Coroutines, pt. 2 (Computers)

    It strikes me that ucontext is basically no lighter-weight than a pthread, in terms of address-space usage and context switch speed. Is that true? Or is there additional overhead to pthreads besides the stack + registers?

    If so, then it might be simpler just to use pthreads, since the API is already in place, and existing system facilities (like ObjC and C++ exceptions, and Cocoa autorelease pools) already know how to work with them. But the cooperative scheduling of coroutines is a bonus in some ways, as it makes the flow of control more deterministic and reduces the need for complex locking and synchronization.

    So my second question is whether there’s a clean way to implement cooperative scheduling of pthreads?… MORE

  • 04.30.08 Coroutines in Objective-C (Languages, Computers)

    I’ve started using NSOperation in a few places in Cloudy, which means I’m backsliding into using threads and locking and so forth. It definitely makes writing network code easier than Cocoa’s asynchronous API, but I really don’t want to get into a morass of threads.

    What I’d really like to use are Actors. In a nutshell, an Actor is an object that has its own [cooperative] thread and message queue. Actors interact by message-passing instead of shared state. The idea is to eliminate the need for standard synchronization primitives like semaphors and locks, and get rid of the race conditions and deadlocks that plague multi-threaded programs.… MORE

  • 04.26.08 Cloudy Verification (Social Software, Computers)

    The first time you connect to someone, how do you establish that digital identifier you’re communicating with is the human being you think it is? This is surprisingly difficult to do, because it’s prone to what cryptographers call the “man-in-the-middle attack”.

    First, consider the most obvious attack: simple spoofing.

    Let’s suppose there’s an instant-messaging UI, and while working at home you receive a message from someone with an unknown key, whose nickname is “AliceLidell”, which happens to be the name of a co-worker.… MORE

  • 04.17.08 Cloudy Networking (Social Software, Computers)

    Next I need to talk about networking; having an identity and minting certificates isn’t very interesting until you can connect to someone else.

    When one Cloudy peer wants to communicate with another one, it opens a TCP socket to its IP address —

    [Hang on, there are two issues I suddenly glossed over in that last phrase. First, how did this peer find out the others’ IP address? These are just random computers, not servers, so they don’t have their own domain names or even stable addresses.… MORE

  • 04.15.08 Cloudy Identity (Ideas, Social Software, Computers)

    At the root of Cloudy is the means for creating and establishing identity. A lot of peer-to-peer systems treat the peers mostly as interchangeable anonymous nodes, often deliberately so, but Cloudy is a social system. Your Cloudy identity is simply a public key, currently 2048-bit RSA, generated the first time you launch the program. (The matching private key is stored securely in the Mac OS Keychain.) From then on, that public key uniquely identifies you.… MORE

  • 04.13.08 Cloudy As Buzzwords (Social Software, Web, Computers)

    I have many ideas for applications, but most of them seem to rely on similar kinds of infrastructure, in particular a distributed, secure application-level messaging system. Unfortunately, this doesn’t really exist yet, at least not in any form that meets my needs.

    What am I talking about here? More colloquially, it’s a mechanism for letting applications all over the network send messages to each other, without requiring a central server, and without allowing messages to be eavesdropped upon or faked.

    Let’s take it one buzzword at a time…… MORE