What I did on my vacation from reality

Home About RTL8187B Laptop Cam Quotes Login

January 30, 2009

Fun with sockets

3:49 am — Main

My mail filter announces incoming mail as it comes in — for spam, it just plays a short wav, one of the sound effects from SOCOM: US Navy Seals. For ham, though, it feeds a brief summary through the speech synthesizer: the sender address, and the subject line (or “No subject”).

When the laptop is up, it acts as my primary MX. When it’s off (e.g., overheated), Google acts as my backup MX, and when my laptop comes back up, it runs fetchmail from cron.

The problem with this is that the speech synth tends to step on itself. I’ll get two or three speech processes, all trying to announce different messages at the same time.

The obvious solution: queue them all up and let a seperate process serialize them via Unix sockets. I could just have each process acquire a lock on the synthesizer, but in case of massive email floods, say, when I’ve been away for a week or two, it’d just cause timeouts and deferrals.

The server I use is here, and the client that feeds it is here. I may or may not update them on the site as I improve the code.




RSS feed | Trackback URI

1 Comment»

thornleypo —June 3, 2009 @ 9:53 pm

approximately statement cupcake warms responsible state

 
Name (required)
E-mail (required - never shown publicly)
URI
Your Comment (smaller size | larger size)
You may use <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped=""> in your comment.