Wednesday, March 12, 2008

Robots!

Last week, I went to the San Francisco Java Meetup Group's March meetup on controlling robots with embedded Java. Shawn Silverman gave an awesome presentation/workshop where we all got to program a TrackBot first using a simulator, then using the real thing.

There's a callback API in Java for controlling the TrackBot that invokes specific methods when sensor data is emitted from the TrackBot's serial interface. Based on the sensor input, you can control each of four motors that control the robot's tracks.

Once you've written your controller program and tested it in the simulator, you have the option of plugging your computer directly into the TrackBot via a serial port (which can be made wireless using BlueTooth) or loading the program onto a very cool little embedded Java device that Sun has developed called the SunSPOT.

This was a really fun evening.

If you live in San Francisco, the San Francisco Java Meetup Group is really cool. Many thanks to the organizer, Aleksandar Gargenta, for putting together a fun and engaging Java Group in SF. The next meetup, on April 7th, is on Cuercas, Caucho's Java PHP implementation.

Monday, June 04, 2007

More Excitement About EC2

I fell further in love with EC2 today. I needed to set up a quick and dirty web cluster to test some stuff out (working, as I do, for a distributed computing company) and I didn't have any spare machines at my disposal. Not to fret, I thought to myself... EC2 to the rescue.

In minutes (in between meetings), I had a machine up and running. I installed the software I needed (Java, Tomcat, Terracotta, etc.). In a few more minutes (a little later in the day, between two other meetings), I baked that instance out as a machine image and deployed it on three separate instances.

In less than an hour's work, I had a three-machine web cluster up and running, serving pages over the Internet, and ready for my testing. Even better, I can continually bake out the state of my cluster and publish those images so other people can run the same test themselves.

It's astounding how easy it is to set up a complex computing environment with EC2.

Saturday, November 11, 2006

Objects Die When Their Guts Spill Out

There's a bunch of goo in JNDI to make it seem like you're dealing with real objects, but, as usual, it's a complicated, clunky way to do what OO runtimes do intrinsically.

The reasons to use JNDI this way are similar to the reasons for using SOA (and CORBA), namely that they provide a (sort-of) well understood interface layer between technological, transport, and organizational boundaries.

JNDI, SOA, CORBA, and O/R mappers make the "objectness" explicit, thereby taking all of the power out of the object metaphor. It's like trying to have a conversation by describing the syntactic structure of what you're trying to say, e.g., "the cat sat on the mat" becomes "(Noun phrase(subject(definite article('the'), noun('cat'))),(Verb phrase(verb('sat'), preposition('on'), definite object(article('the'), noun('mat'))))"; all of the expressive, semantic power of a language is lost when you externalize its syntactic structure.