blarg?

August 19, 2003

I Am A Genius.

Filed under: Archives — mhoye @ 12:00 pm

I’m not one to let a line like that stand on its own, no sirree. Nobody
would believe me. They won’t anyway, but what the hell.

I’ve got to write a big honking report on it in the next little
while, but the gist of it is that I’ve finished up a working
Java-based task-distribution client that permits any computer
(cool bit: any OS, any processor, as long as it speaks
Java and Sockets) among a set of collaborators farm out fragments
of jobs to its peers, where the job fragments are run, returned
and reassembled. The basic gist of it is that task Objects are serialized,
shipped over the network
to collaborating peers, each fragment is run in its own thread
and sent back to its parent machine. The joy of it is that any machine
can inject a task into the system and expect to get it back.

It’s early, and it’s clearly not good code, but it works. Which is
to say, Booya!

The whole thing was inspired by this, the
legendary Amish Mobile Home. Many hands, the line goes, make light work,
and if you haven’t got some big iron to apply to problems that size,
sometimes you can get the friends you’ve got together to get the job
done just as well.

A few observations:

  • Java’s networking libraries are very shiny.
  • Their threading functionality is also pretty easy to work with.
  • It takes surprisingly little irresponsible threadwork to bury a WinXP system.
  • Use sleep(), kids, ’cause wait() just won’t do what you think it does.
  • I need more design experience.
  • It would be really nice if Java gave up on the syntax that looks
    like C, and went with a syntax that actually works like C. C’mon, guys:
    you’re damn near mugging everyone else for their functionality at the
    moment, why not get back to your roots? I realize it’s about a decade
    too late to fix it, but I don’t understand why “==” means “is the same
    object as”, rather than the more common-sensical “contains
    identical information”. Probably the same reason that the hashing
    algorithm apparently involves the object’s reference, which almost
    certainly involved drugs. Again, too-late-I-know, but maybe if they
    gave you the option of a non-reference-dependent hashing process,
    then you could get switch statements to work with objects. Like, say,
    Strings. Which would also be sweet.

  • There’s always the possibility that I’m just an ignorant crackpot, here,
    so I’m keeping that in mind.

    Source code soon.

No Comments

No comments yet.

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

Powered by WordPress