the cameras

Thursday, June 08, 2000, at 02:58PM

By Eric Richardson

My cameras are back. I re-wrote the whole architecture again. This one's a fun one, with a central camera server, cam clients, and images stored in a database. Click on the title to get a little more in-depth description.

I've got three computers with cameras on them. Unfortunately, they're all running IRIX, so they're a major pain to write scripts on. For this reason, I run a simply socket-based camera client on each of these machines. The client simply sits around waiting for the server to connect to it, gives the server a picture, and goes back to waiting.

The server is cool. Basically it sits on my machine looping around the servers collecting images (waiting 10 seconds between cycles). However, instead of just blindly throwing every image it gets into the db, it uses Fred Wheeler's excellent icmp image comparison utility to determine the mean difference of the new image and the last image sent. If the mean difference is too low, it doesn't upload the new image. This saves on bandwidth when I'm not here.

If the image is different enough, the server sticks it into a blob field in a mysql db. The camera.jpg script then requests the newest image for whatever server is requested out of the db when a client hits it.

As usual, I'll be putting these scripts up at eScripting.